From 51cec6163ccae3560113ea5142117f1332594181 Mon Sep 17 00:00:00 2001 From: JiahuiPeng <46921893+804873052@users.noreply.github.com> Date: Fri, 27 Aug 2021 15:22:06 +0800 Subject: [PATCH] Release v57.0.0 1630045276 (#15400) * delete services\securityinsight\mgmt\v1.0\securityinsight * Generated from specification/network/resource-manager/readme.md tag package-2021-03 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/cosmos-db/resource-manager/readme.md tag package-2021-03-preview (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/datafactory/resource-manager/readme.md tag package-2018-06 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/dataprotection/resource-manager/readme.md tag package-2021-07 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/netapp/resource-manager/readme.md tag package-netapp-2021-06-01 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/synapse/resource-manager/readme.md tag package-preview-2021-06 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/compute/resource-manager/readme.md tag package-2021-07-01 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/guestconfiguration/resource-manager/readme.md tag package-2021-01-25 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/postgresql/resource-manager/readme.md tag package-flexibleserver-2021-06 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * Generated from specification/guestconfiguration/resource-manager/readme.md tag package-2020-06-25 (commit hash: 6e95cd4c6086d61bb3de67cf6e4209a7b84efa23) * v57.0.0 --- CHANGELOG.md | 25 + .../compute/mgmt/compute/computeapi/models.go | 2 +- .../latest/compute/mgmt/compute/models.go | 25 +- .../datafactory/mgmt/datafactory/models.go | 32 +- .../dataprotectionapi/models.go | 11 +- .../mgmt/dataprotection/models.go | 330 +- .../guestconfigurationapi/models.go | 4 +- .../mgmt/guestconfiguration/models.go | 72 +- profiles/latest/netapp/mgmt/netapp/models.go | 38 +- .../netapp/mgmt/netapp/netappapi/models.go | 2 +- .../latest/network/mgmt/network/models.go | 40 +- .../network/mgmt/network/networkapi/models.go | 3 +- .../mgmt/postgresqlflexibleservers/models.go | 12 + .../compute/mgmt/compute/computeapi/models.go | 2 +- .../preview/compute/mgmt/compute/models.go | 25 +- .../datafactory/mgmt/datafactory/models.go | 32 +- .../dataprotectionapi/models.go | 11 +- .../mgmt/dataprotection/models.go | 330 +- .../guestconfigurationapi/models.go | 4 +- .../mgmt/guestconfiguration/models.go | 72 +- profiles/preview/netapp/mgmt/netapp/models.go | 38 +- .../netapp/mgmt/netapp/netappapi/models.go | 2 +- .../preview/network/mgmt/network/models.go | 40 +- .../network/mgmt/network/networkapi/models.go | 3 +- .../mgmt/postgresqlflexibleservers/models.go | 12 + .../preview/synapse/mgmt/synapse/models.go | 514 +- .../synapse/mgmt/synapse/synapseapi/models.go | 14 +- .../mgmt/2021-07-01/compute/CHANGELOG.md | 2 + .../mgmt/2021-07-01/compute/_meta.json | 11 + .../2021-07-01/compute/availabilitysets.go | 652 + .../compute/capacityreservationgroups.go | 596 + .../compute/capacityreservations.go | 490 + .../mgmt/2021-07-01/compute}/client.go | 10 +- .../compute/cloudserviceoperatingsystems.go | 422 + .../compute/cloudserviceroleinstances.go | 695 + .../2021-07-01/compute/cloudserviceroles.go | 224 + .../mgmt/2021-07-01/compute/cloudservices.go | 1189 + .../compute/cloudservicesupdatedomain.go | 318 + .../compute/computeapi/interfaces.go | 619 + .../2021-07-01/compute/dedicatedhostgroups.go | 589 + .../mgmt/2021-07-01/compute/dedicatedhosts.go | 489 + .../mgmt/2021-07-01/compute/diskaccesses.go | 1040 + .../2021-07-01/compute/diskencryptionsets.go | 716 + .../2021-07-01/compute/diskrestorepoint.go | 416 + .../compute/mgmt/2021-07-01/compute/disks.go | 774 + .../compute/mgmt/2021-07-01/compute/enums.go | 2015 + .../mgmt/2021-07-01/compute/galleries.go | 581 + .../2021-07-01/compute/galleryapplications.go | 482 + .../compute/galleryapplicationversions.go | 513 + .../mgmt/2021-07-01/compute/galleryimages.go | 489 + .../compute/galleryimageversions.go | 500 + .../compute/gallerysharingprofile.go | 113 + .../compute/mgmt/2021-07-01/compute/images.go | 580 + .../mgmt/2021-07-01/compute/loganalytics.go | 204 + .../compute/mgmt/2021-07-01/compute/models.go | 22985 +++++++ .../mgmt/2021-07-01/compute/operations.go | 98 + .../compute/proximityplacementgroups.go | 575 + .../mgmt/2021-07-01/compute/resourceskus.go | 153 + .../compute/restorepointcollections.go | 581 + .../mgmt/2021-07-01/compute/restorepoints.go | 295 + .../2021-07-01/compute/sharedgalleries.go | 227 + .../2021-07-01/compute/sharedgalleryimages.go | 233 + .../compute/sharedgalleryimageversions.go | 240 + .../mgmt/2021-07-01/compute/snapshots.go | 767 + .../mgmt/2021-07-01/compute/sshpublickeys.go | 649 + .../compute/mgmt/2021-07-01/compute/usage.go | 155 + .../mgmt/2021-07-01/compute}/version.go | 4 +- .../compute/virtualmachineextensionimages.go | 270 + .../compute/virtualmachineextensions.go | 439 + .../compute/virtualmachineimages.go | 432 + .../compute/virtualmachineimagesedgezone.go | 445 + .../compute/virtualmachineruncommands.go | 686 + .../2021-07-01/compute/virtualmachines.go | 2177 + .../virtualmachinescalesetextensions.go | 480 + .../virtualmachinescalesetrollingupgrades.go | 343 + .../compute/virtualmachinescalesets.go | 2140 + .../virtualmachinescalesetvmextensions.go | 454 + .../virtualmachinescalesetvmruncommands.go | 492 + .../compute/virtualmachinescalesetvms.go | 1419 + .../2021-07-01/compute/virtualmachinesizes.go | 113 + .../mgmt/2018-06-01/datafactory/CHANGELOG.md | 718 +- .../mgmt/2018-06-01/datafactory/_meta.json | 2 +- .../mgmt/2018-06-01/datafactory/enums.go | 37 +- .../mgmt/2018-06-01/datafactory/models.go | 4904 +- .../2021-07-01/dataprotection/CHANGELOG.md | 2 + .../mgmt/2021-07-01/dataprotection/_meta.json | 11 + .../dataprotection/backupinstances.go | 865 + .../dataprotection/backuppolicies.go | 383 + .../backupvaultoperationresults.go | 109 + .../2021-07-01/dataprotection/backupvaults.go | 660 + .../mgmt/2021-07-01/dataprotection/client.go | 41 + .../dataprotection/dataprotection.go | 107 + .../dataprotectionapi/interfaces.go | 162 + .../mgmt/2021-07-01/dataprotection/enums.go | 690 + .../2021-07-01/dataprotection/exportjobs.go | 108 + .../exportjobsoperationresult.go | 112 + .../mgmt/2021-07-01/dataprotection/jobs.go | 227 + .../mgmt/2021-07-01/dataprotection/models.go | 6444 ++ .../dataprotection/operationresult.go | 104 + .../2021-07-01/dataprotection}/operations.go | 42 +- .../dataprotection/operationstatus.go | 104 + .../dataprotection/recoverypoints.go | 238 + .../dataprotection/resourceguards.go | 1729 + .../dataprotection/restorabletimeranges.go | 113 + .../mgmt/2021-07-01/dataprotection/version.go | 19 + .../guestconfiguration/CHANGELOG.md | 56 +- .../2020-06-25/guestconfiguration/_meta.json | 6 +- .../2020-06-25/guestconfiguration/enums.go | 91 +- .../2020-06-25/guestconfiguration/models.go | 49 +- .../guestconfiguration/CHANGELOG.md | 2 + .../2021-01-25/guestconfiguration/_meta.json | 11 + .../guestconfiguration/assignmentreports.go | 203 + .../assignmentreportsvmss.go | 203 + .../guestconfiguration/assignments.go | 369 + .../guestconfiguration/assignmentsvmss.go | 282 + .../2021-01-25/guestconfiguration/client.go | 41 + .../2021-01-25/guestconfiguration/enums.go | 141 + .../guestconfigurationapi/interfaces.go | 73 + .../hcrpassignmentreports.go | 203 + .../guestconfiguration/hcrpassignments.go | 369 + .../2021-01-25/guestconfiguration/models.go | 570 + .../guestconfiguration/operations.go | 98 + .../2021-01-25/guestconfiguration/version.go | 19 + .../mgmt/2021-06-01/netapp/CHANGELOG.md | 2 + .../netapp/mgmt/2021-06-01/netapp/_meta.json | 11 + .../mgmt/2021-06-01/netapp/accountbackups.go | 289 + .../netapp/mgmt/2021-06-01/netapp/accounts.go | 626 + .../mgmt/2021-06-01/netapp/backuppolicies.go | 481 + .../netapp/mgmt/2021-06-01/netapp/backups.go | 738 + .../netapp/mgmt/2021-06-01/netapp/client.go | 41 + .../netapp/mgmt/2021-06-01/netapp/enums.go | 286 + .../netapp/mgmt/2021-06-01/netapp/models.go | 4333 ++ .../2021-06-01/netapp/netappapi/interfaces.go | 137 + .../mgmt/2021-06-01/netapp/operations.go | 98 + .../netapp/mgmt/2021-06-01/netapp/pools.go | 549 + .../netapp/mgmt/2021-06-01/netapp/resource.go | 284 + .../2021-06-01/netapp/snapshotpolicies.go | 566 + .../mgmt/2021-06-01/netapp/snapshots.go | 543 + .../netapp/mgmt/2021-06-01/netapp/vaults.go | 116 + .../netapp/mgmt/2021-06-01/netapp/version.go | 19 + .../netapp/mgmt/2021-06-01/netapp/volumes.go | 1405 + .../mgmt/2021-03-01/network/CHANGELOG.md | 2 + .../mgmt/2021-03-01/network/_meta.json | 11 + ...cationgatewayprivateendpointconnections.go | 393 + .../applicationgatewayprivatelinkresources.go | 151 + .../2021-03-01/network/applicationgateways.go | 1468 + .../network/applicationsecuritygroups.go | 575 + .../network/availabledelegations.go | 148 + .../network/availableendpointservices.go | 148 + .../network/availableprivateendpointtypes.go | 267 + .../availableresourcegroupdelegations.go | 151 + .../network/availableservicealiases.go | 266 + .../network/azurefirewallfqdntags.go | 145 + .../mgmt/2021-03-01/network/azurefirewalls.go | 584 + .../mgmt/2021-03-01/network/bastionhosts.go | 588 + .../network/bgpservicecommunities.go | 145 + .../network/mgmt/2021-03-01/network/client.go | 843 + .../2021-03-01/network/connectionmonitors.go | 696 + .../2021-03-01/network/customipprefixes.go | 587 + .../2021-03-01/network/ddoscustompolicies.go | 346 + .../2021-03-01/network/ddosprotectionplans.go | 578 + .../network/defaultsecurityrules.go | 228 + .../2021-03-01/network/dscpconfiguration.go | 496 + .../network/mgmt/2021-03-01/network/enums.go | 2983 + .../expressroutecircuitauthorizations.go | 394 + .../network/expressroutecircuitconnections.go | 401 + .../network/expressroutecircuitpeerings.go | 404 + .../network/expressroutecircuits.go | 977 + .../network/expressrouteconnections.go | 357 + .../expressroutecrossconnectionpeerings.go | 405 + .../network/expressroutecrossconnections.go | 747 + .../network/expressroutegateways.go | 502 + .../2021-03-01/network/expressroutelinks.go | 228 + .../2021-03-01/network/expressrouteports.go | 661 + .../network/expressrouteportslocations.go | 221 + .../network/expressrouteserviceproviders.go | 145 + .../2021-03-01/network/firewallpolicies.go | 522 + .../firewallpolicyrulecollectiongroups.go | 405 + .../mgmt/2021-03-01/network/flowlogs.go | 481 + .../mgmt/2021-03-01/network/hubroutetables.go | 391 + .../network/hubvirtualnetworkconnections.go | 392 + .../2021-03-01/network/inboundnatrules.go | 417 + .../2021-03-01/network/inboundsecurityrule.go | 118 + .../network/interfaceipconfigurations.go | 228 + .../network/interfaceloadbalancers.go | 150 + .../2021-03-01/network/interfacesgroup.go | 1594 + .../network/interfacetapconfigurations.go | 432 + .../mgmt/2021-03-01/network/ipallocations.go | 578 + .../mgmt/2021-03-01/network/ipgroups.go | 579 + .../loadbalancerbackendaddresspools.go | 392 + .../loadbalancerfrontendipconfigurations.go | 229 + .../network/loadbalancerloadbalancingrules.go | 228 + .../network/loadbalancernetworkinterfaces.go | 150 + .../network/loadbalanceroutboundrules.go | 228 + .../2021-03-01/network/loadbalancerprobes.go | 228 + .../mgmt/2021-03-01/network/loadbalancers.go | 656 + .../network/localnetworkgateways.go | 496 + .../network/mgmt/2021-03-01/network/models.go | 49878 ++++++++++++++++ .../mgmt/2021-03-01/network/natgateways.go | 578 + .../mgmt/2021-03-01/network/natrules.go | 391 + .../network/networkapi/interfaces.go | 1347 + .../mgmt/2021-03-01/network/operations.go | 140 + .../mgmt/2021-03-01/network/p2svpngateways.go | 977 + .../mgmt/2021-03-01/network/packetcaptures.go | 528 + .../peerexpressroutecircuitconnections.go | 233 + .../network/privatednszonegroups.go | 391 + .../2021-03-01/network/privateendpoints.go | 500 + .../2021-03-01/network/privatelinkservices.go | 1261 + .../mgmt/2021-03-01/network/profiles.go | 576 + .../2021-03-01/network/publicipaddresses.go | 1256 + .../2021-03-01/network/publicipprefixes.go | 579 + .../network/resourcenavigationlinks.go | 110 + .../2021-03-01/network/routefilterrules.go | 401 + .../mgmt/2021-03-01/network/routefilters.go | 578 + .../network/mgmt/2021-03-01/network/routes.go | 390 + .../mgmt/2021-03-01/network/routetables.go | 578 + .../mgmt/2021-03-01/network/securitygroups.go | 578 + .../network/securitypartnerproviders.go | 575 + .../mgmt/2021-03-01/network/securityrules.go | 390 + .../network/serviceassociationlinks.go | 110 + .../network/serviceendpointpolicies.go | 580 + .../serviceendpointpolicydefinitions.go | 392 + .../network/servicetaginformation.go | 158 + .../mgmt/2021-03-01/network/servicetags.go | 107 + .../mgmt/2021-03-01/network/subnets.go | 560 + .../network/mgmt/2021-03-01/network/usages.go | 154 + .../mgmt/2021-03-01/network/version.go | 19 + .../2021-03-01/network/virtualappliances.go | 591 + .../network/virtualappliancesites.go | 392 + .../network/virtualapplianceskus.go | 219 + .../network/virtualhubbgpconnection.go | 287 + .../network/virtualhubbgpconnections.go | 310 + .../network/virtualhubipconfiguration.go | 411 + .../network/virtualhubroutetablev2s.go | 392 + .../mgmt/2021-03-01/network/virtualhubs.go | 671 + .../virtualnetworkgatewayconnections.go | 1086 + .../network/virtualnetworkgatewaynatrules.go | 393 + .../network/virtualnetworkgateways.go | 1893 + .../network/virtualnetworkpeerings.go | 407 + .../2021-03-01/network/virtualnetworks.go | 784 + .../2021-03-01/network/virtualnetworktaps.go | 611 + .../network/virtualrouterpeerings.go | 404 + .../mgmt/2021-03-01/network/virtualrouters.go | 511 + .../mgmt/2021-03-01/network/virtualwans.go | 574 + .../mgmt/2021-03-01/network/vpnconnections.go | 564 + .../mgmt/2021-03-01/network/vpngateways.go | 836 + .../2021-03-01/network/vpnlinkconnections.go | 315 + .../network/vpnserverconfigurations.go | 576 + ...rconfigurationsassociatedwithvirtualwan.go | 111 + .../network/vpnsitelinkconnections.go | 112 + .../mgmt/2021-03-01/network/vpnsitelinks.go | 227 + .../mgmt/2021-03-01/network/vpnsites.go | 588 + .../network/vpnsitesconfiguration.go | 119 + .../mgmt/2021-03-01/network/watchers.go | 1556 + .../network/webapplicationfirewallpolicies.go | 524 + .../mgmt/2021-03-01/network/webcategories.go | 222 + .../postgresqlflexibleservers/CHANGELOG.md | 29 +- .../postgresqlflexibleservers/_meta.json | 2 +- .../postgresqlflexibleservers/enums.go | 19 + .../postgresqlflexibleservers/models.go | 4 +- .../documentdb/CHANGELOG.md | 242 +- .../2021-03-01-preview/documentdb/_meta.json | 6 +- .../documentdb/cassandraclusters.go | 43 +- .../documentdb/cassandradatacenters.go | 33 +- .../documentdb/cassandraresources.go | 48 +- .../2021-03-01-preview/documentdb/client.go | 162 + .../documentdb/collection.go | 9 +- .../documentdb/collectionpartition.go | 6 +- .../documentdb/collectionpartitionregion.go | 3 +- .../documentdb/collectionregion.go | 3 +- .../2021-03-01-preview/documentdb/database.go | 9 +- .../documentdb/databaseaccountregion.go | 3 +- .../documentdb/databaseaccounts.go | 48 +- .../documentdb/documentdbapi/interfaces.go | 8 + .../2021-03-01-preview/documentdb/enums.go | 374 +- .../documentdb/gremlinresources.go | 48 +- .../2021-03-01-preview/documentdb/models.go | 165 +- .../documentdb/mongodbresources.go | 48 +- .../documentdb/notebookworkspaces.go | 21 +- .../documentdb/partitionkeyrangeid.go | 3 +- .../documentdb/partitionkeyrangeidregion.go | 3 +- .../documentdb/percentile.go | 3 +- .../documentdb/percentilesourcetarget.go | 3 +- .../documentdb/percentiletarget.go | 3 +- .../documentdb/privateendpointconnections.go | 12 +- .../documentdb/privatelinkresources.go | 6 +- .../documentdb/sqlresources.go | 108 +- .../documentdb/tableresources.go | 24 +- .../2021-06-01-preview/synapse/CHANGELOG.md | 2 + .../2021-06-01-preview/synapse/_meta.json | 11 + .../synapse/azureadonlyauthentications.go | 340 + .../synapse/bigdatapools.go | 523 + .../mgmt/2021-06-01-preview/synapse/client.go | 41 + .../synapse/datamaskingpolicies.go | 215 + .../synapse/datamaskingrules.go | 312 + .../mgmt/2021-06-01-preview/synapse/enums.go | 1077 + .../extendedsqlpoolblobauditingpolicies.go | 342 + .../synapse/integrationruntimeauthkeys.go | 210 + .../integrationruntimeconnectioninfos.go | 121 + .../synapse/integrationruntimecredentials.go | 122 + .../integrationruntimemonitoringdata.go | 120 + .../integrationruntimenodeipaddress.go | 122 + .../synapse/integrationruntimenodes.go | 302 + .../integrationruntimeobjectmetadata.go | 215 + .../synapse/integrationruntimes.go | 1056 + .../synapse/integrationruntimestatus.go | 120 + .../synapse/ipfirewallrules.go | 517 + .../mgmt/2021-06-01-preview/synapse/keys.go | 423 + .../2021-06-01-preview/synapse/libraries.go | 159 + .../2021-06-01-preview/synapse/library.go | 119 + .../mgmt/2021-06-01-preview/synapse/models.go | 17006 ++++++ .../2021-06-01-preview/synapse/operations.go | 347 + .../synapse/privateendpointconnections.go | 428 + ...rivateendpointconnectionsprivatelinkhub.go | 248 + .../privatelinkhubprivatelinkresources.go | 248 + .../synapse/privatelinkhubs.go | 623 + .../synapse/privatelinkresources.go | 247 + .../synapse/restorabledroppedsqlpools.go | 206 + .../synapse/sparkconfiguration.go | 120 + .../synapse/sparkconfigurations.go | 160 + .../synapse/sqlpoolblobauditingpolicies.go | 342 + .../synapse/sqlpoolcolumns.go | 125 + .../synapse/sqlpoolconnectionpolicies.go | 121 + .../sqlpooldatawarehouseuseractivities.go | 122 + .../synapse/sqlpoolgeobackuppolicies.go | 303 + .../sqlpoolmaintenancewindowoptions.go | 122 + .../synapse/sqlpoolmaintenancewindows.go | 213 + .../synapse/sqlpoolmetadatasyncconfigs.go | 210 + .../synapse/sqlpooloperationresults.go | 122 + .../synapse/sqlpooloperations.go | 162 + .../sqlpoolrecommendedsensitivitylabels.go | 122 + .../synapse/sqlpoolreplicationlinks.go | 251 + .../synapse/sqlpoolrestorepoints.go | 433 + .../2021-06-01-preview/synapse/sqlpools.go | 786 + .../synapse/sqlpoolschemas.go | 254 + .../synapse/sqlpoolsecurityalertpolicies.go | 341 + .../synapse/sqlpoolsensitivitylabels.go | 868 + .../synapse/sqlpooltablecolumns.go | 170 + .../synapse/sqlpooltables.go | 258 + .../sqlpooltransparentdataencryptions.go | 343 + .../synapse/sqlpoolusages.go | 161 + ...oolvulnerabilityassessmentrulebaselines.go | 318 + .../sqlpoolvulnerabilityassessments.go | 428 + .../sqlpoolvulnerabilityassessmentscans.go | 435 + .../synapse/sqlpoolworkloadclassifier.go | 446 + .../synapse/sqlpoolworkloadgroup.go | 441 + .../synapse/synapseapi/interfaces.go | 615 + .../2021-06-01-preview/synapse/version.go | 19 + .../synapse/workspaceaadadmins.go | 294 + ...kspacemanagedidentitysqlcontrolsettings.go | 209 + ...acemanagedsqlserverblobauditingpolicies.go | 338 + ...pacemanagedsqlserverencryptionprotector.go | 427 + ...edsqlserverextendedblobauditingpolicies.go | 338 + ...pacemanagedsqlserverrecoverablesqlpools.go | 248 + ...pacemanagedsqlserversecurityalertpolicy.go | 338 + .../workspacemanagedsqlserverusages.go | 160 + ...anagedsqlservervulnerabilityassessments.go | 424 + .../2021-06-01-preview/synapse/workspaces.go | 628 + .../synapse/workspacesqlaadadmins.go | 294 + .../mgmt/v1.0/securityinsight/CHANGELOG.md | 11 - .../mgmt/v1.0/securityinsight/_meta.json | 11 - .../mgmt/v1.0/securityinsight/actions.go | 166 - .../mgmt/v1.0/securityinsight/alertrules.go | 726 - .../securityinsight/alertruletemplates.go | 257 - .../mgmt/v1.0/securityinsight/bookmarks.go | 456 - .../v1.0/securityinsight/dataconnectors.go | 442 - .../mgmt/v1.0/securityinsight/enums.go | 416 - .../v1.0/securityinsight/incidentcomments.go | 379 - .../mgmt/v1.0/securityinsight/incidents.go | 463 - .../mgmt/v1.0/securityinsight/models.go | 5548 -- .../securityinsightapi/interfaces.go | 95 - version/version.go | 2 +- 372 files changed, 228950 insertions(+), 10504 deletions(-) create mode 100644 services/compute/mgmt/2021-07-01/compute/CHANGELOG.md create mode 100644 services/compute/mgmt/2021-07-01/compute/_meta.json create mode 100644 services/compute/mgmt/2021-07-01/compute/availabilitysets.go create mode 100644 services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go create mode 100644 services/compute/mgmt/2021-07-01/compute/capacityreservations.go rename services/{securityinsight/mgmt/v1.0/securityinsight => compute/mgmt/2021-07-01/compute}/client.go (76%) create mode 100644 services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go create mode 100644 services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go create mode 100644 services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go create mode 100644 services/compute/mgmt/2021-07-01/compute/cloudservices.go create mode 100644 services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go create mode 100644 services/compute/mgmt/2021-07-01/compute/computeapi/interfaces.go create mode 100644 services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go create mode 100644 services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go create mode 100644 services/compute/mgmt/2021-07-01/compute/diskaccesses.go create mode 100644 services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go create mode 100644 services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go create mode 100644 services/compute/mgmt/2021-07-01/compute/disks.go create mode 100644 services/compute/mgmt/2021-07-01/compute/enums.go create mode 100644 services/compute/mgmt/2021-07-01/compute/galleries.go create mode 100644 services/compute/mgmt/2021-07-01/compute/galleryapplications.go create mode 100644 services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go create mode 100644 services/compute/mgmt/2021-07-01/compute/galleryimages.go create mode 100644 services/compute/mgmt/2021-07-01/compute/galleryimageversions.go create mode 100644 services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go create mode 100644 services/compute/mgmt/2021-07-01/compute/images.go create mode 100644 services/compute/mgmt/2021-07-01/compute/loganalytics.go create mode 100644 services/compute/mgmt/2021-07-01/compute/models.go create mode 100644 services/compute/mgmt/2021-07-01/compute/operations.go create mode 100644 services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go create mode 100644 services/compute/mgmt/2021-07-01/compute/resourceskus.go create mode 100644 services/compute/mgmt/2021-07-01/compute/restorepointcollections.go create mode 100644 services/compute/mgmt/2021-07-01/compute/restorepoints.go create mode 100644 services/compute/mgmt/2021-07-01/compute/sharedgalleries.go create mode 100644 services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go create mode 100644 services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go create mode 100644 services/compute/mgmt/2021-07-01/compute/snapshots.go create mode 100644 services/compute/mgmt/2021-07-01/compute/sshpublickeys.go create mode 100644 services/compute/mgmt/2021-07-01/compute/usage.go rename services/{securityinsight/mgmt/v1.0/securityinsight => compute/mgmt/2021-07-01/compute}/version.go (86%) create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachines.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go create mode 100644 services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/CHANGELOG.md create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/_meta.json create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/backupinstances.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/backuppolicies.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaultoperationresults.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaults.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/client.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotection.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotectionapi/interfaces.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/enums.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobs.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobsoperationresult.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/jobs.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/models.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/operationresult.go rename services/{securityinsight/mgmt/v1.0/securityinsight => dataprotection/mgmt/2021-07-01/dataprotection}/operations.go (69%) create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/operationstatus.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/recoverypoints.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/resourceguards.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/restorabletimeranges.go create mode 100644 services/dataprotection/mgmt/2021-07-01/dataprotection/version.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/CHANGELOG.md create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/_meta.json create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreports.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreportsvmss.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignments.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentsvmss.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/client.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/enums.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/guestconfigurationapi/interfaces.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignmentreports.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignments.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/models.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/operations.go create mode 100644 services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/version.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/CHANGELOG.md create mode 100644 services/netapp/mgmt/2021-06-01/netapp/_meta.json create mode 100644 services/netapp/mgmt/2021-06-01/netapp/accountbackups.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/accounts.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/backuppolicies.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/backups.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/client.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/enums.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/models.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/netappapi/interfaces.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/operations.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/pools.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/resource.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/snapshotpolicies.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/snapshots.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/vaults.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/version.go create mode 100644 services/netapp/mgmt/2021-06-01/netapp/volumes.go create mode 100644 services/network/mgmt/2021-03-01/network/CHANGELOG.md create mode 100644 services/network/mgmt/2021-03-01/network/_meta.json create mode 100644 services/network/mgmt/2021-03-01/network/applicationgatewayprivateendpointconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/applicationgatewayprivatelinkresources.go create mode 100644 services/network/mgmt/2021-03-01/network/applicationgateways.go create mode 100644 services/network/mgmt/2021-03-01/network/applicationsecuritygroups.go create mode 100644 services/network/mgmt/2021-03-01/network/availabledelegations.go create mode 100644 services/network/mgmt/2021-03-01/network/availableendpointservices.go create mode 100644 services/network/mgmt/2021-03-01/network/availableprivateendpointtypes.go create mode 100644 services/network/mgmt/2021-03-01/network/availableresourcegroupdelegations.go create mode 100644 services/network/mgmt/2021-03-01/network/availableservicealiases.go create mode 100644 services/network/mgmt/2021-03-01/network/azurefirewallfqdntags.go create mode 100644 services/network/mgmt/2021-03-01/network/azurefirewalls.go create mode 100644 services/network/mgmt/2021-03-01/network/bastionhosts.go create mode 100644 services/network/mgmt/2021-03-01/network/bgpservicecommunities.go create mode 100644 services/network/mgmt/2021-03-01/network/client.go create mode 100644 services/network/mgmt/2021-03-01/network/connectionmonitors.go create mode 100644 services/network/mgmt/2021-03-01/network/customipprefixes.go create mode 100644 services/network/mgmt/2021-03-01/network/ddoscustompolicies.go create mode 100644 services/network/mgmt/2021-03-01/network/ddosprotectionplans.go create mode 100644 services/network/mgmt/2021-03-01/network/defaultsecurityrules.go create mode 100644 services/network/mgmt/2021-03-01/network/dscpconfiguration.go create mode 100644 services/network/mgmt/2021-03-01/network/enums.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutecircuitauthorizations.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutecircuitconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutecircuitpeerings.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutecircuits.go create mode 100644 services/network/mgmt/2021-03-01/network/expressrouteconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutecrossconnectionpeerings.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutecrossconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutegateways.go create mode 100644 services/network/mgmt/2021-03-01/network/expressroutelinks.go create mode 100644 services/network/mgmt/2021-03-01/network/expressrouteports.go create mode 100644 services/network/mgmt/2021-03-01/network/expressrouteportslocations.go create mode 100644 services/network/mgmt/2021-03-01/network/expressrouteserviceproviders.go create mode 100644 services/network/mgmt/2021-03-01/network/firewallpolicies.go create mode 100644 services/network/mgmt/2021-03-01/network/firewallpolicyrulecollectiongroups.go create mode 100644 services/network/mgmt/2021-03-01/network/flowlogs.go create mode 100644 services/network/mgmt/2021-03-01/network/hubroutetables.go create mode 100644 services/network/mgmt/2021-03-01/network/hubvirtualnetworkconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/inboundnatrules.go create mode 100644 services/network/mgmt/2021-03-01/network/inboundsecurityrule.go create mode 100644 services/network/mgmt/2021-03-01/network/interfaceipconfigurations.go create mode 100644 services/network/mgmt/2021-03-01/network/interfaceloadbalancers.go create mode 100644 services/network/mgmt/2021-03-01/network/interfacesgroup.go create mode 100644 services/network/mgmt/2021-03-01/network/interfacetapconfigurations.go create mode 100644 services/network/mgmt/2021-03-01/network/ipallocations.go create mode 100644 services/network/mgmt/2021-03-01/network/ipgroups.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalancerbackendaddresspools.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalancerfrontendipconfigurations.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalancerloadbalancingrules.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalancernetworkinterfaces.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalanceroutboundrules.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalancerprobes.go create mode 100644 services/network/mgmt/2021-03-01/network/loadbalancers.go create mode 100644 services/network/mgmt/2021-03-01/network/localnetworkgateways.go create mode 100644 services/network/mgmt/2021-03-01/network/models.go create mode 100644 services/network/mgmt/2021-03-01/network/natgateways.go create mode 100644 services/network/mgmt/2021-03-01/network/natrules.go create mode 100644 services/network/mgmt/2021-03-01/network/networkapi/interfaces.go create mode 100644 services/network/mgmt/2021-03-01/network/operations.go create mode 100644 services/network/mgmt/2021-03-01/network/p2svpngateways.go create mode 100644 services/network/mgmt/2021-03-01/network/packetcaptures.go create mode 100644 services/network/mgmt/2021-03-01/network/peerexpressroutecircuitconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/privatednszonegroups.go create mode 100644 services/network/mgmt/2021-03-01/network/privateendpoints.go create mode 100644 services/network/mgmt/2021-03-01/network/privatelinkservices.go create mode 100644 services/network/mgmt/2021-03-01/network/profiles.go create mode 100644 services/network/mgmt/2021-03-01/network/publicipaddresses.go create mode 100644 services/network/mgmt/2021-03-01/network/publicipprefixes.go create mode 100644 services/network/mgmt/2021-03-01/network/resourcenavigationlinks.go create mode 100644 services/network/mgmt/2021-03-01/network/routefilterrules.go create mode 100644 services/network/mgmt/2021-03-01/network/routefilters.go create mode 100644 services/network/mgmt/2021-03-01/network/routes.go create mode 100644 services/network/mgmt/2021-03-01/network/routetables.go create mode 100644 services/network/mgmt/2021-03-01/network/securitygroups.go create mode 100644 services/network/mgmt/2021-03-01/network/securitypartnerproviders.go create mode 100644 services/network/mgmt/2021-03-01/network/securityrules.go create mode 100644 services/network/mgmt/2021-03-01/network/serviceassociationlinks.go create mode 100644 services/network/mgmt/2021-03-01/network/serviceendpointpolicies.go create mode 100644 services/network/mgmt/2021-03-01/network/serviceendpointpolicydefinitions.go create mode 100644 services/network/mgmt/2021-03-01/network/servicetaginformation.go create mode 100644 services/network/mgmt/2021-03-01/network/servicetags.go create mode 100644 services/network/mgmt/2021-03-01/network/subnets.go create mode 100644 services/network/mgmt/2021-03-01/network/usages.go create mode 100644 services/network/mgmt/2021-03-01/network/version.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualappliances.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualappliancesites.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualapplianceskus.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualhubbgpconnection.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualhubbgpconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualhubipconfiguration.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualhubroutetablev2s.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualhubs.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualnetworkgatewayconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualnetworkgatewaynatrules.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualnetworkgateways.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualnetworkpeerings.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualnetworks.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualnetworktaps.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualrouterpeerings.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualrouters.go create mode 100644 services/network/mgmt/2021-03-01/network/virtualwans.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/vpngateways.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnlinkconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnserverconfigurations.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnsitelinkconnections.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnsitelinks.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnsites.go create mode 100644 services/network/mgmt/2021-03-01/network/vpnsitesconfiguration.go create mode 100644 services/network/mgmt/2021-03-01/network/watchers.go create mode 100644 services/network/mgmt/2021-03-01/network/webapplicationfirewallpolicies.go create mode 100644 services/network/mgmt/2021-03-01/network/webcategories.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/CHANGELOG.md create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/_meta.json create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/azureadonlyauthentications.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/bigdatapools.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/client.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingrules.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/enums.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/extendedsqlpoolblobauditingpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeauthkeys.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeconnectioninfos.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimecredentials.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimemonitoringdata.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodeipaddress.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodes.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeobjectmetadata.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimes.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimestatus.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/ipfirewallrules.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/keys.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/libraries.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/library.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/models.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/operations.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnections.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnectionsprivatelinkhub.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubprivatelinkresources.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubs.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkresources.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/restorabledroppedsqlpools.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfiguration.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfigurations.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolblobauditingpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolcolumns.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolconnectionpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooldatawarehouseuseractivities.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolgeobackuppolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindowoptions.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindows.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmetadatasyncconfigs.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperationresults.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperations.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrecommendedsensitivitylabels.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolreplicationlinks.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrestorepoints.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpools.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolschemas.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsecurityalertpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsensitivitylabels.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltablecolumns.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltables.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltransparentdataencryptions.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolusages.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentrulebaselines.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessments.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentscans.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadclassifier.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadgroup.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/synapseapi/interfaces.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/version.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaceaadadmins.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedidentitysqlcontrolsettings.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverblobauditingpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverencryptionprotector.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverextendedblobauditingpolicies.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverrecoverablesqlpools.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserversecurityalertpolicy.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverusages.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlservervulnerabilityassessments.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaces.go create mode 100644 services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacesqlaadadmins.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/CHANGELOG.md delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/_meta.json delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/actions.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/alertrules.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/alertruletemplates.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/bookmarks.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/dataconnectors.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/enums.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/incidentcomments.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/incidents.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/models.go delete mode 100644 services/securityinsight/mgmt/v1.0/securityinsight/securityinsightapi/interfaces.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e7b6f3967aa..a3fda6b8b00d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # CHANGELOG +## `v57.0.0` + +### New Packages + +- `github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute` +- `github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-07-01/dataprotection` +- `github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration` +- `github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-06-01/netapp` +- `github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-03-01/network` +- `github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2021-06-01-preview/synapse` + +### Updated Packages + +| Package Path | Changelog | +| :--- | :---: | +| `github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2018-06-01/datafactory` | [details](https://github.com/Azure/azure-sdk-for-go/tree/master/services/datafactory/mgmt/2018-06-01/datafactory/CHANGELOG.md) | + +### Breaking Changes + +| Package Path | Changelog | +| :--- | :---: | +| `github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration` | [details](https://github.com/Azure/azure-sdk-for-go/tree/master/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/CHANGELOG.md) | +| `github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers` | [details](https://github.com/Azure/azure-sdk-for-go/tree/master/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/CHANGELOG.md) | +| `github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb` | [details](https://github.com/Azure/azure-sdk-for-go/tree/master/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/CHANGELOG.md) | + ## `v56.3.0` ### New Packages diff --git a/profiles/latest/compute/mgmt/compute/computeapi/models.go b/profiles/latest/compute/mgmt/compute/computeapi/models.go index f672fbcc7b84..5026725cfac7 100644 --- a/profiles/latest/compute/mgmt/compute/computeapi/models.go +++ b/profiles/latest/compute/mgmt/compute/computeapi/models.go @@ -9,7 +9,7 @@ package computeapi -import original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-04-01/compute/computeapi" +import original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/computeapi" type AvailabilitySetsClientAPI = original.AvailabilitySetsClientAPI type CapacityReservationGroupsClientAPI = original.CapacityReservationGroupsClientAPI diff --git a/profiles/latest/compute/mgmt/compute/models.go b/profiles/latest/compute/mgmt/compute/models.go index 0b490b53e0fb..d196439ada02 100644 --- a/profiles/latest/compute/mgmt/compute/models.go +++ b/profiles/latest/compute/mgmt/compute/models.go @@ -12,7 +12,7 @@ package compute import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-04-01/compute" + original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" ) const ( @@ -221,6 +221,12 @@ const ( ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = original.ExpandTypesForGetVMScaleSetsUserData ) +type ExtendedLocationType = original.ExtendedLocationType + +const ( + ExtendedLocationTypeEdgeZone ExtendedLocationType = original.ExtendedLocationTypeEdgeZone +) + type ExtendedLocationTypes = original.ExtendedLocationTypes const ( @@ -509,6 +515,13 @@ const ( PublicIPAllocationMethodStatic PublicIPAllocationMethod = original.PublicIPAllocationMethodStatic ) +type ReplicationMode = original.ReplicationMode + +const ( + ReplicationModeFull ReplicationMode = original.ReplicationModeFull + ReplicationModeShallow ReplicationMode = original.ReplicationModeShallow +) + type ReplicationState = original.ReplicationState const ( @@ -955,6 +968,7 @@ type APIErrorBase = original.APIErrorBase type AccessURI = original.AccessURI type AdditionalCapabilities = original.AdditionalCapabilities type AdditionalUnattendContent = original.AdditionalUnattendContent +type ApplicationProfile = original.ApplicationProfile type AutomaticOSUpgradePolicy = original.AutomaticOSUpgradePolicy type AutomaticOSUpgradeProperties = original.AutomaticOSUpgradeProperties type AutomaticRepairsPolicy = original.AutomaticRepairsPolicy @@ -1403,6 +1417,7 @@ type SnapshotsDeleteFuture = original.SnapshotsDeleteFuture type SnapshotsGrantAccessFuture = original.SnapshotsGrantAccessFuture type SnapshotsRevokeAccessFuture = original.SnapshotsRevokeAccessFuture type SnapshotsUpdateFuture = original.SnapshotsUpdateFuture +type SoftDeletePolicy = original.SoftDeletePolicy type SourceVault = original.SourceVault type SpotRestorePolicy = original.SpotRestorePolicy type StatusCodeCount = original.StatusCodeCount @@ -1429,7 +1444,9 @@ type UsageClient = original.UsageClient type UsageName = original.UsageName type UserArtifactManage = original.UserArtifactManage type UserArtifactSource = original.UserArtifactSource +type VMGalleryApplication = original.VMGalleryApplication type VMScaleSetConvertToSinglePlacementGroupInput = original.VMScaleSetConvertToSinglePlacementGroupInput +type VMSizeProperties = original.VMSizeProperties type VaultCertificate = original.VaultCertificate type VaultSecretGroup = original.VaultSecretGroup type VirtualHardDisk = original.VirtualHardDisk @@ -2240,6 +2257,9 @@ func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesFor func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets { return original.PossibleExpandTypesForGetVMScaleSetsValues() } +func PossibleExtendedLocationTypeValues() []ExtendedLocationType { + return original.PossibleExtendedLocationTypeValues() +} func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { return original.PossibleExtendedLocationTypesValues() } @@ -2351,6 +2371,9 @@ func PossiblePublicIPAddressSkuTierValues() []PublicIPAddressSkuTier { func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod { return original.PossiblePublicIPAllocationMethodValues() } +func PossibleReplicationModeValues() []ReplicationMode { + return original.PossibleReplicationModeValues() +} func PossibleReplicationStateValues() []ReplicationState { return original.PossibleReplicationStateValues() } diff --git a/profiles/latest/datafactory/mgmt/datafactory/models.go b/profiles/latest/datafactory/mgmt/datafactory/models.go index 9054b92f70fe..ddd120e9913d 100644 --- a/profiles/latest/datafactory/mgmt/datafactory/models.go +++ b/profiles/latest/datafactory/mgmt/datafactory/models.go @@ -19,6 +19,14 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOption + +const ( + AmazonRdsForOraclePartitionOptionDynamicRange AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOptionDynamicRange + AmazonRdsForOraclePartitionOptionNone AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOptionNone + AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable +) + type AuthenticationType = original.AuthenticationType const ( @@ -827,6 +835,7 @@ const ( TypeBasicActivityTypeExecuteDataFlow TypeBasicActivity = original.TypeBasicActivityTypeExecuteDataFlow TypeBasicActivityTypeExecutePipeline TypeBasicActivity = original.TypeBasicActivityTypeExecutePipeline TypeBasicActivityTypeExecuteSSISPackage TypeBasicActivity = original.TypeBasicActivityTypeExecuteSSISPackage + TypeBasicActivityTypeExecuteWranglingDataflow TypeBasicActivity = original.TypeBasicActivityTypeExecuteWranglingDataflow TypeBasicActivityTypeExecution TypeBasicActivity = original.TypeBasicActivityTypeExecution TypeBasicActivityTypeFilter TypeBasicActivity = original.TypeBasicActivityTypeFilter TypeBasicActivityTypeForEach TypeBasicActivity = original.TypeBasicActivityTypeForEach @@ -906,6 +915,7 @@ type TypeBasicCopySource = original.TypeBasicCopySource const ( TypeBasicCopySourceTypeAmazonMWSSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAmazonMWSSource + TypeBasicCopySourceTypeAmazonRdsForOracleSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAmazonRdsForOracleSource TypeBasicCopySourceTypeAmazonRedshiftSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAmazonRedshiftSource TypeBasicCopySourceTypeAvroSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAvroSource TypeBasicCopySourceTypeAzureBlobFSSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAzureBlobFSSource @@ -1029,14 +1039,16 @@ const ( type TypeBasicDataFlow = original.TypeBasicDataFlow const ( - TypeBasicDataFlowTypeDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeDataFlow - TypeBasicDataFlowTypeMappingDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeMappingDataFlow + TypeBasicDataFlowTypeDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeDataFlow + TypeBasicDataFlowTypeMappingDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeMappingDataFlow + TypeBasicDataFlowTypeWranglingDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeWranglingDataFlow ) type TypeBasicDataset = original.TypeBasicDataset const ( TypeBasicDatasetTypeAmazonMWSObject TypeBasicDataset = original.TypeBasicDatasetTypeAmazonMWSObject + TypeBasicDatasetTypeAmazonRdsForOracleTable TypeBasicDataset = original.TypeBasicDatasetTypeAmazonRdsForOracleTable TypeBasicDatasetTypeAmazonRedshiftTable TypeBasicDataset = original.TypeBasicDatasetTypeAmazonRedshiftTable TypeBasicDatasetTypeAmazonS3Object TypeBasicDataset = original.TypeBasicDatasetTypeAmazonS3Object TypeBasicDatasetTypeAvro TypeBasicDataset = original.TypeBasicDatasetTypeAvro @@ -1248,6 +1260,7 @@ type TypeBasicLinkedService = original.TypeBasicLinkedService const ( TypeBasicLinkedServiceTypeAmazonMWS TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonMWS + TypeBasicLinkedServiceTypeAmazonRdsForOracle TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonRdsForOracle TypeBasicLinkedServiceTypeAmazonRedshift TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonRedshift TypeBasicLinkedServiceTypeAmazonS3 TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonS3 TypeBasicLinkedServiceTypeAmazonS3Compatible TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonS3Compatible @@ -1441,6 +1454,12 @@ type AmazonMWSLinkedService = original.AmazonMWSLinkedService type AmazonMWSLinkedServiceTypeProperties = original.AmazonMWSLinkedServiceTypeProperties type AmazonMWSObjectDataset = original.AmazonMWSObjectDataset type AmazonMWSSource = original.AmazonMWSSource +type AmazonRdsForLinkedServiceTypeProperties = original.AmazonRdsForLinkedServiceTypeProperties +type AmazonRdsForOracleLinkedService = original.AmazonRdsForOracleLinkedService +type AmazonRdsForOraclePartitionSettings = original.AmazonRdsForOraclePartitionSettings +type AmazonRdsForOracleSource = original.AmazonRdsForOracleSource +type AmazonRdsForOracleTableDataset = original.AmazonRdsForOracleTableDataset +type AmazonRdsForOracleTableDatasetTypeProperties = original.AmazonRdsForOracleTableDatasetTypeProperties type AmazonRedshiftLinkedService = original.AmazonRedshiftLinkedService type AmazonRedshiftLinkedServiceTypeProperties = original.AmazonRedshiftLinkedServiceTypeProperties type AmazonRedshiftSource = original.AmazonRedshiftSource @@ -1798,8 +1817,10 @@ type ExecuteDataFlowActivityTypeProperties = original.ExecuteDataFlowActivityTyp type ExecuteDataFlowActivityTypePropertiesCompute = original.ExecuteDataFlowActivityTypePropertiesCompute type ExecutePipelineActivity = original.ExecutePipelineActivity type ExecutePipelineActivityTypeProperties = original.ExecutePipelineActivityTypeProperties +type ExecutePowerQueryActivityTypeProperties = original.ExecutePowerQueryActivityTypeProperties type ExecuteSSISPackageActivity = original.ExecuteSSISPackageActivity type ExecuteSSISPackageActivityTypeProperties = original.ExecuteSSISPackageActivityTypeProperties +type ExecuteWranglingDataflowActivity = original.ExecuteWranglingDataflowActivity type ExecutionActivity = original.ExecutionActivity type ExportSettings = original.ExportSettings type ExposureControlBatchRequest = original.ExposureControlBatchRequest @@ -2141,6 +2162,9 @@ type PostgreSQLLinkedServiceTypeProperties = original.PostgreSQLLinkedServiceTyp type PostgreSQLSource = original.PostgreSQLSource type PostgreSQLTableDataset = original.PostgreSQLTableDataset type PostgreSQLTableDatasetTypeProperties = original.PostgreSQLTableDatasetTypeProperties +type PowerQuerySink = original.PowerQuerySink +type PowerQuerySource = original.PowerQuerySource +type PowerQueryTypeProperties = original.PowerQueryTypeProperties type PrestoDatasetTypeProperties = original.PrestoDatasetTypeProperties type PrestoLinkedService = original.PrestoLinkedService type PrestoLinkedServiceTypeProperties = original.PrestoLinkedServiceTypeProperties @@ -2406,6 +2430,7 @@ type WebLinkedServiceTypeProperties = original.WebLinkedServiceTypeProperties type WebSource = original.WebSource type WebTableDataset = original.WebTableDataset type WebTableDatasetTypeProperties = original.WebTableDatasetTypeProperties +type WranglingDataFlow = original.WranglingDataFlow type XMLDataset = original.XMLDataset type XMLDatasetTypeProperties = original.XMLDatasetTypeProperties type XMLReadSettings = original.XMLReadSettings @@ -2618,6 +2643,9 @@ func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) Trigger func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleAmazonRdsForOraclePartitionOptionValues() []AmazonRdsForOraclePartitionOption { + return original.PossibleAmazonRdsForOraclePartitionOptionValues() +} func PossibleAuthenticationTypeValues() []AuthenticationType { return original.PossibleAuthenticationTypeValues() } diff --git a/profiles/latest/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go b/profiles/latest/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go index c1a56c58584d..ffdc8f0c74fc 100644 --- a/profiles/latest/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go +++ b/profiles/latest/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go @@ -9,18 +9,19 @@ package dataprotectionapi -import original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-01-01/dataprotection/dataprotectionapi" +import original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotectionapi" type BackupInstancesClientAPI = original.BackupInstancesClientAPI type BackupPoliciesClientAPI = original.BackupPoliciesClientAPI +type BackupVaultOperationResultsClientAPI = original.BackupVaultOperationResultsClientAPI type BackupVaultsClientAPI = original.BackupVaultsClientAPI -type BaseClientAPI = original.BaseClientAPI +type ClientAPI = original.ClientAPI type ExportJobsClientAPI = original.ExportJobsClientAPI type ExportJobsOperationResultClientAPI = original.ExportJobsOperationResultClientAPI -type FindRestorableTimeRangesClientAPI = original.FindRestorableTimeRangesClientAPI -type JobClientAPI = original.JobClientAPI type JobsClientAPI = original.JobsClientAPI type OperationResultClientAPI = original.OperationResultClientAPI +type OperationStatusClientAPI = original.OperationStatusClientAPI type OperationsClientAPI = original.OperationsClientAPI -type RecoveryPointClientAPI = original.RecoveryPointClientAPI type RecoveryPointsClientAPI = original.RecoveryPointsClientAPI +type ResourceGuardsClientAPI = original.ResourceGuardsClientAPI +type RestorableTimeRangesClientAPI = original.RestorableTimeRangesClientAPI diff --git a/profiles/latest/dataprotection/mgmt/dataprotection/models.go b/profiles/latest/dataprotection/mgmt/dataprotection/models.go index e229be9b6053..166a0e7e57a1 100644 --- a/profiles/latest/dataprotection/mgmt/dataprotection/models.go +++ b/profiles/latest/dataprotection/mgmt/dataprotection/models.go @@ -12,7 +12,7 @@ package dataprotection import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-01-01/dataprotection" + original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-07-01/dataprotection" ) const ( @@ -22,57 +22,57 @@ const ( type AbsoluteMarker = original.AbsoluteMarker const ( - AllBackup AbsoluteMarker = original.AllBackup - FirstOfDay AbsoluteMarker = original.FirstOfDay - FirstOfMonth AbsoluteMarker = original.FirstOfMonth - FirstOfWeek AbsoluteMarker = original.FirstOfWeek - FirstOfYear AbsoluteMarker = original.FirstOfYear + AbsoluteMarkerAllBackup AbsoluteMarker = original.AbsoluteMarkerAllBackup + AbsoluteMarkerFirstOfDay AbsoluteMarker = original.AbsoluteMarkerFirstOfDay + AbsoluteMarkerFirstOfMonth AbsoluteMarker = original.AbsoluteMarkerFirstOfMonth + AbsoluteMarkerFirstOfWeek AbsoluteMarker = original.AbsoluteMarkerFirstOfWeek + AbsoluteMarkerFirstOfYear AbsoluteMarker = original.AbsoluteMarkerFirstOfYear ) type CreatedByType = original.CreatedByType const ( - Application CreatedByType = original.Application - Key CreatedByType = original.Key - ManagedIdentity CreatedByType = original.ManagedIdentity - User CreatedByType = original.User + CreatedByTypeApplication CreatedByType = original.CreatedByTypeApplication + CreatedByTypeKey CreatedByType = original.CreatedByTypeKey + CreatedByTypeManagedIdentity CreatedByType = original.CreatedByTypeManagedIdentity + CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) type CurrentProtectionState = original.CurrentProtectionState const ( - BackupSchedulesSuspended CurrentProtectionState = original.BackupSchedulesSuspended - ConfiguringProtection CurrentProtectionState = original.ConfiguringProtection - ConfiguringProtectionFailed CurrentProtectionState = original.ConfiguringProtectionFailed - Invalid CurrentProtectionState = original.Invalid - NotProtected CurrentProtectionState = original.NotProtected - ProtectionConfigured CurrentProtectionState = original.ProtectionConfigured - ProtectionError CurrentProtectionState = original.ProtectionError - ProtectionStopped CurrentProtectionState = original.ProtectionStopped - RetentionSchedulesSuspended CurrentProtectionState = original.RetentionSchedulesSuspended - SoftDeleted CurrentProtectionState = original.SoftDeleted - SoftDeleting CurrentProtectionState = original.SoftDeleting - UpdatingProtection CurrentProtectionState = original.UpdatingProtection + CurrentProtectionStateBackupSchedulesSuspended CurrentProtectionState = original.CurrentProtectionStateBackupSchedulesSuspended + CurrentProtectionStateConfiguringProtection CurrentProtectionState = original.CurrentProtectionStateConfiguringProtection + CurrentProtectionStateConfiguringProtectionFailed CurrentProtectionState = original.CurrentProtectionStateConfiguringProtectionFailed + CurrentProtectionStateInvalid CurrentProtectionState = original.CurrentProtectionStateInvalid + CurrentProtectionStateNotProtected CurrentProtectionState = original.CurrentProtectionStateNotProtected + CurrentProtectionStateProtectionConfigured CurrentProtectionState = original.CurrentProtectionStateProtectionConfigured + CurrentProtectionStateProtectionError CurrentProtectionState = original.CurrentProtectionStateProtectionError + CurrentProtectionStateProtectionStopped CurrentProtectionState = original.CurrentProtectionStateProtectionStopped + CurrentProtectionStateRetentionSchedulesSuspended CurrentProtectionState = original.CurrentProtectionStateRetentionSchedulesSuspended + CurrentProtectionStateSoftDeleted CurrentProtectionState = original.CurrentProtectionStateSoftDeleted + CurrentProtectionStateSoftDeleting CurrentProtectionState = original.CurrentProtectionStateSoftDeleting + CurrentProtectionStateUpdatingProtection CurrentProtectionState = original.CurrentProtectionStateUpdatingProtection ) type DataStoreTypes = original.DataStoreTypes const ( - ArchiveStore DataStoreTypes = original.ArchiveStore - OperationalStore DataStoreTypes = original.OperationalStore - VaultStore DataStoreTypes = original.VaultStore + DataStoreTypesArchiveStore DataStoreTypes = original.DataStoreTypesArchiveStore + DataStoreTypesOperationalStore DataStoreTypes = original.DataStoreTypesOperationalStore + DataStoreTypesVaultStore DataStoreTypes = original.DataStoreTypesVaultStore ) type DayOfWeek = original.DayOfWeek const ( - Friday DayOfWeek = original.Friday - Monday DayOfWeek = original.Monday - Saturday DayOfWeek = original.Saturday - Sunday DayOfWeek = original.Sunday - Thursday DayOfWeek = original.Thursday - Tuesday DayOfWeek = original.Tuesday - Wednesday DayOfWeek = original.Wednesday + DayOfWeekFriday DayOfWeek = original.DayOfWeekFriday + DayOfWeekMonday DayOfWeek = original.DayOfWeekMonday + DayOfWeekSaturday DayOfWeek = original.DayOfWeekSaturday + DayOfWeekSunday DayOfWeek = original.DayOfWeekSunday + DayOfWeekThursday DayOfWeek = original.DayOfWeekThursday + DayOfWeekTuesday DayOfWeek = original.DayOfWeekTuesday + DayOfWeekWednesday DayOfWeek = original.DayOfWeekWednesday ) type FeatureSupportStatus = original.FeatureSupportStatus @@ -96,134 +96,148 @@ const ( type Month = original.Month const ( - April Month = original.April - August Month = original.August - December Month = original.December - February Month = original.February - January Month = original.January - July Month = original.July - June Month = original.June - March Month = original.March - May Month = original.May - November Month = original.November - October Month = original.October - September Month = original.September + MonthApril Month = original.MonthApril + MonthAugust Month = original.MonthAugust + MonthDecember Month = original.MonthDecember + MonthFebruary Month = original.MonthFebruary + MonthJanuary Month = original.MonthJanuary + MonthJuly Month = original.MonthJuly + MonthJune Month = original.MonthJune + MonthMarch Month = original.MonthMarch + MonthMay Month = original.MonthMay + MonthNovember Month = original.MonthNovember + MonthOctober Month = original.MonthOctober + MonthSeptember Month = original.MonthSeptember ) type ObjectType = original.ObjectType const ( - ObjectTypeAzureBackupDiscreteRecoveryPoint ObjectType = original.ObjectTypeAzureBackupDiscreteRecoveryPoint - ObjectTypeAzureBackupRecoveryPoint ObjectType = original.ObjectTypeAzureBackupRecoveryPoint + ObjectTypeAuthCredentials ObjectType = original.ObjectTypeAuthCredentials + ObjectTypeSecretStoreBasedAuthCredentials ObjectType = original.ObjectTypeSecretStoreBasedAuthCredentials +) + +type ObjectTypeBasicAzureBackupRecoveryPoint = original.ObjectTypeBasicAzureBackupRecoveryPoint + +const ( + ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint ObjectTypeBasicAzureBackupRecoveryPoint = original.ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint + ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint ObjectTypeBasicAzureBackupRecoveryPoint = original.ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint ) type ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequest const ( - ObjectTypeAzureBackupRecoveryPointBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRecoveryPointBasedRestoreRequest - ObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest - ObjectTypeAzureBackupRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRestoreRequest - ObjectTypeAzureBackupRestoreWithRehydrationRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRestoreWithRehydrationRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest ) type ObjectTypeBasicBackupCriteria = original.ObjectTypeBasicBackupCriteria const ( - ObjectTypeBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeBackupCriteria - ObjectTypeScheduleBasedBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeScheduleBasedBackupCriteria + ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria + ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria ) type ObjectTypeBasicBackupParameters = original.ObjectTypeBasicBackupParameters const ( - ObjectTypeAzureBackupParams ObjectTypeBasicBackupParameters = original.ObjectTypeAzureBackupParams - ObjectTypeBackupParameters ObjectTypeBasicBackupParameters = original.ObjectTypeBackupParameters + ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams ObjectTypeBasicBackupParameters = original.ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams + ObjectTypeBasicBackupParametersObjectTypeBackupParameters ObjectTypeBasicBackupParameters = original.ObjectTypeBasicBackupParametersObjectTypeBackupParameters ) type ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBasicBaseBackupPolicy const ( - ObjectTypeBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBackupPolicy - ObjectTypeBaseBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBaseBackupPolicy + ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy + ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy ) type ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRule const ( - ObjectTypeAzureBackupRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeAzureBackupRule - ObjectTypeAzureRetentionRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeAzureRetentionRule - ObjectTypeBasePolicyRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasePolicyRule + ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule + ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule + ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule ) type ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOption const ( - ObjectTypeCopyOnExpiryOption ObjectTypeBasicCopyOption = original.ObjectTypeCopyOnExpiryOption - ObjectTypeCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeCopyOption - ObjectTypeCustomCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeCustomCopyOption - ObjectTypeImmediateCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeImmediateCopyOption + ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption + ObjectTypeBasicCopyOptionObjectTypeCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeCopyOption + ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption + ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption ) type ObjectTypeBasicDataStoreParameters = original.ObjectTypeBasicDataStoreParameters const ( - ObjectTypeAzureOperationalStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeAzureOperationalStoreParameters - ObjectTypeDataStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeDataStoreParameters + ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters + ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters ) type ObjectTypeBasicDeleteOption = original.ObjectTypeBasicDeleteOption const ( - ObjectTypeAbsoluteDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeAbsoluteDeleteOption - ObjectTypeDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeDeleteOption + ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption + ObjectTypeBasicDeleteOptionObjectTypeDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeBasicDeleteOptionObjectTypeDeleteOption ) type ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeBasicFeatureValidationRequestBase const ( - ObjectTypeFeatureValidationRequest ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeFeatureValidationRequest - ObjectTypeFeatureValidationRequestBase ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeFeatureValidationRequestBase + ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest + ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase ) type ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeBasicFeatureValidationResponseBase const ( - ObjectTypeFeatureValidationResponse ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeFeatureValidationResponse - ObjectTypeFeatureValidationResponseBase ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeFeatureValidationResponseBase + ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse + ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase ) type ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeBasicItemLevelRestoreCriteria const ( - ObjectTypeItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeItemLevelRestoreCriteria - ObjectTypeRangeBasedItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeRangeBasedItemLevelRestoreCriteria + ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria + ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria +) + +type ObjectTypeBasicOperationExtendedInfo = original.ObjectTypeBasicOperationExtendedInfo + +const ( + ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo ObjectTypeBasicOperationExtendedInfo = original.ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo + ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo ObjectTypeBasicOperationExtendedInfo = original.ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo ) type ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBase const ( - ObjectTypeItemLevelRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeItemLevelRestoreTargetInfo - ObjectTypeRestoreFilesTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeRestoreFilesTargetInfo - ObjectTypeRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeRestoreTargetInfo - ObjectTypeRestoreTargetInfoBase ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeRestoreTargetInfoBase + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase ) type ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContext const ( - ObjectTypeAdhocBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeAdhocBasedTriggerContext - ObjectTypeScheduleBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeScheduleBasedTriggerContext - ObjectTypeTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeTriggerContext + ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext + ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext + ObjectTypeBasicTriggerContextObjectTypeTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContextObjectTypeTriggerContext ) type ProvisioningState = original.ProvisioningState const ( - Failed ProvisioningState = original.Failed - Provisioning ProvisioningState = original.Provisioning - Succeeded ProvisioningState = original.Succeeded - Unknown ProvisioningState = original.Unknown - Updating ProvisioningState = original.Updating + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateProvisioning ProvisioningState = original.ProvisioningStateProvisioning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + ProvisioningStateUnknown ProvisioningState = original.ProvisioningStateUnknown + ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating ) type RehydrationPriority = original.RehydrationPriority @@ -237,11 +251,26 @@ const ( type RehydrationStatus = original.RehydrationStatus const ( - COMPLETED RehydrationStatus = original.COMPLETED - CREATEINPROGRESS RehydrationStatus = original.CREATEINPROGRESS - DELETED RehydrationStatus = original.DELETED - DELETEINPROGRESS RehydrationStatus = original.DELETEINPROGRESS - FAILED RehydrationStatus = original.FAILED + RehydrationStatusCOMPLETED RehydrationStatus = original.RehydrationStatusCOMPLETED + RehydrationStatusCREATEINPROGRESS RehydrationStatus = original.RehydrationStatusCREATEINPROGRESS + RehydrationStatusDELETED RehydrationStatus = original.RehydrationStatusDELETED + RehydrationStatusDELETEINPROGRESS RehydrationStatus = original.RehydrationStatusDELETEINPROGRESS + RehydrationStatusFAILED RehydrationStatus = original.RehydrationStatusFAILED +) + +type ResourceMoveState = original.ResourceMoveState + +const ( + ResourceMoveStateCommitFailed ResourceMoveState = original.ResourceMoveStateCommitFailed + ResourceMoveStateCommitTimedout ResourceMoveState = original.ResourceMoveStateCommitTimedout + ResourceMoveStateCriticalFailure ResourceMoveState = original.ResourceMoveStateCriticalFailure + ResourceMoveStateFailed ResourceMoveState = original.ResourceMoveStateFailed + ResourceMoveStateInProgress ResourceMoveState = original.ResourceMoveStateInProgress + ResourceMoveStateMoveSucceeded ResourceMoveState = original.ResourceMoveStateMoveSucceeded + ResourceMoveStatePartialSuccess ResourceMoveState = original.ResourceMoveStatePartialSuccess + ResourceMoveStatePrepareFailed ResourceMoveState = original.ResourceMoveStatePrepareFailed + ResourceMoveStatePrepareTimedout ResourceMoveState = original.ResourceMoveStatePrepareTimedout + ResourceMoveStateUnknown ResourceMoveState = original.ResourceMoveStateUnknown ) type RestoreSourceDataStoreType = original.RestoreSourceDataStoreType @@ -260,6 +289,13 @@ const ( RestoreTargetLocationTypeInvalid RestoreTargetLocationType = original.RestoreTargetLocationTypeInvalid ) +type SecretStoreType = original.SecretStoreType + +const ( + SecretStoreTypeAzureKeyVault SecretStoreType = original.SecretStoreTypeAzureKeyVault + SecretStoreTypeInvalid SecretStoreType = original.SecretStoreTypeInvalid +) + type SourceDataStoreType = original.SourceDataStoreType const ( @@ -290,18 +326,18 @@ const ( type StorageSettingTypes = original.StorageSettingTypes const ( - GeoRedundant StorageSettingTypes = original.GeoRedundant - LocallyRedundant StorageSettingTypes = original.LocallyRedundant + StorageSettingTypesGeoRedundant StorageSettingTypes = original.StorageSettingTypesGeoRedundant + StorageSettingTypesLocallyRedundant StorageSettingTypes = original.StorageSettingTypesLocallyRedundant ) type WeekNumber = original.WeekNumber const ( - First WeekNumber = original.First - Fourth WeekNumber = original.Fourth - Last WeekNumber = original.Last - Second WeekNumber = original.Second - Third WeekNumber = original.Third + WeekNumberFirst WeekNumber = original.WeekNumberFirst + WeekNumberFourth WeekNumber = original.WeekNumberFourth + WeekNumberLast WeekNumber = original.WeekNumberLast + WeekNumberSecond WeekNumber = original.WeekNumberSecond + WeekNumberThird WeekNumber = original.WeekNumberThird ) type AbsoluteDeleteOption = original.AbsoluteDeleteOption @@ -309,6 +345,7 @@ type AdHocBackupRuleOptions = original.AdHocBackupRuleOptions type AdhocBackupTriggerOption = original.AdhocBackupTriggerOption type AdhocBasedTaggingCriteria = original.AdhocBasedTaggingCriteria type AdhocBasedTriggerContext = original.AdhocBasedTriggerContext +type AuthCredentials = original.AuthCredentials type AzureBackupDiscreteRecoveryPoint = original.AzureBackupDiscreteRecoveryPoint type AzureBackupFindRestorableTimeRangesRequest = original.AzureBackupFindRestorableTimeRangesRequest type AzureBackupFindRestorableTimeRangesRequestResource = original.AzureBackupFindRestorableTimeRangesRequestResource @@ -346,19 +383,20 @@ type BackupInstancesDeleteFuture = original.BackupInstancesDeleteFuture type BackupInstancesTriggerRehydrateFuture = original.BackupInstancesTriggerRehydrateFuture type BackupInstancesTriggerRestoreFuture = original.BackupInstancesTriggerRestoreFuture type BackupInstancesValidateForBackupFuture = original.BackupInstancesValidateForBackupFuture -type BackupInstancesValidateRestoreFuture = original.BackupInstancesValidateRestoreFuture +type BackupInstancesValidateForRestoreFuture = original.BackupInstancesValidateForRestoreFuture type BackupParameters = original.BackupParameters type BackupPoliciesClient = original.BackupPoliciesClient type BackupPolicy = original.BackupPolicy type BackupSchedule = original.BackupSchedule type BackupVault = original.BackupVault +type BackupVaultOperationResultsClient = original.BackupVaultOperationResultsClient type BackupVaultResource = original.BackupVaultResource type BackupVaultResourceList = original.BackupVaultResourceList type BackupVaultResourceListIterator = original.BackupVaultResourceListIterator type BackupVaultResourceListPage = original.BackupVaultResourceListPage type BackupVaultsClient = original.BackupVaultsClient type BackupVaultsCreateOrUpdateFuture = original.BackupVaultsCreateOrUpdateFuture -type BackupVaultsPatchFuture = original.BackupVaultsPatchFuture +type BackupVaultsUpdateFuture = original.BackupVaultsUpdateFuture type BaseBackupPolicy = original.BaseBackupPolicy type BaseBackupPolicyResource = original.BaseBackupPolicyResource type BaseBackupPolicyResourceList = original.BaseBackupPolicyResourceList @@ -366,6 +404,7 @@ type BaseBackupPolicyResourceListIterator = original.BaseBackupPolicyResourceLis type BaseBackupPolicyResourceListPage = original.BaseBackupPolicyResourceListPage type BaseClient = original.BaseClient type BasePolicyRule = original.BasePolicyRule +type BasicAuthCredentials = original.BasicAuthCredentials type BasicAzureBackupRecoveryPoint = original.BasicAzureBackupRecoveryPoint type BasicAzureBackupRecoveryPointBasedRestoreRequest = original.BasicAzureBackupRecoveryPointBasedRestoreRequest type BasicAzureBackupRestoreRequest = original.BasicAzureBackupRestoreRequest @@ -379,10 +418,12 @@ type BasicDeleteOption = original.BasicDeleteOption type BasicFeatureValidationRequestBase = original.BasicFeatureValidationRequestBase type BasicFeatureValidationResponseBase = original.BasicFeatureValidationResponseBase type BasicItemLevelRestoreCriteria = original.BasicItemLevelRestoreCriteria +type BasicOperationExtendedInfo = original.BasicOperationExtendedInfo type BasicRestoreTargetInfoBase = original.BasicRestoreTargetInfoBase type BasicTriggerContext = original.BasicTriggerContext type CheckNameAvailabilityRequest = original.CheckNameAvailabilityRequest type CheckNameAvailabilityResult = original.CheckNameAvailabilityResult +type Client = original.Client type ClientDiscoveryDisplay = original.ClientDiscoveryDisplay type ClientDiscoveryForLogSpecification = original.ClientDiscoveryForLogSpecification type ClientDiscoveryForProperties = original.ClientDiscoveryForProperties @@ -401,6 +442,10 @@ type Datasource = original.Datasource type DatasourceSet = original.DatasourceSet type Day = original.Day type DeleteOption = original.DeleteOption +type DppBaseResource = original.DppBaseResource +type DppBaseResourceList = original.DppBaseResourceList +type DppBaseResourceListIterator = original.DppBaseResourceListIterator +type DppBaseResourceListPage = original.DppBaseResourceListPage type DppIdentityDetails = original.DppIdentityDetails type DppResource = original.DppResource type DppResourceList = original.DppResourceList @@ -418,12 +463,10 @@ type FeatureValidationRequestBase = original.FeatureValidationRequestBase type FeatureValidationResponse = original.FeatureValidationResponse type FeatureValidationResponseBase = original.FeatureValidationResponseBase type FeatureValidationResponseBaseModel = original.FeatureValidationResponseBaseModel -type FindRestorableTimeRangesClient = original.FindRestorableTimeRangesClient type ImmediateCopyOption = original.ImmediateCopyOption type InnerError = original.InnerError type ItemLevelRestoreCriteria = original.ItemLevelRestoreCriteria type ItemLevelRestoreTargetInfo = original.ItemLevelRestoreTargetInfo -type JobClient = original.JobClient type JobExtendedInfo = original.JobExtendedInfo type JobSubTask = original.JobSubTask type JobsClient = original.JobsClient @@ -431,17 +474,26 @@ type OperationExtendedInfo = original.OperationExtendedInfo type OperationJobExtendedInfo = original.OperationJobExtendedInfo type OperationResource = original.OperationResource type OperationResultClient = original.OperationResultClient +type OperationStatusClient = original.OperationStatusClient type OperationsClient = original.OperationsClient type PatchResourceRequestInput = original.PatchResourceRequestInput type PolicyInfo = original.PolicyInfo type PolicyParameters = original.PolicyParameters type ProtectionStatusDetails = original.ProtectionStatusDetails type RangeBasedItemLevelRestoreCriteria = original.RangeBasedItemLevelRestoreCriteria -type RecoveryPointClient = original.RecoveryPointClient type RecoveryPointDataStoreDetails = original.RecoveryPointDataStoreDetails type RecoveryPointsClient = original.RecoveryPointsClient type RecoveryPointsFilters = original.RecoveryPointsFilters +type ResourceGuard = original.ResourceGuard +type ResourceGuardOperation = original.ResourceGuardOperation +type ResourceGuardResource = original.ResourceGuardResource +type ResourceGuardResourceList = original.ResourceGuardResourceList +type ResourceGuardResourceListIterator = original.ResourceGuardResourceListIterator +type ResourceGuardResourceListPage = original.ResourceGuardResourceListPage +type ResourceGuardsClient = original.ResourceGuardsClient +type ResourceMoveDetails = original.ResourceMoveDetails type RestorableTimeRange = original.RestorableTimeRange +type RestorableTimeRangesClient = original.RestorableTimeRangesClient type RestoreFilesTargetInfo = original.RestoreFilesTargetInfo type RestoreJobRecoveryPointDetails = original.RestoreJobRecoveryPointDetails type RestoreTargetInfo = original.RestoreTargetInfo @@ -449,6 +501,8 @@ type RestoreTargetInfoBase = original.RestoreTargetInfoBase type RetentionTag = original.RetentionTag type ScheduleBasedBackupCriteria = original.ScheduleBasedBackupCriteria type ScheduleBasedTriggerContext = original.ScheduleBasedTriggerContext +type SecretStoreBasedAuthCredentials = original.SecretStoreBasedAuthCredentials +type SecretStoreResource = original.SecretStoreResource type SourceLifeCycle = original.SourceLifeCycle type StorageSetting = original.StorageSetting type SupportedFeature = original.SupportedFeature @@ -495,6 +549,12 @@ func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient { return original.NewBackupPoliciesClientWithBaseURI(baseURI, subscriptionID) } +func NewBackupVaultOperationResultsClient(subscriptionID string) BackupVaultOperationResultsClient { + return original.NewBackupVaultOperationResultsClient(subscriptionID) +} +func NewBackupVaultOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) BackupVaultOperationResultsClient { + return original.NewBackupVaultOperationResultsClientWithBaseURI(baseURI, subscriptionID) +} func NewBackupVaultResourceListIterator(page BackupVaultResourceListPage) BackupVaultResourceListIterator { return original.NewBackupVaultResourceListIterator(page) } @@ -513,12 +573,24 @@ func NewBaseBackupPolicyResourceListIterator(page BaseBackupPolicyResourceListPa func NewBaseBackupPolicyResourceListPage(cur BaseBackupPolicyResourceList, getNextPage func(context.Context, BaseBackupPolicyResourceList) (BaseBackupPolicyResourceList, error)) BaseBackupPolicyResourceListPage { return original.NewBaseBackupPolicyResourceListPage(cur, getNextPage) } +func NewClient(subscriptionID string) Client { + return original.NewClient(subscriptionID) +} func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { return original.NewClientDiscoveryResponseIterator(page) } func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { return original.NewClientDiscoveryResponsePage(cur, getNextPage) } +func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { + return original.NewClientWithBaseURI(baseURI, subscriptionID) +} +func NewDppBaseResourceListIterator(page DppBaseResourceListPage) DppBaseResourceListIterator { + return original.NewDppBaseResourceListIterator(page) +} +func NewDppBaseResourceListPage(cur DppBaseResourceList, getNextPage func(context.Context, DppBaseResourceList) (DppBaseResourceList, error)) DppBaseResourceListPage { + return original.NewDppBaseResourceListPage(cur, getNextPage) +} func NewExportJobsClient(subscriptionID string) ExportJobsClient { return original.NewExportJobsClient(subscriptionID) } @@ -531,18 +603,6 @@ func NewExportJobsOperationResultClient(subscriptionID string) ExportJobsOperati func NewExportJobsOperationResultClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultClient { return original.NewExportJobsOperationResultClientWithBaseURI(baseURI, subscriptionID) } -func NewFindRestorableTimeRangesClient(subscriptionID string) FindRestorableTimeRangesClient { - return original.NewFindRestorableTimeRangesClient(subscriptionID) -} -func NewFindRestorableTimeRangesClientWithBaseURI(baseURI string, subscriptionID string) FindRestorableTimeRangesClient { - return original.NewFindRestorableTimeRangesClientWithBaseURI(baseURI, subscriptionID) -} -func NewJobClient(subscriptionID string) JobClient { - return original.NewJobClient(subscriptionID) -} -func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { - return original.NewJobClientWithBaseURI(baseURI, subscriptionID) -} func NewJobsClient(subscriptionID string) JobsClient { return original.NewJobsClient(subscriptionID) } @@ -555,24 +615,42 @@ func NewOperationResultClient(subscriptionID string) OperationResultClient { func NewOperationResultClientWithBaseURI(baseURI string, subscriptionID string) OperationResultClient { return original.NewOperationResultClientWithBaseURI(baseURI, subscriptionID) } +func NewOperationStatusClient(subscriptionID string) OperationStatusClient { + return original.NewOperationStatusClient(subscriptionID) +} +func NewOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusClient { + return original.NewOperationStatusClientWithBaseURI(baseURI, subscriptionID) +} func NewOperationsClient(subscriptionID string) OperationsClient { return original.NewOperationsClient(subscriptionID) } func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } -func NewRecoveryPointClient(subscriptionID string) RecoveryPointClient { - return original.NewRecoveryPointClient(subscriptionID) -} -func NewRecoveryPointClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointClient { - return original.NewRecoveryPointClientWithBaseURI(baseURI, subscriptionID) -} func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient { return original.NewRecoveryPointsClient(subscriptionID) } func NewRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointsClient { return original.NewRecoveryPointsClientWithBaseURI(baseURI, subscriptionID) } +func NewResourceGuardResourceListIterator(page ResourceGuardResourceListPage) ResourceGuardResourceListIterator { + return original.NewResourceGuardResourceListIterator(page) +} +func NewResourceGuardResourceListPage(cur ResourceGuardResourceList, getNextPage func(context.Context, ResourceGuardResourceList) (ResourceGuardResourceList, error)) ResourceGuardResourceListPage { + return original.NewResourceGuardResourceListPage(cur, getNextPage) +} +func NewResourceGuardsClient(subscriptionID string) ResourceGuardsClient { + return original.NewResourceGuardsClient(subscriptionID) +} +func NewResourceGuardsClientWithBaseURI(baseURI string, subscriptionID string) ResourceGuardsClient { + return original.NewResourceGuardsClientWithBaseURI(baseURI, subscriptionID) +} +func NewRestorableTimeRangesClient(subscriptionID string) RestorableTimeRangesClient { + return original.NewRestorableTimeRangesClient(subscriptionID) +} +func NewRestorableTimeRangesClientWithBaseURI(baseURI string, subscriptionID string) RestorableTimeRangesClient { + return original.NewRestorableTimeRangesClientWithBaseURI(baseURI, subscriptionID) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } @@ -600,6 +678,9 @@ func PossibleFeatureTypeValues() []FeatureType { func PossibleMonthValues() []Month { return original.PossibleMonthValues() } +func PossibleObjectTypeBasicAzureBackupRecoveryPointValues() []ObjectTypeBasicAzureBackupRecoveryPoint { + return original.PossibleObjectTypeBasicAzureBackupRecoveryPointValues() +} func PossibleObjectTypeBasicAzureBackupRestoreRequestValues() []ObjectTypeBasicAzureBackupRestoreRequest { return original.PossibleObjectTypeBasicAzureBackupRestoreRequestValues() } @@ -633,6 +714,9 @@ func PossibleObjectTypeBasicFeatureValidationResponseBaseValues() []ObjectTypeBa func PossibleObjectTypeBasicItemLevelRestoreCriteriaValues() []ObjectTypeBasicItemLevelRestoreCriteria { return original.PossibleObjectTypeBasicItemLevelRestoreCriteriaValues() } +func PossibleObjectTypeBasicOperationExtendedInfoValues() []ObjectTypeBasicOperationExtendedInfo { + return original.PossibleObjectTypeBasicOperationExtendedInfoValues() +} func PossibleObjectTypeBasicRestoreTargetInfoBaseValues() []ObjectTypeBasicRestoreTargetInfoBase { return original.PossibleObjectTypeBasicRestoreTargetInfoBaseValues() } @@ -651,12 +735,18 @@ func PossibleRehydrationPriorityValues() []RehydrationPriority { func PossibleRehydrationStatusValues() []RehydrationStatus { return original.PossibleRehydrationStatusValues() } +func PossibleResourceMoveStateValues() []ResourceMoveState { + return original.PossibleResourceMoveStateValues() +} func PossibleRestoreSourceDataStoreTypeValues() []RestoreSourceDataStoreType { return original.PossibleRestoreSourceDataStoreTypeValues() } func PossibleRestoreTargetLocationTypeValues() []RestoreTargetLocationType { return original.PossibleRestoreTargetLocationTypeValues() } +func PossibleSecretStoreTypeValues() []SecretStoreType { + return original.PossibleSecretStoreTypeValues() +} func PossibleSourceDataStoreTypeValues() []SourceDataStoreType { return original.PossibleSourceDataStoreTypeValues() } diff --git a/profiles/latest/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go b/profiles/latest/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go index 46bbbe661702..1eaeea669c47 100644 --- a/profiles/latest/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go +++ b/profiles/latest/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go @@ -9,10 +9,12 @@ package guestconfigurationapi -import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/guestconfigurationapi" +import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/guestconfigurationapi" type AssignmentReportsClientAPI = original.AssignmentReportsClientAPI +type AssignmentReportsVMSSClientAPI = original.AssignmentReportsVMSSClientAPI type AssignmentsClientAPI = original.AssignmentsClientAPI +type AssignmentsVMSSClientAPI = original.AssignmentsVMSSClientAPI type HCRPAssignmentReportsClientAPI = original.HCRPAssignmentReportsClientAPI type HCRPAssignmentsClientAPI = original.HCRPAssignmentsClientAPI type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/latest/guestconfiguration/mgmt/guestconfiguration/models.go b/profiles/latest/guestconfiguration/mgmt/guestconfiguration/models.go index df72a263f5f6..9259859b9a1c 100644 --- a/profiles/latest/guestconfiguration/mgmt/guestconfiguration/models.go +++ b/profiles/latest/guestconfiguration/mgmt/guestconfiguration/models.go @@ -9,7 +9,7 @@ package guestconfiguration -import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration" +import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration" const ( DefaultBaseURI = original.DefaultBaseURI @@ -18,46 +18,64 @@ const ( type ActionAfterReboot = original.ActionAfterReboot const ( - ContinueConfiguration ActionAfterReboot = original.ContinueConfiguration - StopConfiguration ActionAfterReboot = original.StopConfiguration + ActionAfterRebootContinueConfiguration ActionAfterReboot = original.ActionAfterRebootContinueConfiguration + ActionAfterRebootStopConfiguration ActionAfterReboot = original.ActionAfterRebootStopConfiguration +) + +type AssignmentType = original.AssignmentType + +const ( + AssignmentTypeApplyAndAutoCorrect AssignmentType = original.AssignmentTypeApplyAndAutoCorrect + AssignmentTypeApplyAndMonitor AssignmentType = original.AssignmentTypeApplyAndMonitor + AssignmentTypeAudit AssignmentType = original.AssignmentTypeAudit + AssignmentTypeDeployAndAutoCorrect AssignmentType = original.AssignmentTypeDeployAndAutoCorrect ) type ComplianceStatus = original.ComplianceStatus const ( - Compliant ComplianceStatus = original.Compliant - NonCompliant ComplianceStatus = original.NonCompliant - Pending ComplianceStatus = original.Pending + ComplianceStatusCompliant ComplianceStatus = original.ComplianceStatusCompliant + ComplianceStatusNonCompliant ComplianceStatus = original.ComplianceStatusNonCompliant + ComplianceStatusPending ComplianceStatus = original.ComplianceStatusPending ) type ConfigurationMode = original.ConfigurationMode const ( - ApplyAndAutoCorrect ConfigurationMode = original.ApplyAndAutoCorrect - ApplyAndMonitor ConfigurationMode = original.ApplyAndMonitor - ApplyOnly ConfigurationMode = original.ApplyOnly + ConfigurationModeApplyAndAutoCorrect ConfigurationMode = original.ConfigurationModeApplyAndAutoCorrect + ConfigurationModeApplyAndMonitor ConfigurationMode = original.ConfigurationModeApplyAndMonitor + ConfigurationModeApplyOnly ConfigurationMode = original.ConfigurationModeApplyOnly +) + +type CreatedByType = original.CreatedByType + +const ( + CreatedByTypeApplication CreatedByType = original.CreatedByTypeApplication + CreatedByTypeKey CreatedByType = original.CreatedByTypeKey + CreatedByTypeManagedIdentity CreatedByType = original.CreatedByTypeManagedIdentity + CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) type Kind = original.Kind const ( - DSC Kind = original.DSC + KindDSC Kind = original.KindDSC ) type ProvisioningState = original.ProvisioningState const ( - Canceled ProvisioningState = original.Canceled - Created ProvisioningState = original.Created - Failed ProvisioningState = original.Failed - Succeeded ProvisioningState = original.Succeeded + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded ) type Type = original.Type const ( - Consistency Type = original.Consistency - Initial Type = original.Initial + TypeConsistency Type = original.TypeConsistency + TypeInitial Type = original.TypeInitial ) type Assignment = original.Assignment @@ -72,7 +90,9 @@ type AssignmentReportResource = original.AssignmentReportResource type AssignmentReportResourceComplianceReason = original.AssignmentReportResourceComplianceReason type AssignmentReportType = original.AssignmentReportType type AssignmentReportsClient = original.AssignmentReportsClient +type AssignmentReportsVMSSClient = original.AssignmentReportsVMSSClient type AssignmentsClient = original.AssignmentsClient +type AssignmentsVMSSClient = original.AssignmentsVMSSClient type BaseClient = original.BaseClient type ConfigurationInfo = original.ConfigurationInfo type ConfigurationParameter = original.ConfigurationParameter @@ -89,8 +109,10 @@ type OperationProperties = original.OperationProperties type OperationsClient = original.OperationsClient type ProxyResource = original.ProxyResource type Resource = original.Resource +type SystemData = original.SystemData type TrackedResource = original.TrackedResource type VMInfo = original.VMInfo +type VMSSVMInfo = original.VMSSVMInfo func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -101,12 +123,24 @@ func NewAssignmentReportsClient(subscriptionID string) AssignmentReportsClient { func NewAssignmentReportsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentReportsClient { return original.NewAssignmentReportsClientWithBaseURI(baseURI, subscriptionID) } +func NewAssignmentReportsVMSSClient(subscriptionID string) AssignmentReportsVMSSClient { + return original.NewAssignmentReportsVMSSClient(subscriptionID) +} +func NewAssignmentReportsVMSSClientWithBaseURI(baseURI string, subscriptionID string) AssignmentReportsVMSSClient { + return original.NewAssignmentReportsVMSSClientWithBaseURI(baseURI, subscriptionID) +} func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return original.NewAssignmentsClient(subscriptionID) } func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient { return original.NewAssignmentsClientWithBaseURI(baseURI, subscriptionID) } +func NewAssignmentsVMSSClient(subscriptionID string) AssignmentsVMSSClient { + return original.NewAssignmentsVMSSClient(subscriptionID) +} +func NewAssignmentsVMSSClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsVMSSClient { + return original.NewAssignmentsVMSSClientWithBaseURI(baseURI, subscriptionID) +} func NewHCRPAssignmentReportsClient(subscriptionID string) HCRPAssignmentReportsClient { return original.NewHCRPAssignmentReportsClient(subscriptionID) } @@ -131,12 +165,18 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleActionAfterRebootValues() []ActionAfterReboot { return original.PossibleActionAfterRebootValues() } +func PossibleAssignmentTypeValues() []AssignmentType { + return original.PossibleAssignmentTypeValues() +} func PossibleComplianceStatusValues() []ComplianceStatus { return original.PossibleComplianceStatusValues() } func PossibleConfigurationModeValues() []ConfigurationMode { return original.PossibleConfigurationModeValues() } +func PossibleCreatedByTypeValues() []CreatedByType { + return original.PossibleCreatedByTypeValues() +} func PossibleKindValues() []Kind { return original.PossibleKindValues() } diff --git a/profiles/latest/netapp/mgmt/netapp/models.go b/profiles/latest/netapp/mgmt/netapp/models.go index 2490483b101a..d1a56bfae30d 100644 --- a/profiles/latest/netapp/mgmt/netapp/models.go +++ b/profiles/latest/netapp/mgmt/netapp/models.go @@ -12,7 +12,7 @@ package netapp import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-04-01/netapp" + original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-06-01/netapp" ) const ( @@ -29,6 +29,13 @@ const ( ActiveDirectoryStatusUpdating ActiveDirectoryStatus = original.ActiveDirectoryStatusUpdating ) +type AvsDataStore = original.AvsDataStore + +const ( + AvsDataStoreDisabled AvsDataStore = original.AvsDataStoreDisabled + AvsDataStoreEnabled AvsDataStore = original.AvsDataStoreEnabled +) + type BackupType = original.BackupType const ( @@ -70,6 +77,13 @@ const ( CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) +type EncryptionType = original.EncryptionType + +const ( + EncryptionTypeDouble EncryptionType = original.EncryptionTypeDouble + EncryptionTypeSingle EncryptionType = original.EncryptionTypeSingle +) + type EndpointType = original.EndpointType const ( @@ -84,6 +98,12 @@ const ( InAvailabilityReasonTypeInvalid InAvailabilityReasonType = original.InAvailabilityReasonTypeInvalid ) +type MetricAggregationType = original.MetricAggregationType + +const ( + MetricAggregationTypeAverage MetricAggregationType = original.MetricAggregationTypeAverage +) + type MirrorState = original.MirrorState const ( @@ -124,9 +144,10 @@ const ( type ServiceLevel = original.ServiceLevel const ( - ServiceLevelPremium ServiceLevel = original.ServiceLevelPremium - ServiceLevelStandard ServiceLevel = original.ServiceLevelStandard - ServiceLevelUltra ServiceLevel = original.ServiceLevelUltra + ServiceLevelPremium ServiceLevel = original.ServiceLevelPremium + ServiceLevelStandard ServiceLevel = original.ServiceLevelStandard + ServiceLevelStandardZRS ServiceLevel = original.ServiceLevelStandardZRS + ServiceLevelUltra ServiceLevel = original.ServiceLevelUltra ) type Account = original.Account @@ -343,6 +364,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleActiveDirectoryStatusValues() []ActiveDirectoryStatus { return original.PossibleActiveDirectoryStatusValues() } +func PossibleAvsDataStoreValues() []AvsDataStore { + return original.PossibleAvsDataStoreValues() +} func PossibleBackupTypeValues() []BackupType { return original.PossibleBackupTypeValues() } @@ -358,12 +382,18 @@ func PossibleChownModeValues() []ChownMode { func PossibleCreatedByTypeValues() []CreatedByType { return original.PossibleCreatedByTypeValues() } +func PossibleEncryptionTypeValues() []EncryptionType { + return original.PossibleEncryptionTypeValues() +} func PossibleEndpointTypeValues() []EndpointType { return original.PossibleEndpointTypeValues() } func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { return original.PossibleInAvailabilityReasonTypeValues() } +func PossibleMetricAggregationTypeValues() []MetricAggregationType { + return original.PossibleMetricAggregationTypeValues() +} func PossibleMirrorStateValues() []MirrorState { return original.PossibleMirrorStateValues() } diff --git a/profiles/latest/netapp/mgmt/netapp/netappapi/models.go b/profiles/latest/netapp/mgmt/netapp/netappapi/models.go index 41df0539c47c..df5e5cba91a2 100644 --- a/profiles/latest/netapp/mgmt/netapp/netappapi/models.go +++ b/profiles/latest/netapp/mgmt/netapp/netappapi/models.go @@ -9,7 +9,7 @@ package netappapi -import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-04-01/netapp/netappapi" +import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-06-01/netapp/netappapi" type AccountBackupsClientAPI = original.AccountBackupsClientAPI type AccountsClientAPI = original.AccountsClientAPI diff --git a/profiles/latest/network/mgmt/network/models.go b/profiles/latest/network/mgmt/network/models.go index 2306b525c593..66f7db9535af 100644 --- a/profiles/latest/network/mgmt/network/models.go +++ b/profiles/latest/network/mgmt/network/models.go @@ -12,7 +12,7 @@ package network import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" + original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-03-01/network" ) const ( @@ -57,6 +57,14 @@ const ( ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = original.ApplicationGatewayFirewallModePrevention ) +type ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithm + +const ( + ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithmIPHash + ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithmLeastConnections + ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithmRoundRobin +) + type ApplicationGatewayOperationalState = original.ApplicationGatewayOperationalState const ( @@ -1442,6 +1450,7 @@ type ApplicationGatewayFrontendIPConfiguration = original.ApplicationGatewayFron type ApplicationGatewayFrontendIPConfigurationPropertiesFormat = original.ApplicationGatewayFrontendIPConfigurationPropertiesFormat type ApplicationGatewayFrontendPort = original.ApplicationGatewayFrontendPort type ApplicationGatewayFrontendPortPropertiesFormat = original.ApplicationGatewayFrontendPortPropertiesFormat +type ApplicationGatewayGlobalConfiguration = original.ApplicationGatewayGlobalConfiguration type ApplicationGatewayHTTPListener = original.ApplicationGatewayHTTPListener type ApplicationGatewayHTTPListenerPropertiesFormat = original.ApplicationGatewayHTTPListenerPropertiesFormat type ApplicationGatewayHeaderConfiguration = original.ApplicationGatewayHeaderConfiguration @@ -1450,6 +1459,10 @@ type ApplicationGatewayIPConfigurationPropertiesFormat = original.ApplicationGat type ApplicationGatewayListResult = original.ApplicationGatewayListResult type ApplicationGatewayListResultIterator = original.ApplicationGatewayListResultIterator type ApplicationGatewayListResultPage = original.ApplicationGatewayListResultPage +type ApplicationGatewayLoadDistributionPolicy = original.ApplicationGatewayLoadDistributionPolicy +type ApplicationGatewayLoadDistributionPolicyPropertiesFormat = original.ApplicationGatewayLoadDistributionPolicyPropertiesFormat +type ApplicationGatewayLoadDistributionTarget = original.ApplicationGatewayLoadDistributionTarget +type ApplicationGatewayLoadDistributionTargetPropertiesFormat = original.ApplicationGatewayLoadDistributionTargetPropertiesFormat type ApplicationGatewayOnDemandProbe = original.ApplicationGatewayOnDemandProbe type ApplicationGatewayPathRule = original.ApplicationGatewayPathRule type ApplicationGatewayPathRulePropertiesFormat = original.ApplicationGatewayPathRulePropertiesFormat @@ -1610,6 +1623,7 @@ type BastionHostPropertiesFormat = original.BastionHostPropertiesFormat type BastionHostsClient = original.BastionHostsClient type BastionHostsCreateOrUpdateFuture = original.BastionHostsCreateOrUpdateFuture type BastionHostsDeleteFuture = original.BastionHostsDeleteFuture +type BastionHostsUpdateTagsFuture = original.BastionHostsUpdateTagsFuture type BastionSessionDeleteResult = original.BastionSessionDeleteResult type BastionSessionDeleteResultIterator = original.BastionSessionDeleteResultIterator type BastionSessionDeleteResultPage = original.BastionSessionDeleteResultPage @@ -1735,6 +1749,7 @@ type Error = original.Error type ErrorDetails = original.ErrorDetails type ErrorResponse = original.ErrorResponse type EvaluatedNetworkSecurityGroup = original.EvaluatedNetworkSecurityGroup +type ExplicitProxySettings = original.ExplicitProxySettings type ExpressRouteCircuit = original.ExpressRouteCircuit type ExpressRouteCircuitArpTable = original.ExpressRouteCircuitArpTable type ExpressRouteCircuitAuthorization = original.ExpressRouteCircuitAuthorization @@ -1876,6 +1891,7 @@ type FirewallPolicyRuleCollectionGroupsClient = original.FirewallPolicyRuleColle type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture = original.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture type FirewallPolicyRuleCollectionGroupsDeleteFuture = original.FirewallPolicyRuleCollectionGroupsDeleteFuture type FirewallPolicySNAT = original.FirewallPolicySNAT +type FirewallPolicySQL = original.FirewallPolicySQL type FirewallPolicySku = original.FirewallPolicySku type FirewallPolicyThreatIntelWhitelist = original.FirewallPolicyThreatIntelWhitelist type FirewallPolicyTransportSecurity = original.FirewallPolicyTransportSecurity @@ -2190,6 +2206,8 @@ type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionLis type PrivateEndpointConnectionListResultIterator = original.PrivateEndpointConnectionListResultIterator type PrivateEndpointConnectionListResultPage = original.PrivateEndpointConnectionListResultPage type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointIPConfiguration = original.PrivateEndpointIPConfiguration +type PrivateEndpointIPConfigurationProperties = original.PrivateEndpointIPConfigurationProperties type PrivateEndpointListResult = original.PrivateEndpointListResult type PrivateEndpointListResultIterator = original.PrivateEndpointListResultIterator type PrivateEndpointListResultPage = original.PrivateEndpointListResultPage @@ -2249,6 +2267,7 @@ type PublicIPPrefixesCreateOrUpdateFuture = original.PublicIPPrefixesCreateOrUpd type PublicIPPrefixesDeleteFuture = original.PublicIPPrefixesDeleteFuture type PutBastionShareableLinkAllFuture = original.PutBastionShareableLinkAllFuture type PutBastionShareableLinkFuture = original.PutBastionShareableLinkFuture +type QosDefinition = original.QosDefinition type QosIPRange = original.QosIPRange type QosPortRange = original.QosPortRange type QueryTroubleshootingParameters = original.QueryTroubleshootingParameters @@ -2349,6 +2368,10 @@ type ServiceEndpointPolicyListResultPage = original.ServiceEndpointPolicyListRes type ServiceEndpointPolicyPropertiesFormat = original.ServiceEndpointPolicyPropertiesFormat type ServiceEndpointPropertiesFormat = original.ServiceEndpointPropertiesFormat type ServiceTagInformation = original.ServiceTagInformation +type ServiceTagInformationClient = original.ServiceTagInformationClient +type ServiceTagInformationListResult = original.ServiceTagInformationListResult +type ServiceTagInformationListResultIterator = original.ServiceTagInformationListResultIterator +type ServiceTagInformationListResultPage = original.ServiceTagInformationListResultPage type ServiceTagInformationPropertiesFormat = original.ServiceTagInformationPropertiesFormat type ServiceTagsClient = original.ServiceTagsClient type ServiceTagsListResult = original.ServiceTagsListResult @@ -3596,6 +3619,18 @@ func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListRe func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { return original.NewServiceEndpointPolicyListResultPage(cur, getNextPage) } +func NewServiceTagInformationClient(subscriptionID string) ServiceTagInformationClient { + return original.NewServiceTagInformationClient(subscriptionID) +} +func NewServiceTagInformationClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagInformationClient { + return original.NewServiceTagInformationClientWithBaseURI(baseURI, subscriptionID) +} +func NewServiceTagInformationListResultIterator(page ServiceTagInformationListResultPage) ServiceTagInformationListResultIterator { + return original.NewServiceTagInformationListResultIterator(page) +} +func NewServiceTagInformationListResultPage(cur ServiceTagInformationListResult, getNextPage func(context.Context, ServiceTagInformationListResult) (ServiceTagInformationListResult, error)) ServiceTagInformationListResultPage { + return original.NewServiceTagInformationListResultPage(cur, getNextPage) +} func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return original.NewServiceTagsClient(subscriptionID) } @@ -3896,6 +3931,9 @@ func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewa func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { return original.PossibleApplicationGatewayFirewallModeValues() } +func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGatewayLoadDistributionAlgorithm { + return original.PossibleApplicationGatewayLoadDistributionAlgorithmValues() +} func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { return original.PossibleApplicationGatewayOperationalStateValues() } diff --git a/profiles/latest/network/mgmt/network/networkapi/models.go b/profiles/latest/network/mgmt/network/networkapi/models.go index 65d9722785ae..a0f44a64c25d 100644 --- a/profiles/latest/network/mgmt/network/networkapi/models.go +++ b/profiles/latest/network/mgmt/network/networkapi/models.go @@ -9,7 +9,7 @@ package networkapi -import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/networkapi" +import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-03-01/network/networkapi" type ApplicationGatewayPrivateEndpointConnectionsClientAPI = original.ApplicationGatewayPrivateEndpointConnectionsClientAPI type ApplicationGatewayPrivateLinkResourcesClientAPI = original.ApplicationGatewayPrivateLinkResourcesClientAPI @@ -87,6 +87,7 @@ type SecurityRulesClientAPI = original.SecurityRulesClientAPI type ServiceAssociationLinksClientAPI = original.ServiceAssociationLinksClientAPI type ServiceEndpointPoliciesClientAPI = original.ServiceEndpointPoliciesClientAPI type ServiceEndpointPolicyDefinitionsClientAPI = original.ServiceEndpointPolicyDefinitionsClientAPI +type ServiceTagInformationClientAPI = original.ServiceTagInformationClientAPI type ServiceTagsClientAPI = original.ServiceTagsClientAPI type SubnetsClientAPI = original.SubnetsClientAPI type UsagesClientAPI = original.UsagesClientAPI diff --git a/profiles/latest/postgresql/mgmt/postgresqlflexibleservers/models.go b/profiles/latest/postgresql/mgmt/postgresqlflexibleservers/models.go index 6a0cb0f65dc5..222f1dc37e49 100644 --- a/profiles/latest/postgresql/mgmt/postgresqlflexibleservers/models.go +++ b/profiles/latest/postgresql/mgmt/postgresqlflexibleservers/models.go @@ -53,6 +53,15 @@ const ( CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) +type FailoverMode = original.FailoverMode + +const ( + FailoverModeForcedFailover FailoverMode = original.FailoverModeForcedFailover + FailoverModeForcedSwitchover FailoverMode = original.FailoverModeForcedSwitchover + FailoverModePlannedFailover FailoverMode = original.FailoverModePlannedFailover + FailoverModePlannedSwitchover FailoverMode = original.FailoverModePlannedSwitchover +) + type GeoRedundantBackupEnum = original.GeoRedundantBackupEnum const ( @@ -303,6 +312,9 @@ func PossibleCreateModeValues() []CreateMode { func PossibleCreatedByTypeValues() []CreatedByType { return original.PossibleCreatedByTypeValues() } +func PossibleFailoverModeValues() []FailoverMode { + return original.PossibleFailoverModeValues() +} func PossibleGeoRedundantBackupEnumValues() []GeoRedundantBackupEnum { return original.PossibleGeoRedundantBackupEnumValues() } diff --git a/profiles/preview/compute/mgmt/compute/computeapi/models.go b/profiles/preview/compute/mgmt/compute/computeapi/models.go index f672fbcc7b84..5026725cfac7 100644 --- a/profiles/preview/compute/mgmt/compute/computeapi/models.go +++ b/profiles/preview/compute/mgmt/compute/computeapi/models.go @@ -9,7 +9,7 @@ package computeapi -import original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-04-01/compute/computeapi" +import original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/computeapi" type AvailabilitySetsClientAPI = original.AvailabilitySetsClientAPI type CapacityReservationGroupsClientAPI = original.CapacityReservationGroupsClientAPI diff --git a/profiles/preview/compute/mgmt/compute/models.go b/profiles/preview/compute/mgmt/compute/models.go index 95c4a863dec8..8706030ac98a 100644 --- a/profiles/preview/compute/mgmt/compute/models.go +++ b/profiles/preview/compute/mgmt/compute/models.go @@ -12,7 +12,7 @@ package compute import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-04-01/compute" + original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" ) const ( @@ -221,6 +221,12 @@ const ( ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = original.ExpandTypesForGetVMScaleSetsUserData ) +type ExtendedLocationType = original.ExtendedLocationType + +const ( + ExtendedLocationTypeEdgeZone ExtendedLocationType = original.ExtendedLocationTypeEdgeZone +) + type ExtendedLocationTypes = original.ExtendedLocationTypes const ( @@ -509,6 +515,13 @@ const ( PublicIPAllocationMethodStatic PublicIPAllocationMethod = original.PublicIPAllocationMethodStatic ) +type ReplicationMode = original.ReplicationMode + +const ( + ReplicationModeFull ReplicationMode = original.ReplicationModeFull + ReplicationModeShallow ReplicationMode = original.ReplicationModeShallow +) + type ReplicationState = original.ReplicationState const ( @@ -955,6 +968,7 @@ type APIErrorBase = original.APIErrorBase type AccessURI = original.AccessURI type AdditionalCapabilities = original.AdditionalCapabilities type AdditionalUnattendContent = original.AdditionalUnattendContent +type ApplicationProfile = original.ApplicationProfile type AutomaticOSUpgradePolicy = original.AutomaticOSUpgradePolicy type AutomaticOSUpgradeProperties = original.AutomaticOSUpgradeProperties type AutomaticRepairsPolicy = original.AutomaticRepairsPolicy @@ -1403,6 +1417,7 @@ type SnapshotsDeleteFuture = original.SnapshotsDeleteFuture type SnapshotsGrantAccessFuture = original.SnapshotsGrantAccessFuture type SnapshotsRevokeAccessFuture = original.SnapshotsRevokeAccessFuture type SnapshotsUpdateFuture = original.SnapshotsUpdateFuture +type SoftDeletePolicy = original.SoftDeletePolicy type SourceVault = original.SourceVault type SpotRestorePolicy = original.SpotRestorePolicy type StatusCodeCount = original.StatusCodeCount @@ -1429,7 +1444,9 @@ type UsageClient = original.UsageClient type UsageName = original.UsageName type UserArtifactManage = original.UserArtifactManage type UserArtifactSource = original.UserArtifactSource +type VMGalleryApplication = original.VMGalleryApplication type VMScaleSetConvertToSinglePlacementGroupInput = original.VMScaleSetConvertToSinglePlacementGroupInput +type VMSizeProperties = original.VMSizeProperties type VaultCertificate = original.VaultCertificate type VaultSecretGroup = original.VaultSecretGroup type VirtualHardDisk = original.VirtualHardDisk @@ -2240,6 +2257,9 @@ func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesFor func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets { return original.PossibleExpandTypesForGetVMScaleSetsValues() } +func PossibleExtendedLocationTypeValues() []ExtendedLocationType { + return original.PossibleExtendedLocationTypeValues() +} func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { return original.PossibleExtendedLocationTypesValues() } @@ -2351,6 +2371,9 @@ func PossiblePublicIPAddressSkuTierValues() []PublicIPAddressSkuTier { func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod { return original.PossiblePublicIPAllocationMethodValues() } +func PossibleReplicationModeValues() []ReplicationMode { + return original.PossibleReplicationModeValues() +} func PossibleReplicationStateValues() []ReplicationState { return original.PossibleReplicationStateValues() } diff --git a/profiles/preview/datafactory/mgmt/datafactory/models.go b/profiles/preview/datafactory/mgmt/datafactory/models.go index 6151da6d4af5..da3e26073d89 100644 --- a/profiles/preview/datafactory/mgmt/datafactory/models.go +++ b/profiles/preview/datafactory/mgmt/datafactory/models.go @@ -19,6 +19,14 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOption + +const ( + AmazonRdsForOraclePartitionOptionDynamicRange AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOptionDynamicRange + AmazonRdsForOraclePartitionOptionNone AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOptionNone + AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable AmazonRdsForOraclePartitionOption = original.AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable +) + type AuthenticationType = original.AuthenticationType const ( @@ -827,6 +835,7 @@ const ( TypeBasicActivityTypeExecuteDataFlow TypeBasicActivity = original.TypeBasicActivityTypeExecuteDataFlow TypeBasicActivityTypeExecutePipeline TypeBasicActivity = original.TypeBasicActivityTypeExecutePipeline TypeBasicActivityTypeExecuteSSISPackage TypeBasicActivity = original.TypeBasicActivityTypeExecuteSSISPackage + TypeBasicActivityTypeExecuteWranglingDataflow TypeBasicActivity = original.TypeBasicActivityTypeExecuteWranglingDataflow TypeBasicActivityTypeExecution TypeBasicActivity = original.TypeBasicActivityTypeExecution TypeBasicActivityTypeFilter TypeBasicActivity = original.TypeBasicActivityTypeFilter TypeBasicActivityTypeForEach TypeBasicActivity = original.TypeBasicActivityTypeForEach @@ -906,6 +915,7 @@ type TypeBasicCopySource = original.TypeBasicCopySource const ( TypeBasicCopySourceTypeAmazonMWSSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAmazonMWSSource + TypeBasicCopySourceTypeAmazonRdsForOracleSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAmazonRdsForOracleSource TypeBasicCopySourceTypeAmazonRedshiftSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAmazonRedshiftSource TypeBasicCopySourceTypeAvroSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAvroSource TypeBasicCopySourceTypeAzureBlobFSSource TypeBasicCopySource = original.TypeBasicCopySourceTypeAzureBlobFSSource @@ -1029,14 +1039,16 @@ const ( type TypeBasicDataFlow = original.TypeBasicDataFlow const ( - TypeBasicDataFlowTypeDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeDataFlow - TypeBasicDataFlowTypeMappingDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeMappingDataFlow + TypeBasicDataFlowTypeDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeDataFlow + TypeBasicDataFlowTypeMappingDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeMappingDataFlow + TypeBasicDataFlowTypeWranglingDataFlow TypeBasicDataFlow = original.TypeBasicDataFlowTypeWranglingDataFlow ) type TypeBasicDataset = original.TypeBasicDataset const ( TypeBasicDatasetTypeAmazonMWSObject TypeBasicDataset = original.TypeBasicDatasetTypeAmazonMWSObject + TypeBasicDatasetTypeAmazonRdsForOracleTable TypeBasicDataset = original.TypeBasicDatasetTypeAmazonRdsForOracleTable TypeBasicDatasetTypeAmazonRedshiftTable TypeBasicDataset = original.TypeBasicDatasetTypeAmazonRedshiftTable TypeBasicDatasetTypeAmazonS3Object TypeBasicDataset = original.TypeBasicDatasetTypeAmazonS3Object TypeBasicDatasetTypeAvro TypeBasicDataset = original.TypeBasicDatasetTypeAvro @@ -1248,6 +1260,7 @@ type TypeBasicLinkedService = original.TypeBasicLinkedService const ( TypeBasicLinkedServiceTypeAmazonMWS TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonMWS + TypeBasicLinkedServiceTypeAmazonRdsForOracle TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonRdsForOracle TypeBasicLinkedServiceTypeAmazonRedshift TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonRedshift TypeBasicLinkedServiceTypeAmazonS3 TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonS3 TypeBasicLinkedServiceTypeAmazonS3Compatible TypeBasicLinkedService = original.TypeBasicLinkedServiceTypeAmazonS3Compatible @@ -1441,6 +1454,12 @@ type AmazonMWSLinkedService = original.AmazonMWSLinkedService type AmazonMWSLinkedServiceTypeProperties = original.AmazonMWSLinkedServiceTypeProperties type AmazonMWSObjectDataset = original.AmazonMWSObjectDataset type AmazonMWSSource = original.AmazonMWSSource +type AmazonRdsForLinkedServiceTypeProperties = original.AmazonRdsForLinkedServiceTypeProperties +type AmazonRdsForOracleLinkedService = original.AmazonRdsForOracleLinkedService +type AmazonRdsForOraclePartitionSettings = original.AmazonRdsForOraclePartitionSettings +type AmazonRdsForOracleSource = original.AmazonRdsForOracleSource +type AmazonRdsForOracleTableDataset = original.AmazonRdsForOracleTableDataset +type AmazonRdsForOracleTableDatasetTypeProperties = original.AmazonRdsForOracleTableDatasetTypeProperties type AmazonRedshiftLinkedService = original.AmazonRedshiftLinkedService type AmazonRedshiftLinkedServiceTypeProperties = original.AmazonRedshiftLinkedServiceTypeProperties type AmazonRedshiftSource = original.AmazonRedshiftSource @@ -1798,8 +1817,10 @@ type ExecuteDataFlowActivityTypeProperties = original.ExecuteDataFlowActivityTyp type ExecuteDataFlowActivityTypePropertiesCompute = original.ExecuteDataFlowActivityTypePropertiesCompute type ExecutePipelineActivity = original.ExecutePipelineActivity type ExecutePipelineActivityTypeProperties = original.ExecutePipelineActivityTypeProperties +type ExecutePowerQueryActivityTypeProperties = original.ExecutePowerQueryActivityTypeProperties type ExecuteSSISPackageActivity = original.ExecuteSSISPackageActivity type ExecuteSSISPackageActivityTypeProperties = original.ExecuteSSISPackageActivityTypeProperties +type ExecuteWranglingDataflowActivity = original.ExecuteWranglingDataflowActivity type ExecutionActivity = original.ExecutionActivity type ExportSettings = original.ExportSettings type ExposureControlBatchRequest = original.ExposureControlBatchRequest @@ -2141,6 +2162,9 @@ type PostgreSQLLinkedServiceTypeProperties = original.PostgreSQLLinkedServiceTyp type PostgreSQLSource = original.PostgreSQLSource type PostgreSQLTableDataset = original.PostgreSQLTableDataset type PostgreSQLTableDatasetTypeProperties = original.PostgreSQLTableDatasetTypeProperties +type PowerQuerySink = original.PowerQuerySink +type PowerQuerySource = original.PowerQuerySource +type PowerQueryTypeProperties = original.PowerQueryTypeProperties type PrestoDatasetTypeProperties = original.PrestoDatasetTypeProperties type PrestoLinkedService = original.PrestoLinkedService type PrestoLinkedServiceTypeProperties = original.PrestoLinkedServiceTypeProperties @@ -2406,6 +2430,7 @@ type WebLinkedServiceTypeProperties = original.WebLinkedServiceTypeProperties type WebSource = original.WebSource type WebTableDataset = original.WebTableDataset type WebTableDatasetTypeProperties = original.WebTableDatasetTypeProperties +type WranglingDataFlow = original.WranglingDataFlow type XMLDataset = original.XMLDataset type XMLDatasetTypeProperties = original.XMLDatasetTypeProperties type XMLReadSettings = original.XMLReadSettings @@ -2618,6 +2643,9 @@ func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) Trigger func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleAmazonRdsForOraclePartitionOptionValues() []AmazonRdsForOraclePartitionOption { + return original.PossibleAmazonRdsForOraclePartitionOptionValues() +} func PossibleAuthenticationTypeValues() []AuthenticationType { return original.PossibleAuthenticationTypeValues() } diff --git a/profiles/preview/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go b/profiles/preview/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go index c1a56c58584d..ffdc8f0c74fc 100644 --- a/profiles/preview/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go +++ b/profiles/preview/dataprotection/mgmt/dataprotection/dataprotectionapi/models.go @@ -9,18 +9,19 @@ package dataprotectionapi -import original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-01-01/dataprotection/dataprotectionapi" +import original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotectionapi" type BackupInstancesClientAPI = original.BackupInstancesClientAPI type BackupPoliciesClientAPI = original.BackupPoliciesClientAPI +type BackupVaultOperationResultsClientAPI = original.BackupVaultOperationResultsClientAPI type BackupVaultsClientAPI = original.BackupVaultsClientAPI -type BaseClientAPI = original.BaseClientAPI +type ClientAPI = original.ClientAPI type ExportJobsClientAPI = original.ExportJobsClientAPI type ExportJobsOperationResultClientAPI = original.ExportJobsOperationResultClientAPI -type FindRestorableTimeRangesClientAPI = original.FindRestorableTimeRangesClientAPI -type JobClientAPI = original.JobClientAPI type JobsClientAPI = original.JobsClientAPI type OperationResultClientAPI = original.OperationResultClientAPI +type OperationStatusClientAPI = original.OperationStatusClientAPI type OperationsClientAPI = original.OperationsClientAPI -type RecoveryPointClientAPI = original.RecoveryPointClientAPI type RecoveryPointsClientAPI = original.RecoveryPointsClientAPI +type ResourceGuardsClientAPI = original.ResourceGuardsClientAPI +type RestorableTimeRangesClientAPI = original.RestorableTimeRangesClientAPI diff --git a/profiles/preview/dataprotection/mgmt/dataprotection/models.go b/profiles/preview/dataprotection/mgmt/dataprotection/models.go index bc3f44f24669..4936b2ae1d7f 100644 --- a/profiles/preview/dataprotection/mgmt/dataprotection/models.go +++ b/profiles/preview/dataprotection/mgmt/dataprotection/models.go @@ -12,7 +12,7 @@ package dataprotection import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-01-01/dataprotection" + original "github.com/Azure/azure-sdk-for-go/services/dataprotection/mgmt/2021-07-01/dataprotection" ) const ( @@ -22,57 +22,57 @@ const ( type AbsoluteMarker = original.AbsoluteMarker const ( - AllBackup AbsoluteMarker = original.AllBackup - FirstOfDay AbsoluteMarker = original.FirstOfDay - FirstOfMonth AbsoluteMarker = original.FirstOfMonth - FirstOfWeek AbsoluteMarker = original.FirstOfWeek - FirstOfYear AbsoluteMarker = original.FirstOfYear + AbsoluteMarkerAllBackup AbsoluteMarker = original.AbsoluteMarkerAllBackup + AbsoluteMarkerFirstOfDay AbsoluteMarker = original.AbsoluteMarkerFirstOfDay + AbsoluteMarkerFirstOfMonth AbsoluteMarker = original.AbsoluteMarkerFirstOfMonth + AbsoluteMarkerFirstOfWeek AbsoluteMarker = original.AbsoluteMarkerFirstOfWeek + AbsoluteMarkerFirstOfYear AbsoluteMarker = original.AbsoluteMarkerFirstOfYear ) type CreatedByType = original.CreatedByType const ( - Application CreatedByType = original.Application - Key CreatedByType = original.Key - ManagedIdentity CreatedByType = original.ManagedIdentity - User CreatedByType = original.User + CreatedByTypeApplication CreatedByType = original.CreatedByTypeApplication + CreatedByTypeKey CreatedByType = original.CreatedByTypeKey + CreatedByTypeManagedIdentity CreatedByType = original.CreatedByTypeManagedIdentity + CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) type CurrentProtectionState = original.CurrentProtectionState const ( - BackupSchedulesSuspended CurrentProtectionState = original.BackupSchedulesSuspended - ConfiguringProtection CurrentProtectionState = original.ConfiguringProtection - ConfiguringProtectionFailed CurrentProtectionState = original.ConfiguringProtectionFailed - Invalid CurrentProtectionState = original.Invalid - NotProtected CurrentProtectionState = original.NotProtected - ProtectionConfigured CurrentProtectionState = original.ProtectionConfigured - ProtectionError CurrentProtectionState = original.ProtectionError - ProtectionStopped CurrentProtectionState = original.ProtectionStopped - RetentionSchedulesSuspended CurrentProtectionState = original.RetentionSchedulesSuspended - SoftDeleted CurrentProtectionState = original.SoftDeleted - SoftDeleting CurrentProtectionState = original.SoftDeleting - UpdatingProtection CurrentProtectionState = original.UpdatingProtection + CurrentProtectionStateBackupSchedulesSuspended CurrentProtectionState = original.CurrentProtectionStateBackupSchedulesSuspended + CurrentProtectionStateConfiguringProtection CurrentProtectionState = original.CurrentProtectionStateConfiguringProtection + CurrentProtectionStateConfiguringProtectionFailed CurrentProtectionState = original.CurrentProtectionStateConfiguringProtectionFailed + CurrentProtectionStateInvalid CurrentProtectionState = original.CurrentProtectionStateInvalid + CurrentProtectionStateNotProtected CurrentProtectionState = original.CurrentProtectionStateNotProtected + CurrentProtectionStateProtectionConfigured CurrentProtectionState = original.CurrentProtectionStateProtectionConfigured + CurrentProtectionStateProtectionError CurrentProtectionState = original.CurrentProtectionStateProtectionError + CurrentProtectionStateProtectionStopped CurrentProtectionState = original.CurrentProtectionStateProtectionStopped + CurrentProtectionStateRetentionSchedulesSuspended CurrentProtectionState = original.CurrentProtectionStateRetentionSchedulesSuspended + CurrentProtectionStateSoftDeleted CurrentProtectionState = original.CurrentProtectionStateSoftDeleted + CurrentProtectionStateSoftDeleting CurrentProtectionState = original.CurrentProtectionStateSoftDeleting + CurrentProtectionStateUpdatingProtection CurrentProtectionState = original.CurrentProtectionStateUpdatingProtection ) type DataStoreTypes = original.DataStoreTypes const ( - ArchiveStore DataStoreTypes = original.ArchiveStore - OperationalStore DataStoreTypes = original.OperationalStore - VaultStore DataStoreTypes = original.VaultStore + DataStoreTypesArchiveStore DataStoreTypes = original.DataStoreTypesArchiveStore + DataStoreTypesOperationalStore DataStoreTypes = original.DataStoreTypesOperationalStore + DataStoreTypesVaultStore DataStoreTypes = original.DataStoreTypesVaultStore ) type DayOfWeek = original.DayOfWeek const ( - Friday DayOfWeek = original.Friday - Monday DayOfWeek = original.Monday - Saturday DayOfWeek = original.Saturday - Sunday DayOfWeek = original.Sunday - Thursday DayOfWeek = original.Thursday - Tuesday DayOfWeek = original.Tuesday - Wednesday DayOfWeek = original.Wednesday + DayOfWeekFriday DayOfWeek = original.DayOfWeekFriday + DayOfWeekMonday DayOfWeek = original.DayOfWeekMonday + DayOfWeekSaturday DayOfWeek = original.DayOfWeekSaturday + DayOfWeekSunday DayOfWeek = original.DayOfWeekSunday + DayOfWeekThursday DayOfWeek = original.DayOfWeekThursday + DayOfWeekTuesday DayOfWeek = original.DayOfWeekTuesday + DayOfWeekWednesday DayOfWeek = original.DayOfWeekWednesday ) type FeatureSupportStatus = original.FeatureSupportStatus @@ -96,134 +96,148 @@ const ( type Month = original.Month const ( - April Month = original.April - August Month = original.August - December Month = original.December - February Month = original.February - January Month = original.January - July Month = original.July - June Month = original.June - March Month = original.March - May Month = original.May - November Month = original.November - October Month = original.October - September Month = original.September + MonthApril Month = original.MonthApril + MonthAugust Month = original.MonthAugust + MonthDecember Month = original.MonthDecember + MonthFebruary Month = original.MonthFebruary + MonthJanuary Month = original.MonthJanuary + MonthJuly Month = original.MonthJuly + MonthJune Month = original.MonthJune + MonthMarch Month = original.MonthMarch + MonthMay Month = original.MonthMay + MonthNovember Month = original.MonthNovember + MonthOctober Month = original.MonthOctober + MonthSeptember Month = original.MonthSeptember ) type ObjectType = original.ObjectType const ( - ObjectTypeAzureBackupDiscreteRecoveryPoint ObjectType = original.ObjectTypeAzureBackupDiscreteRecoveryPoint - ObjectTypeAzureBackupRecoveryPoint ObjectType = original.ObjectTypeAzureBackupRecoveryPoint + ObjectTypeAuthCredentials ObjectType = original.ObjectTypeAuthCredentials + ObjectTypeSecretStoreBasedAuthCredentials ObjectType = original.ObjectTypeSecretStoreBasedAuthCredentials +) + +type ObjectTypeBasicAzureBackupRecoveryPoint = original.ObjectTypeBasicAzureBackupRecoveryPoint + +const ( + ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint ObjectTypeBasicAzureBackupRecoveryPoint = original.ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint + ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint ObjectTypeBasicAzureBackupRecoveryPoint = original.ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint ) type ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequest const ( - ObjectTypeAzureBackupRecoveryPointBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRecoveryPointBasedRestoreRequest - ObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest - ObjectTypeAzureBackupRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRestoreRequest - ObjectTypeAzureBackupRestoreWithRehydrationRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeAzureBackupRestoreWithRehydrationRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest ObjectTypeBasicAzureBackupRestoreRequest = original.ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest ) type ObjectTypeBasicBackupCriteria = original.ObjectTypeBasicBackupCriteria const ( - ObjectTypeBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeBackupCriteria - ObjectTypeScheduleBasedBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeScheduleBasedBackupCriteria + ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria + ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria ObjectTypeBasicBackupCriteria = original.ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria ) type ObjectTypeBasicBackupParameters = original.ObjectTypeBasicBackupParameters const ( - ObjectTypeAzureBackupParams ObjectTypeBasicBackupParameters = original.ObjectTypeAzureBackupParams - ObjectTypeBackupParameters ObjectTypeBasicBackupParameters = original.ObjectTypeBackupParameters + ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams ObjectTypeBasicBackupParameters = original.ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams + ObjectTypeBasicBackupParametersObjectTypeBackupParameters ObjectTypeBasicBackupParameters = original.ObjectTypeBasicBackupParametersObjectTypeBackupParameters ) type ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBasicBaseBackupPolicy const ( - ObjectTypeBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBackupPolicy - ObjectTypeBaseBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBaseBackupPolicy + ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy + ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy ObjectTypeBasicBaseBackupPolicy = original.ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy ) type ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRule const ( - ObjectTypeAzureBackupRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeAzureBackupRule - ObjectTypeAzureRetentionRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeAzureRetentionRule - ObjectTypeBasePolicyRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasePolicyRule + ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule + ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule + ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule ObjectTypeBasicBasePolicyRule = original.ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule ) type ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOption const ( - ObjectTypeCopyOnExpiryOption ObjectTypeBasicCopyOption = original.ObjectTypeCopyOnExpiryOption - ObjectTypeCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeCopyOption - ObjectTypeCustomCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeCustomCopyOption - ObjectTypeImmediateCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeImmediateCopyOption + ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption + ObjectTypeBasicCopyOptionObjectTypeCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeCopyOption + ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption + ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption ObjectTypeBasicCopyOption = original.ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption ) type ObjectTypeBasicDataStoreParameters = original.ObjectTypeBasicDataStoreParameters const ( - ObjectTypeAzureOperationalStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeAzureOperationalStoreParameters - ObjectTypeDataStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeDataStoreParameters + ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters + ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters ObjectTypeBasicDataStoreParameters = original.ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters ) type ObjectTypeBasicDeleteOption = original.ObjectTypeBasicDeleteOption const ( - ObjectTypeAbsoluteDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeAbsoluteDeleteOption - ObjectTypeDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeDeleteOption + ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption + ObjectTypeBasicDeleteOptionObjectTypeDeleteOption ObjectTypeBasicDeleteOption = original.ObjectTypeBasicDeleteOptionObjectTypeDeleteOption ) type ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeBasicFeatureValidationRequestBase const ( - ObjectTypeFeatureValidationRequest ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeFeatureValidationRequest - ObjectTypeFeatureValidationRequestBase ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeFeatureValidationRequestBase + ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest + ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase ObjectTypeBasicFeatureValidationRequestBase = original.ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase ) type ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeBasicFeatureValidationResponseBase const ( - ObjectTypeFeatureValidationResponse ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeFeatureValidationResponse - ObjectTypeFeatureValidationResponseBase ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeFeatureValidationResponseBase + ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse + ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase ObjectTypeBasicFeatureValidationResponseBase = original.ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase ) type ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeBasicItemLevelRestoreCriteria const ( - ObjectTypeItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeItemLevelRestoreCriteria - ObjectTypeRangeBasedItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeRangeBasedItemLevelRestoreCriteria + ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria + ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = original.ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria +) + +type ObjectTypeBasicOperationExtendedInfo = original.ObjectTypeBasicOperationExtendedInfo + +const ( + ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo ObjectTypeBasicOperationExtendedInfo = original.ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo + ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo ObjectTypeBasicOperationExtendedInfo = original.ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo ) type ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBase const ( - ObjectTypeItemLevelRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeItemLevelRestoreTargetInfo - ObjectTypeRestoreFilesTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeRestoreFilesTargetInfo - ObjectTypeRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeRestoreTargetInfo - ObjectTypeRestoreTargetInfoBase ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeRestoreTargetInfoBase + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase ObjectTypeBasicRestoreTargetInfoBase = original.ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase ) type ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContext const ( - ObjectTypeAdhocBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeAdhocBasedTriggerContext - ObjectTypeScheduleBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeScheduleBasedTriggerContext - ObjectTypeTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeTriggerContext + ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext + ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext + ObjectTypeBasicTriggerContextObjectTypeTriggerContext ObjectTypeBasicTriggerContext = original.ObjectTypeBasicTriggerContextObjectTypeTriggerContext ) type ProvisioningState = original.ProvisioningState const ( - Failed ProvisioningState = original.Failed - Provisioning ProvisioningState = original.Provisioning - Succeeded ProvisioningState = original.Succeeded - Unknown ProvisioningState = original.Unknown - Updating ProvisioningState = original.Updating + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateProvisioning ProvisioningState = original.ProvisioningStateProvisioning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + ProvisioningStateUnknown ProvisioningState = original.ProvisioningStateUnknown + ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating ) type RehydrationPriority = original.RehydrationPriority @@ -237,11 +251,26 @@ const ( type RehydrationStatus = original.RehydrationStatus const ( - COMPLETED RehydrationStatus = original.COMPLETED - CREATEINPROGRESS RehydrationStatus = original.CREATEINPROGRESS - DELETED RehydrationStatus = original.DELETED - DELETEINPROGRESS RehydrationStatus = original.DELETEINPROGRESS - FAILED RehydrationStatus = original.FAILED + RehydrationStatusCOMPLETED RehydrationStatus = original.RehydrationStatusCOMPLETED + RehydrationStatusCREATEINPROGRESS RehydrationStatus = original.RehydrationStatusCREATEINPROGRESS + RehydrationStatusDELETED RehydrationStatus = original.RehydrationStatusDELETED + RehydrationStatusDELETEINPROGRESS RehydrationStatus = original.RehydrationStatusDELETEINPROGRESS + RehydrationStatusFAILED RehydrationStatus = original.RehydrationStatusFAILED +) + +type ResourceMoveState = original.ResourceMoveState + +const ( + ResourceMoveStateCommitFailed ResourceMoveState = original.ResourceMoveStateCommitFailed + ResourceMoveStateCommitTimedout ResourceMoveState = original.ResourceMoveStateCommitTimedout + ResourceMoveStateCriticalFailure ResourceMoveState = original.ResourceMoveStateCriticalFailure + ResourceMoveStateFailed ResourceMoveState = original.ResourceMoveStateFailed + ResourceMoveStateInProgress ResourceMoveState = original.ResourceMoveStateInProgress + ResourceMoveStateMoveSucceeded ResourceMoveState = original.ResourceMoveStateMoveSucceeded + ResourceMoveStatePartialSuccess ResourceMoveState = original.ResourceMoveStatePartialSuccess + ResourceMoveStatePrepareFailed ResourceMoveState = original.ResourceMoveStatePrepareFailed + ResourceMoveStatePrepareTimedout ResourceMoveState = original.ResourceMoveStatePrepareTimedout + ResourceMoveStateUnknown ResourceMoveState = original.ResourceMoveStateUnknown ) type RestoreSourceDataStoreType = original.RestoreSourceDataStoreType @@ -260,6 +289,13 @@ const ( RestoreTargetLocationTypeInvalid RestoreTargetLocationType = original.RestoreTargetLocationTypeInvalid ) +type SecretStoreType = original.SecretStoreType + +const ( + SecretStoreTypeAzureKeyVault SecretStoreType = original.SecretStoreTypeAzureKeyVault + SecretStoreTypeInvalid SecretStoreType = original.SecretStoreTypeInvalid +) + type SourceDataStoreType = original.SourceDataStoreType const ( @@ -290,18 +326,18 @@ const ( type StorageSettingTypes = original.StorageSettingTypes const ( - GeoRedundant StorageSettingTypes = original.GeoRedundant - LocallyRedundant StorageSettingTypes = original.LocallyRedundant + StorageSettingTypesGeoRedundant StorageSettingTypes = original.StorageSettingTypesGeoRedundant + StorageSettingTypesLocallyRedundant StorageSettingTypes = original.StorageSettingTypesLocallyRedundant ) type WeekNumber = original.WeekNumber const ( - First WeekNumber = original.First - Fourth WeekNumber = original.Fourth - Last WeekNumber = original.Last - Second WeekNumber = original.Second - Third WeekNumber = original.Third + WeekNumberFirst WeekNumber = original.WeekNumberFirst + WeekNumberFourth WeekNumber = original.WeekNumberFourth + WeekNumberLast WeekNumber = original.WeekNumberLast + WeekNumberSecond WeekNumber = original.WeekNumberSecond + WeekNumberThird WeekNumber = original.WeekNumberThird ) type AbsoluteDeleteOption = original.AbsoluteDeleteOption @@ -309,6 +345,7 @@ type AdHocBackupRuleOptions = original.AdHocBackupRuleOptions type AdhocBackupTriggerOption = original.AdhocBackupTriggerOption type AdhocBasedTaggingCriteria = original.AdhocBasedTaggingCriteria type AdhocBasedTriggerContext = original.AdhocBasedTriggerContext +type AuthCredentials = original.AuthCredentials type AzureBackupDiscreteRecoveryPoint = original.AzureBackupDiscreteRecoveryPoint type AzureBackupFindRestorableTimeRangesRequest = original.AzureBackupFindRestorableTimeRangesRequest type AzureBackupFindRestorableTimeRangesRequestResource = original.AzureBackupFindRestorableTimeRangesRequestResource @@ -346,19 +383,20 @@ type BackupInstancesDeleteFuture = original.BackupInstancesDeleteFuture type BackupInstancesTriggerRehydrateFuture = original.BackupInstancesTriggerRehydrateFuture type BackupInstancesTriggerRestoreFuture = original.BackupInstancesTriggerRestoreFuture type BackupInstancesValidateForBackupFuture = original.BackupInstancesValidateForBackupFuture -type BackupInstancesValidateRestoreFuture = original.BackupInstancesValidateRestoreFuture +type BackupInstancesValidateForRestoreFuture = original.BackupInstancesValidateForRestoreFuture type BackupParameters = original.BackupParameters type BackupPoliciesClient = original.BackupPoliciesClient type BackupPolicy = original.BackupPolicy type BackupSchedule = original.BackupSchedule type BackupVault = original.BackupVault +type BackupVaultOperationResultsClient = original.BackupVaultOperationResultsClient type BackupVaultResource = original.BackupVaultResource type BackupVaultResourceList = original.BackupVaultResourceList type BackupVaultResourceListIterator = original.BackupVaultResourceListIterator type BackupVaultResourceListPage = original.BackupVaultResourceListPage type BackupVaultsClient = original.BackupVaultsClient type BackupVaultsCreateOrUpdateFuture = original.BackupVaultsCreateOrUpdateFuture -type BackupVaultsPatchFuture = original.BackupVaultsPatchFuture +type BackupVaultsUpdateFuture = original.BackupVaultsUpdateFuture type BaseBackupPolicy = original.BaseBackupPolicy type BaseBackupPolicyResource = original.BaseBackupPolicyResource type BaseBackupPolicyResourceList = original.BaseBackupPolicyResourceList @@ -366,6 +404,7 @@ type BaseBackupPolicyResourceListIterator = original.BaseBackupPolicyResourceLis type BaseBackupPolicyResourceListPage = original.BaseBackupPolicyResourceListPage type BaseClient = original.BaseClient type BasePolicyRule = original.BasePolicyRule +type BasicAuthCredentials = original.BasicAuthCredentials type BasicAzureBackupRecoveryPoint = original.BasicAzureBackupRecoveryPoint type BasicAzureBackupRecoveryPointBasedRestoreRequest = original.BasicAzureBackupRecoveryPointBasedRestoreRequest type BasicAzureBackupRestoreRequest = original.BasicAzureBackupRestoreRequest @@ -379,10 +418,12 @@ type BasicDeleteOption = original.BasicDeleteOption type BasicFeatureValidationRequestBase = original.BasicFeatureValidationRequestBase type BasicFeatureValidationResponseBase = original.BasicFeatureValidationResponseBase type BasicItemLevelRestoreCriteria = original.BasicItemLevelRestoreCriteria +type BasicOperationExtendedInfo = original.BasicOperationExtendedInfo type BasicRestoreTargetInfoBase = original.BasicRestoreTargetInfoBase type BasicTriggerContext = original.BasicTriggerContext type CheckNameAvailabilityRequest = original.CheckNameAvailabilityRequest type CheckNameAvailabilityResult = original.CheckNameAvailabilityResult +type Client = original.Client type ClientDiscoveryDisplay = original.ClientDiscoveryDisplay type ClientDiscoveryForLogSpecification = original.ClientDiscoveryForLogSpecification type ClientDiscoveryForProperties = original.ClientDiscoveryForProperties @@ -401,6 +442,10 @@ type Datasource = original.Datasource type DatasourceSet = original.DatasourceSet type Day = original.Day type DeleteOption = original.DeleteOption +type DppBaseResource = original.DppBaseResource +type DppBaseResourceList = original.DppBaseResourceList +type DppBaseResourceListIterator = original.DppBaseResourceListIterator +type DppBaseResourceListPage = original.DppBaseResourceListPage type DppIdentityDetails = original.DppIdentityDetails type DppResource = original.DppResource type DppResourceList = original.DppResourceList @@ -418,12 +463,10 @@ type FeatureValidationRequestBase = original.FeatureValidationRequestBase type FeatureValidationResponse = original.FeatureValidationResponse type FeatureValidationResponseBase = original.FeatureValidationResponseBase type FeatureValidationResponseBaseModel = original.FeatureValidationResponseBaseModel -type FindRestorableTimeRangesClient = original.FindRestorableTimeRangesClient type ImmediateCopyOption = original.ImmediateCopyOption type InnerError = original.InnerError type ItemLevelRestoreCriteria = original.ItemLevelRestoreCriteria type ItemLevelRestoreTargetInfo = original.ItemLevelRestoreTargetInfo -type JobClient = original.JobClient type JobExtendedInfo = original.JobExtendedInfo type JobSubTask = original.JobSubTask type JobsClient = original.JobsClient @@ -431,17 +474,26 @@ type OperationExtendedInfo = original.OperationExtendedInfo type OperationJobExtendedInfo = original.OperationJobExtendedInfo type OperationResource = original.OperationResource type OperationResultClient = original.OperationResultClient +type OperationStatusClient = original.OperationStatusClient type OperationsClient = original.OperationsClient type PatchResourceRequestInput = original.PatchResourceRequestInput type PolicyInfo = original.PolicyInfo type PolicyParameters = original.PolicyParameters type ProtectionStatusDetails = original.ProtectionStatusDetails type RangeBasedItemLevelRestoreCriteria = original.RangeBasedItemLevelRestoreCriteria -type RecoveryPointClient = original.RecoveryPointClient type RecoveryPointDataStoreDetails = original.RecoveryPointDataStoreDetails type RecoveryPointsClient = original.RecoveryPointsClient type RecoveryPointsFilters = original.RecoveryPointsFilters +type ResourceGuard = original.ResourceGuard +type ResourceGuardOperation = original.ResourceGuardOperation +type ResourceGuardResource = original.ResourceGuardResource +type ResourceGuardResourceList = original.ResourceGuardResourceList +type ResourceGuardResourceListIterator = original.ResourceGuardResourceListIterator +type ResourceGuardResourceListPage = original.ResourceGuardResourceListPage +type ResourceGuardsClient = original.ResourceGuardsClient +type ResourceMoveDetails = original.ResourceMoveDetails type RestorableTimeRange = original.RestorableTimeRange +type RestorableTimeRangesClient = original.RestorableTimeRangesClient type RestoreFilesTargetInfo = original.RestoreFilesTargetInfo type RestoreJobRecoveryPointDetails = original.RestoreJobRecoveryPointDetails type RestoreTargetInfo = original.RestoreTargetInfo @@ -449,6 +501,8 @@ type RestoreTargetInfoBase = original.RestoreTargetInfoBase type RetentionTag = original.RetentionTag type ScheduleBasedBackupCriteria = original.ScheduleBasedBackupCriteria type ScheduleBasedTriggerContext = original.ScheduleBasedTriggerContext +type SecretStoreBasedAuthCredentials = original.SecretStoreBasedAuthCredentials +type SecretStoreResource = original.SecretStoreResource type SourceLifeCycle = original.SourceLifeCycle type StorageSetting = original.StorageSetting type SupportedFeature = original.SupportedFeature @@ -495,6 +549,12 @@ func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient { return original.NewBackupPoliciesClientWithBaseURI(baseURI, subscriptionID) } +func NewBackupVaultOperationResultsClient(subscriptionID string) BackupVaultOperationResultsClient { + return original.NewBackupVaultOperationResultsClient(subscriptionID) +} +func NewBackupVaultOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) BackupVaultOperationResultsClient { + return original.NewBackupVaultOperationResultsClientWithBaseURI(baseURI, subscriptionID) +} func NewBackupVaultResourceListIterator(page BackupVaultResourceListPage) BackupVaultResourceListIterator { return original.NewBackupVaultResourceListIterator(page) } @@ -513,12 +573,24 @@ func NewBaseBackupPolicyResourceListIterator(page BaseBackupPolicyResourceListPa func NewBaseBackupPolicyResourceListPage(cur BaseBackupPolicyResourceList, getNextPage func(context.Context, BaseBackupPolicyResourceList) (BaseBackupPolicyResourceList, error)) BaseBackupPolicyResourceListPage { return original.NewBaseBackupPolicyResourceListPage(cur, getNextPage) } +func NewClient(subscriptionID string) Client { + return original.NewClient(subscriptionID) +} func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { return original.NewClientDiscoveryResponseIterator(page) } func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { return original.NewClientDiscoveryResponsePage(cur, getNextPage) } +func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { + return original.NewClientWithBaseURI(baseURI, subscriptionID) +} +func NewDppBaseResourceListIterator(page DppBaseResourceListPage) DppBaseResourceListIterator { + return original.NewDppBaseResourceListIterator(page) +} +func NewDppBaseResourceListPage(cur DppBaseResourceList, getNextPage func(context.Context, DppBaseResourceList) (DppBaseResourceList, error)) DppBaseResourceListPage { + return original.NewDppBaseResourceListPage(cur, getNextPage) +} func NewExportJobsClient(subscriptionID string) ExportJobsClient { return original.NewExportJobsClient(subscriptionID) } @@ -531,18 +603,6 @@ func NewExportJobsOperationResultClient(subscriptionID string) ExportJobsOperati func NewExportJobsOperationResultClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultClient { return original.NewExportJobsOperationResultClientWithBaseURI(baseURI, subscriptionID) } -func NewFindRestorableTimeRangesClient(subscriptionID string) FindRestorableTimeRangesClient { - return original.NewFindRestorableTimeRangesClient(subscriptionID) -} -func NewFindRestorableTimeRangesClientWithBaseURI(baseURI string, subscriptionID string) FindRestorableTimeRangesClient { - return original.NewFindRestorableTimeRangesClientWithBaseURI(baseURI, subscriptionID) -} -func NewJobClient(subscriptionID string) JobClient { - return original.NewJobClient(subscriptionID) -} -func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { - return original.NewJobClientWithBaseURI(baseURI, subscriptionID) -} func NewJobsClient(subscriptionID string) JobsClient { return original.NewJobsClient(subscriptionID) } @@ -555,24 +615,42 @@ func NewOperationResultClient(subscriptionID string) OperationResultClient { func NewOperationResultClientWithBaseURI(baseURI string, subscriptionID string) OperationResultClient { return original.NewOperationResultClientWithBaseURI(baseURI, subscriptionID) } +func NewOperationStatusClient(subscriptionID string) OperationStatusClient { + return original.NewOperationStatusClient(subscriptionID) +} +func NewOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusClient { + return original.NewOperationStatusClientWithBaseURI(baseURI, subscriptionID) +} func NewOperationsClient(subscriptionID string) OperationsClient { return original.NewOperationsClient(subscriptionID) } func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } -func NewRecoveryPointClient(subscriptionID string) RecoveryPointClient { - return original.NewRecoveryPointClient(subscriptionID) -} -func NewRecoveryPointClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointClient { - return original.NewRecoveryPointClientWithBaseURI(baseURI, subscriptionID) -} func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient { return original.NewRecoveryPointsClient(subscriptionID) } func NewRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointsClient { return original.NewRecoveryPointsClientWithBaseURI(baseURI, subscriptionID) } +func NewResourceGuardResourceListIterator(page ResourceGuardResourceListPage) ResourceGuardResourceListIterator { + return original.NewResourceGuardResourceListIterator(page) +} +func NewResourceGuardResourceListPage(cur ResourceGuardResourceList, getNextPage func(context.Context, ResourceGuardResourceList) (ResourceGuardResourceList, error)) ResourceGuardResourceListPage { + return original.NewResourceGuardResourceListPage(cur, getNextPage) +} +func NewResourceGuardsClient(subscriptionID string) ResourceGuardsClient { + return original.NewResourceGuardsClient(subscriptionID) +} +func NewResourceGuardsClientWithBaseURI(baseURI string, subscriptionID string) ResourceGuardsClient { + return original.NewResourceGuardsClientWithBaseURI(baseURI, subscriptionID) +} +func NewRestorableTimeRangesClient(subscriptionID string) RestorableTimeRangesClient { + return original.NewRestorableTimeRangesClient(subscriptionID) +} +func NewRestorableTimeRangesClientWithBaseURI(baseURI string, subscriptionID string) RestorableTimeRangesClient { + return original.NewRestorableTimeRangesClientWithBaseURI(baseURI, subscriptionID) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } @@ -600,6 +678,9 @@ func PossibleFeatureTypeValues() []FeatureType { func PossibleMonthValues() []Month { return original.PossibleMonthValues() } +func PossibleObjectTypeBasicAzureBackupRecoveryPointValues() []ObjectTypeBasicAzureBackupRecoveryPoint { + return original.PossibleObjectTypeBasicAzureBackupRecoveryPointValues() +} func PossibleObjectTypeBasicAzureBackupRestoreRequestValues() []ObjectTypeBasicAzureBackupRestoreRequest { return original.PossibleObjectTypeBasicAzureBackupRestoreRequestValues() } @@ -633,6 +714,9 @@ func PossibleObjectTypeBasicFeatureValidationResponseBaseValues() []ObjectTypeBa func PossibleObjectTypeBasicItemLevelRestoreCriteriaValues() []ObjectTypeBasicItemLevelRestoreCriteria { return original.PossibleObjectTypeBasicItemLevelRestoreCriteriaValues() } +func PossibleObjectTypeBasicOperationExtendedInfoValues() []ObjectTypeBasicOperationExtendedInfo { + return original.PossibleObjectTypeBasicOperationExtendedInfoValues() +} func PossibleObjectTypeBasicRestoreTargetInfoBaseValues() []ObjectTypeBasicRestoreTargetInfoBase { return original.PossibleObjectTypeBasicRestoreTargetInfoBaseValues() } @@ -651,12 +735,18 @@ func PossibleRehydrationPriorityValues() []RehydrationPriority { func PossibleRehydrationStatusValues() []RehydrationStatus { return original.PossibleRehydrationStatusValues() } +func PossibleResourceMoveStateValues() []ResourceMoveState { + return original.PossibleResourceMoveStateValues() +} func PossibleRestoreSourceDataStoreTypeValues() []RestoreSourceDataStoreType { return original.PossibleRestoreSourceDataStoreTypeValues() } func PossibleRestoreTargetLocationTypeValues() []RestoreTargetLocationType { return original.PossibleRestoreTargetLocationTypeValues() } +func PossibleSecretStoreTypeValues() []SecretStoreType { + return original.PossibleSecretStoreTypeValues() +} func PossibleSourceDataStoreTypeValues() []SourceDataStoreType { return original.PossibleSourceDataStoreTypeValues() } diff --git a/profiles/preview/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go b/profiles/preview/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go index 46bbbe661702..1eaeea669c47 100644 --- a/profiles/preview/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go +++ b/profiles/preview/guestconfiguration/mgmt/guestconfiguration/guestconfigurationapi/models.go @@ -9,10 +9,12 @@ package guestconfigurationapi -import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/guestconfigurationapi" +import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/guestconfigurationapi" type AssignmentReportsClientAPI = original.AssignmentReportsClientAPI +type AssignmentReportsVMSSClientAPI = original.AssignmentReportsVMSSClientAPI type AssignmentsClientAPI = original.AssignmentsClientAPI +type AssignmentsVMSSClientAPI = original.AssignmentsVMSSClientAPI type HCRPAssignmentReportsClientAPI = original.HCRPAssignmentReportsClientAPI type HCRPAssignmentsClientAPI = original.HCRPAssignmentsClientAPI type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/preview/guestconfiguration/mgmt/guestconfiguration/models.go b/profiles/preview/guestconfiguration/mgmt/guestconfiguration/models.go index 40323d7a7bc9..05bee258593d 100644 --- a/profiles/preview/guestconfiguration/mgmt/guestconfiguration/models.go +++ b/profiles/preview/guestconfiguration/mgmt/guestconfiguration/models.go @@ -9,7 +9,7 @@ package guestconfiguration -import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration" +import original "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration" const ( DefaultBaseURI = original.DefaultBaseURI @@ -18,46 +18,64 @@ const ( type ActionAfterReboot = original.ActionAfterReboot const ( - ContinueConfiguration ActionAfterReboot = original.ContinueConfiguration - StopConfiguration ActionAfterReboot = original.StopConfiguration + ActionAfterRebootContinueConfiguration ActionAfterReboot = original.ActionAfterRebootContinueConfiguration + ActionAfterRebootStopConfiguration ActionAfterReboot = original.ActionAfterRebootStopConfiguration +) + +type AssignmentType = original.AssignmentType + +const ( + AssignmentTypeApplyAndAutoCorrect AssignmentType = original.AssignmentTypeApplyAndAutoCorrect + AssignmentTypeApplyAndMonitor AssignmentType = original.AssignmentTypeApplyAndMonitor + AssignmentTypeAudit AssignmentType = original.AssignmentTypeAudit + AssignmentTypeDeployAndAutoCorrect AssignmentType = original.AssignmentTypeDeployAndAutoCorrect ) type ComplianceStatus = original.ComplianceStatus const ( - Compliant ComplianceStatus = original.Compliant - NonCompliant ComplianceStatus = original.NonCompliant - Pending ComplianceStatus = original.Pending + ComplianceStatusCompliant ComplianceStatus = original.ComplianceStatusCompliant + ComplianceStatusNonCompliant ComplianceStatus = original.ComplianceStatusNonCompliant + ComplianceStatusPending ComplianceStatus = original.ComplianceStatusPending ) type ConfigurationMode = original.ConfigurationMode const ( - ApplyAndAutoCorrect ConfigurationMode = original.ApplyAndAutoCorrect - ApplyAndMonitor ConfigurationMode = original.ApplyAndMonitor - ApplyOnly ConfigurationMode = original.ApplyOnly + ConfigurationModeApplyAndAutoCorrect ConfigurationMode = original.ConfigurationModeApplyAndAutoCorrect + ConfigurationModeApplyAndMonitor ConfigurationMode = original.ConfigurationModeApplyAndMonitor + ConfigurationModeApplyOnly ConfigurationMode = original.ConfigurationModeApplyOnly +) + +type CreatedByType = original.CreatedByType + +const ( + CreatedByTypeApplication CreatedByType = original.CreatedByTypeApplication + CreatedByTypeKey CreatedByType = original.CreatedByTypeKey + CreatedByTypeManagedIdentity CreatedByType = original.CreatedByTypeManagedIdentity + CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) type Kind = original.Kind const ( - DSC Kind = original.DSC + KindDSC Kind = original.KindDSC ) type ProvisioningState = original.ProvisioningState const ( - Canceled ProvisioningState = original.Canceled - Created ProvisioningState = original.Created - Failed ProvisioningState = original.Failed - Succeeded ProvisioningState = original.Succeeded + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded ) type Type = original.Type const ( - Consistency Type = original.Consistency - Initial Type = original.Initial + TypeConsistency Type = original.TypeConsistency + TypeInitial Type = original.TypeInitial ) type Assignment = original.Assignment @@ -72,7 +90,9 @@ type AssignmentReportResource = original.AssignmentReportResource type AssignmentReportResourceComplianceReason = original.AssignmentReportResourceComplianceReason type AssignmentReportType = original.AssignmentReportType type AssignmentReportsClient = original.AssignmentReportsClient +type AssignmentReportsVMSSClient = original.AssignmentReportsVMSSClient type AssignmentsClient = original.AssignmentsClient +type AssignmentsVMSSClient = original.AssignmentsVMSSClient type BaseClient = original.BaseClient type ConfigurationInfo = original.ConfigurationInfo type ConfigurationParameter = original.ConfigurationParameter @@ -89,8 +109,10 @@ type OperationProperties = original.OperationProperties type OperationsClient = original.OperationsClient type ProxyResource = original.ProxyResource type Resource = original.Resource +type SystemData = original.SystemData type TrackedResource = original.TrackedResource type VMInfo = original.VMInfo +type VMSSVMInfo = original.VMSSVMInfo func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -101,12 +123,24 @@ func NewAssignmentReportsClient(subscriptionID string) AssignmentReportsClient { func NewAssignmentReportsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentReportsClient { return original.NewAssignmentReportsClientWithBaseURI(baseURI, subscriptionID) } +func NewAssignmentReportsVMSSClient(subscriptionID string) AssignmentReportsVMSSClient { + return original.NewAssignmentReportsVMSSClient(subscriptionID) +} +func NewAssignmentReportsVMSSClientWithBaseURI(baseURI string, subscriptionID string) AssignmentReportsVMSSClient { + return original.NewAssignmentReportsVMSSClientWithBaseURI(baseURI, subscriptionID) +} func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return original.NewAssignmentsClient(subscriptionID) } func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient { return original.NewAssignmentsClientWithBaseURI(baseURI, subscriptionID) } +func NewAssignmentsVMSSClient(subscriptionID string) AssignmentsVMSSClient { + return original.NewAssignmentsVMSSClient(subscriptionID) +} +func NewAssignmentsVMSSClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsVMSSClient { + return original.NewAssignmentsVMSSClientWithBaseURI(baseURI, subscriptionID) +} func NewHCRPAssignmentReportsClient(subscriptionID string) HCRPAssignmentReportsClient { return original.NewHCRPAssignmentReportsClient(subscriptionID) } @@ -131,12 +165,18 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleActionAfterRebootValues() []ActionAfterReboot { return original.PossibleActionAfterRebootValues() } +func PossibleAssignmentTypeValues() []AssignmentType { + return original.PossibleAssignmentTypeValues() +} func PossibleComplianceStatusValues() []ComplianceStatus { return original.PossibleComplianceStatusValues() } func PossibleConfigurationModeValues() []ConfigurationMode { return original.PossibleConfigurationModeValues() } +func PossibleCreatedByTypeValues() []CreatedByType { + return original.PossibleCreatedByTypeValues() +} func PossibleKindValues() []Kind { return original.PossibleKindValues() } diff --git a/profiles/preview/netapp/mgmt/netapp/models.go b/profiles/preview/netapp/mgmt/netapp/models.go index faea194d599c..0c93395dd9ee 100644 --- a/profiles/preview/netapp/mgmt/netapp/models.go +++ b/profiles/preview/netapp/mgmt/netapp/models.go @@ -12,7 +12,7 @@ package netapp import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-04-01/netapp" + original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-06-01/netapp" ) const ( @@ -29,6 +29,13 @@ const ( ActiveDirectoryStatusUpdating ActiveDirectoryStatus = original.ActiveDirectoryStatusUpdating ) +type AvsDataStore = original.AvsDataStore + +const ( + AvsDataStoreDisabled AvsDataStore = original.AvsDataStoreDisabled + AvsDataStoreEnabled AvsDataStore = original.AvsDataStoreEnabled +) + type BackupType = original.BackupType const ( @@ -70,6 +77,13 @@ const ( CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) +type EncryptionType = original.EncryptionType + +const ( + EncryptionTypeDouble EncryptionType = original.EncryptionTypeDouble + EncryptionTypeSingle EncryptionType = original.EncryptionTypeSingle +) + type EndpointType = original.EndpointType const ( @@ -84,6 +98,12 @@ const ( InAvailabilityReasonTypeInvalid InAvailabilityReasonType = original.InAvailabilityReasonTypeInvalid ) +type MetricAggregationType = original.MetricAggregationType + +const ( + MetricAggregationTypeAverage MetricAggregationType = original.MetricAggregationTypeAverage +) + type MirrorState = original.MirrorState const ( @@ -124,9 +144,10 @@ const ( type ServiceLevel = original.ServiceLevel const ( - ServiceLevelPremium ServiceLevel = original.ServiceLevelPremium - ServiceLevelStandard ServiceLevel = original.ServiceLevelStandard - ServiceLevelUltra ServiceLevel = original.ServiceLevelUltra + ServiceLevelPremium ServiceLevel = original.ServiceLevelPremium + ServiceLevelStandard ServiceLevel = original.ServiceLevelStandard + ServiceLevelStandardZRS ServiceLevel = original.ServiceLevelStandardZRS + ServiceLevelUltra ServiceLevel = original.ServiceLevelUltra ) type Account = original.Account @@ -343,6 +364,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleActiveDirectoryStatusValues() []ActiveDirectoryStatus { return original.PossibleActiveDirectoryStatusValues() } +func PossibleAvsDataStoreValues() []AvsDataStore { + return original.PossibleAvsDataStoreValues() +} func PossibleBackupTypeValues() []BackupType { return original.PossibleBackupTypeValues() } @@ -358,12 +382,18 @@ func PossibleChownModeValues() []ChownMode { func PossibleCreatedByTypeValues() []CreatedByType { return original.PossibleCreatedByTypeValues() } +func PossibleEncryptionTypeValues() []EncryptionType { + return original.PossibleEncryptionTypeValues() +} func PossibleEndpointTypeValues() []EndpointType { return original.PossibleEndpointTypeValues() } func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { return original.PossibleInAvailabilityReasonTypeValues() } +func PossibleMetricAggregationTypeValues() []MetricAggregationType { + return original.PossibleMetricAggregationTypeValues() +} func PossibleMirrorStateValues() []MirrorState { return original.PossibleMirrorStateValues() } diff --git a/profiles/preview/netapp/mgmt/netapp/netappapi/models.go b/profiles/preview/netapp/mgmt/netapp/netappapi/models.go index 41df0539c47c..df5e5cba91a2 100644 --- a/profiles/preview/netapp/mgmt/netapp/netappapi/models.go +++ b/profiles/preview/netapp/mgmt/netapp/netappapi/models.go @@ -9,7 +9,7 @@ package netappapi -import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-04-01/netapp/netappapi" +import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-06-01/netapp/netappapi" type AccountBackupsClientAPI = original.AccountBackupsClientAPI type AccountsClientAPI = original.AccountsClientAPI diff --git a/profiles/preview/network/mgmt/network/models.go b/profiles/preview/network/mgmt/network/models.go index 71ea2d48e90a..1505c6419739 100644 --- a/profiles/preview/network/mgmt/network/models.go +++ b/profiles/preview/network/mgmt/network/models.go @@ -12,7 +12,7 @@ package network import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" + original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-03-01/network" ) const ( @@ -57,6 +57,14 @@ const ( ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = original.ApplicationGatewayFirewallModePrevention ) +type ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithm + +const ( + ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithmIPHash + ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithmLeastConnections + ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = original.ApplicationGatewayLoadDistributionAlgorithmRoundRobin +) + type ApplicationGatewayOperationalState = original.ApplicationGatewayOperationalState const ( @@ -1442,6 +1450,7 @@ type ApplicationGatewayFrontendIPConfiguration = original.ApplicationGatewayFron type ApplicationGatewayFrontendIPConfigurationPropertiesFormat = original.ApplicationGatewayFrontendIPConfigurationPropertiesFormat type ApplicationGatewayFrontendPort = original.ApplicationGatewayFrontendPort type ApplicationGatewayFrontendPortPropertiesFormat = original.ApplicationGatewayFrontendPortPropertiesFormat +type ApplicationGatewayGlobalConfiguration = original.ApplicationGatewayGlobalConfiguration type ApplicationGatewayHTTPListener = original.ApplicationGatewayHTTPListener type ApplicationGatewayHTTPListenerPropertiesFormat = original.ApplicationGatewayHTTPListenerPropertiesFormat type ApplicationGatewayHeaderConfiguration = original.ApplicationGatewayHeaderConfiguration @@ -1450,6 +1459,10 @@ type ApplicationGatewayIPConfigurationPropertiesFormat = original.ApplicationGat type ApplicationGatewayListResult = original.ApplicationGatewayListResult type ApplicationGatewayListResultIterator = original.ApplicationGatewayListResultIterator type ApplicationGatewayListResultPage = original.ApplicationGatewayListResultPage +type ApplicationGatewayLoadDistributionPolicy = original.ApplicationGatewayLoadDistributionPolicy +type ApplicationGatewayLoadDistributionPolicyPropertiesFormat = original.ApplicationGatewayLoadDistributionPolicyPropertiesFormat +type ApplicationGatewayLoadDistributionTarget = original.ApplicationGatewayLoadDistributionTarget +type ApplicationGatewayLoadDistributionTargetPropertiesFormat = original.ApplicationGatewayLoadDistributionTargetPropertiesFormat type ApplicationGatewayOnDemandProbe = original.ApplicationGatewayOnDemandProbe type ApplicationGatewayPathRule = original.ApplicationGatewayPathRule type ApplicationGatewayPathRulePropertiesFormat = original.ApplicationGatewayPathRulePropertiesFormat @@ -1610,6 +1623,7 @@ type BastionHostPropertiesFormat = original.BastionHostPropertiesFormat type BastionHostsClient = original.BastionHostsClient type BastionHostsCreateOrUpdateFuture = original.BastionHostsCreateOrUpdateFuture type BastionHostsDeleteFuture = original.BastionHostsDeleteFuture +type BastionHostsUpdateTagsFuture = original.BastionHostsUpdateTagsFuture type BastionSessionDeleteResult = original.BastionSessionDeleteResult type BastionSessionDeleteResultIterator = original.BastionSessionDeleteResultIterator type BastionSessionDeleteResultPage = original.BastionSessionDeleteResultPage @@ -1735,6 +1749,7 @@ type Error = original.Error type ErrorDetails = original.ErrorDetails type ErrorResponse = original.ErrorResponse type EvaluatedNetworkSecurityGroup = original.EvaluatedNetworkSecurityGroup +type ExplicitProxySettings = original.ExplicitProxySettings type ExpressRouteCircuit = original.ExpressRouteCircuit type ExpressRouteCircuitArpTable = original.ExpressRouteCircuitArpTable type ExpressRouteCircuitAuthorization = original.ExpressRouteCircuitAuthorization @@ -1876,6 +1891,7 @@ type FirewallPolicyRuleCollectionGroupsClient = original.FirewallPolicyRuleColle type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture = original.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture type FirewallPolicyRuleCollectionGroupsDeleteFuture = original.FirewallPolicyRuleCollectionGroupsDeleteFuture type FirewallPolicySNAT = original.FirewallPolicySNAT +type FirewallPolicySQL = original.FirewallPolicySQL type FirewallPolicySku = original.FirewallPolicySku type FirewallPolicyThreatIntelWhitelist = original.FirewallPolicyThreatIntelWhitelist type FirewallPolicyTransportSecurity = original.FirewallPolicyTransportSecurity @@ -2190,6 +2206,8 @@ type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionLis type PrivateEndpointConnectionListResultIterator = original.PrivateEndpointConnectionListResultIterator type PrivateEndpointConnectionListResultPage = original.PrivateEndpointConnectionListResultPage type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointIPConfiguration = original.PrivateEndpointIPConfiguration +type PrivateEndpointIPConfigurationProperties = original.PrivateEndpointIPConfigurationProperties type PrivateEndpointListResult = original.PrivateEndpointListResult type PrivateEndpointListResultIterator = original.PrivateEndpointListResultIterator type PrivateEndpointListResultPage = original.PrivateEndpointListResultPage @@ -2249,6 +2267,7 @@ type PublicIPPrefixesCreateOrUpdateFuture = original.PublicIPPrefixesCreateOrUpd type PublicIPPrefixesDeleteFuture = original.PublicIPPrefixesDeleteFuture type PutBastionShareableLinkAllFuture = original.PutBastionShareableLinkAllFuture type PutBastionShareableLinkFuture = original.PutBastionShareableLinkFuture +type QosDefinition = original.QosDefinition type QosIPRange = original.QosIPRange type QosPortRange = original.QosPortRange type QueryTroubleshootingParameters = original.QueryTroubleshootingParameters @@ -2349,6 +2368,10 @@ type ServiceEndpointPolicyListResultPage = original.ServiceEndpointPolicyListRes type ServiceEndpointPolicyPropertiesFormat = original.ServiceEndpointPolicyPropertiesFormat type ServiceEndpointPropertiesFormat = original.ServiceEndpointPropertiesFormat type ServiceTagInformation = original.ServiceTagInformation +type ServiceTagInformationClient = original.ServiceTagInformationClient +type ServiceTagInformationListResult = original.ServiceTagInformationListResult +type ServiceTagInformationListResultIterator = original.ServiceTagInformationListResultIterator +type ServiceTagInformationListResultPage = original.ServiceTagInformationListResultPage type ServiceTagInformationPropertiesFormat = original.ServiceTagInformationPropertiesFormat type ServiceTagsClient = original.ServiceTagsClient type ServiceTagsListResult = original.ServiceTagsListResult @@ -3596,6 +3619,18 @@ func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListRe func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { return original.NewServiceEndpointPolicyListResultPage(cur, getNextPage) } +func NewServiceTagInformationClient(subscriptionID string) ServiceTagInformationClient { + return original.NewServiceTagInformationClient(subscriptionID) +} +func NewServiceTagInformationClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagInformationClient { + return original.NewServiceTagInformationClientWithBaseURI(baseURI, subscriptionID) +} +func NewServiceTagInformationListResultIterator(page ServiceTagInformationListResultPage) ServiceTagInformationListResultIterator { + return original.NewServiceTagInformationListResultIterator(page) +} +func NewServiceTagInformationListResultPage(cur ServiceTagInformationListResult, getNextPage func(context.Context, ServiceTagInformationListResult) (ServiceTagInformationListResult, error)) ServiceTagInformationListResultPage { + return original.NewServiceTagInformationListResultPage(cur, getNextPage) +} func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return original.NewServiceTagsClient(subscriptionID) } @@ -3896,6 +3931,9 @@ func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewa func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { return original.PossibleApplicationGatewayFirewallModeValues() } +func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGatewayLoadDistributionAlgorithm { + return original.PossibleApplicationGatewayLoadDistributionAlgorithmValues() +} func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { return original.PossibleApplicationGatewayOperationalStateValues() } diff --git a/profiles/preview/network/mgmt/network/networkapi/models.go b/profiles/preview/network/mgmt/network/networkapi/models.go index 65d9722785ae..a0f44a64c25d 100644 --- a/profiles/preview/network/mgmt/network/networkapi/models.go +++ b/profiles/preview/network/mgmt/network/networkapi/models.go @@ -9,7 +9,7 @@ package networkapi -import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/networkapi" +import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-03-01/network/networkapi" type ApplicationGatewayPrivateEndpointConnectionsClientAPI = original.ApplicationGatewayPrivateEndpointConnectionsClientAPI type ApplicationGatewayPrivateLinkResourcesClientAPI = original.ApplicationGatewayPrivateLinkResourcesClientAPI @@ -87,6 +87,7 @@ type SecurityRulesClientAPI = original.SecurityRulesClientAPI type ServiceAssociationLinksClientAPI = original.ServiceAssociationLinksClientAPI type ServiceEndpointPoliciesClientAPI = original.ServiceEndpointPoliciesClientAPI type ServiceEndpointPolicyDefinitionsClientAPI = original.ServiceEndpointPolicyDefinitionsClientAPI +type ServiceTagInformationClientAPI = original.ServiceTagInformationClientAPI type ServiceTagsClientAPI = original.ServiceTagsClientAPI type SubnetsClientAPI = original.SubnetsClientAPI type UsagesClientAPI = original.UsagesClientAPI diff --git a/profiles/preview/postgresql/mgmt/postgresqlflexibleservers/models.go b/profiles/preview/postgresql/mgmt/postgresqlflexibleservers/models.go index 29bfb6afc7a4..27961725e820 100644 --- a/profiles/preview/postgresql/mgmt/postgresqlflexibleservers/models.go +++ b/profiles/preview/postgresql/mgmt/postgresqlflexibleservers/models.go @@ -53,6 +53,15 @@ const ( CreatedByTypeUser CreatedByType = original.CreatedByTypeUser ) +type FailoverMode = original.FailoverMode + +const ( + FailoverModeForcedFailover FailoverMode = original.FailoverModeForcedFailover + FailoverModeForcedSwitchover FailoverMode = original.FailoverModeForcedSwitchover + FailoverModePlannedFailover FailoverMode = original.FailoverModePlannedFailover + FailoverModePlannedSwitchover FailoverMode = original.FailoverModePlannedSwitchover +) + type GeoRedundantBackupEnum = original.GeoRedundantBackupEnum const ( @@ -303,6 +312,9 @@ func PossibleCreateModeValues() []CreateMode { func PossibleCreatedByTypeValues() []CreatedByType { return original.PossibleCreatedByTypeValues() } +func PossibleFailoverModeValues() []FailoverMode { + return original.PossibleFailoverModeValues() +} func PossibleGeoRedundantBackupEnumValues() []GeoRedundantBackupEnum { return original.PossibleGeoRedundantBackupEnumValues() } diff --git a/profiles/preview/preview/synapse/mgmt/synapse/models.go b/profiles/preview/preview/synapse/mgmt/synapse/models.go index 4454023955f0..7aa064230da6 100644 --- a/profiles/preview/preview/synapse/mgmt/synapse/models.go +++ b/profiles/preview/preview/synapse/mgmt/synapse/models.go @@ -12,7 +12,7 @@ package synapse import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse" + original "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2021-06-01-preview/synapse" ) const ( @@ -22,11 +22,19 @@ const ( type ActualState = original.ActualState const ( - Disabled ActualState = original.Disabled - Disabling ActualState = original.Disabling - Enabled ActualState = original.Enabled - Enabling ActualState = original.Enabling - Unknown ActualState = original.Unknown + ActualStateDisabled ActualState = original.ActualStateDisabled + ActualStateDisabling ActualState = original.ActualStateDisabling + ActualStateEnabled ActualState = original.ActualStateEnabled + ActualStateEnabling ActualState = original.ActualStateEnabling + ActualStateUnknown ActualState = original.ActualStateUnknown +) + +type AuthenticationState = original.AuthenticationState + +const ( + AuthenticationStateConsistent AuthenticationState = original.AuthenticationStateConsistent + AuthenticationStateInConsistent AuthenticationState = original.AuthenticationStateInConsistent + AuthenticationStateUpdating AuthenticationState = original.AuthenticationStateUpdating ) type AuthorizationType = original.AuthorizationType @@ -47,48 +55,55 @@ const ( type ColumnDataType = original.ColumnDataType const ( - Bigint ColumnDataType = original.Bigint - Binary ColumnDataType = original.Binary - Bit ColumnDataType = original.Bit - Char ColumnDataType = original.Char - Date ColumnDataType = original.Date - Datetime ColumnDataType = original.Datetime - Datetime2 ColumnDataType = original.Datetime2 - Datetimeoffset ColumnDataType = original.Datetimeoffset - Decimal ColumnDataType = original.Decimal - Float ColumnDataType = original.Float - Geography ColumnDataType = original.Geography - Geometry ColumnDataType = original.Geometry - Hierarchyid ColumnDataType = original.Hierarchyid - Image ColumnDataType = original.Image - Int ColumnDataType = original.Int - Money ColumnDataType = original.Money - Nchar ColumnDataType = original.Nchar - Ntext ColumnDataType = original.Ntext - Numeric ColumnDataType = original.Numeric - Nvarchar ColumnDataType = original.Nvarchar - Real ColumnDataType = original.Real - Smalldatetime ColumnDataType = original.Smalldatetime - Smallint ColumnDataType = original.Smallint - Smallmoney ColumnDataType = original.Smallmoney - SQLVariant ColumnDataType = original.SQLVariant - Sysname ColumnDataType = original.Sysname - Text ColumnDataType = original.Text - Time ColumnDataType = original.Time - Timestamp ColumnDataType = original.Timestamp - Tinyint ColumnDataType = original.Tinyint - Uniqueidentifier ColumnDataType = original.Uniqueidentifier - Varbinary ColumnDataType = original.Varbinary - Varchar ColumnDataType = original.Varchar - XML ColumnDataType = original.XML + ColumnDataTypeBigint ColumnDataType = original.ColumnDataTypeBigint + ColumnDataTypeBinary ColumnDataType = original.ColumnDataTypeBinary + ColumnDataTypeBit ColumnDataType = original.ColumnDataTypeBit + ColumnDataTypeChar ColumnDataType = original.ColumnDataTypeChar + ColumnDataTypeDate ColumnDataType = original.ColumnDataTypeDate + ColumnDataTypeDatetime ColumnDataType = original.ColumnDataTypeDatetime + ColumnDataTypeDatetime2 ColumnDataType = original.ColumnDataTypeDatetime2 + ColumnDataTypeDatetimeoffset ColumnDataType = original.ColumnDataTypeDatetimeoffset + ColumnDataTypeDecimal ColumnDataType = original.ColumnDataTypeDecimal + ColumnDataTypeFloat ColumnDataType = original.ColumnDataTypeFloat + ColumnDataTypeGeography ColumnDataType = original.ColumnDataTypeGeography + ColumnDataTypeGeometry ColumnDataType = original.ColumnDataTypeGeometry + ColumnDataTypeHierarchyid ColumnDataType = original.ColumnDataTypeHierarchyid + ColumnDataTypeImage ColumnDataType = original.ColumnDataTypeImage + ColumnDataTypeInt ColumnDataType = original.ColumnDataTypeInt + ColumnDataTypeMoney ColumnDataType = original.ColumnDataTypeMoney + ColumnDataTypeNchar ColumnDataType = original.ColumnDataTypeNchar + ColumnDataTypeNtext ColumnDataType = original.ColumnDataTypeNtext + ColumnDataTypeNumeric ColumnDataType = original.ColumnDataTypeNumeric + ColumnDataTypeNvarchar ColumnDataType = original.ColumnDataTypeNvarchar + ColumnDataTypeReal ColumnDataType = original.ColumnDataTypeReal + ColumnDataTypeSmalldatetime ColumnDataType = original.ColumnDataTypeSmalldatetime + ColumnDataTypeSmallint ColumnDataType = original.ColumnDataTypeSmallint + ColumnDataTypeSmallmoney ColumnDataType = original.ColumnDataTypeSmallmoney + ColumnDataTypeSQLVariant ColumnDataType = original.ColumnDataTypeSQLVariant + ColumnDataTypeSysname ColumnDataType = original.ColumnDataTypeSysname + ColumnDataTypeText ColumnDataType = original.ColumnDataTypeText + ColumnDataTypeTime ColumnDataType = original.ColumnDataTypeTime + ColumnDataTypeTimestamp ColumnDataType = original.ColumnDataTypeTimestamp + ColumnDataTypeTinyint ColumnDataType = original.ColumnDataTypeTinyint + ColumnDataTypeUniqueidentifier ColumnDataType = original.ColumnDataTypeUniqueidentifier + ColumnDataTypeVarbinary ColumnDataType = original.ColumnDataTypeVarbinary + ColumnDataTypeVarchar ColumnDataType = original.ColumnDataTypeVarchar + ColumnDataTypeXML ColumnDataType = original.ColumnDataTypeXML +) + +type ConfigurationType = original.ConfigurationType + +const ( + ConfigurationTypeArtifact ConfigurationType = original.ConfigurationTypeArtifact + ConfigurationTypeFile ConfigurationType = original.ConfigurationTypeFile ) type DataFlowComputeType = original.DataFlowComputeType const ( - ComputeOptimized DataFlowComputeType = original.ComputeOptimized - General DataFlowComputeType = original.General - MemoryOptimized DataFlowComputeType = original.MemoryOptimized + DataFlowComputeTypeComputeOptimized DataFlowComputeType = original.DataFlowComputeTypeComputeOptimized + DataFlowComputeTypeGeneral DataFlowComputeType = original.DataFlowComputeTypeGeneral + DataFlowComputeTypeMemoryOptimized DataFlowComputeType = original.DataFlowComputeTypeMemoryOptimized ) type DataMaskingFunction = original.DataMaskingFunction @@ -116,6 +131,18 @@ const ( DataMaskingStateEnabled DataMaskingState = original.DataMaskingStateEnabled ) +type DayOfWeek = original.DayOfWeek + +const ( + DayOfWeekFriday DayOfWeek = original.DayOfWeekFriday + DayOfWeekMonday DayOfWeek = original.DayOfWeekMonday + DayOfWeekSaturday DayOfWeek = original.DayOfWeekSaturday + DayOfWeekSunday DayOfWeek = original.DayOfWeekSunday + DayOfWeekThursday DayOfWeek = original.DayOfWeekThursday + DayOfWeekTuesday DayOfWeek = original.DayOfWeekTuesday + DayOfWeekWednesday DayOfWeek = original.DayOfWeekWednesday +) + type DesiredState = original.DesiredState const ( @@ -133,44 +160,44 @@ const ( type IntegrationRuntimeAuthKeyName = original.IntegrationRuntimeAuthKeyName const ( - AuthKey1 IntegrationRuntimeAuthKeyName = original.AuthKey1 - AuthKey2 IntegrationRuntimeAuthKeyName = original.AuthKey2 + IntegrationRuntimeAuthKeyNameAuthKey1 IntegrationRuntimeAuthKeyName = original.IntegrationRuntimeAuthKeyNameAuthKey1 + IntegrationRuntimeAuthKeyNameAuthKey2 IntegrationRuntimeAuthKeyName = original.IntegrationRuntimeAuthKeyNameAuthKey2 ) type IntegrationRuntimeAutoUpdate = original.IntegrationRuntimeAutoUpdate const ( - Off IntegrationRuntimeAutoUpdate = original.Off - On IntegrationRuntimeAutoUpdate = original.On + IntegrationRuntimeAutoUpdateOff IntegrationRuntimeAutoUpdate = original.IntegrationRuntimeAutoUpdateOff + IntegrationRuntimeAutoUpdateOn IntegrationRuntimeAutoUpdate = original.IntegrationRuntimeAutoUpdateOn ) type IntegrationRuntimeEdition = original.IntegrationRuntimeEdition const ( - Enterprise IntegrationRuntimeEdition = original.Enterprise - Standard IntegrationRuntimeEdition = original.Standard + IntegrationRuntimeEditionEnterprise IntegrationRuntimeEdition = original.IntegrationRuntimeEditionEnterprise + IntegrationRuntimeEditionStandard IntegrationRuntimeEdition = original.IntegrationRuntimeEditionStandard ) type IntegrationRuntimeEntityReferenceType = original.IntegrationRuntimeEntityReferenceType const ( - IntegrationRuntimeReference IntegrationRuntimeEntityReferenceType = original.IntegrationRuntimeReference - LinkedServiceReference IntegrationRuntimeEntityReferenceType = original.LinkedServiceReference + IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference IntegrationRuntimeEntityReferenceType = original.IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference + IntegrationRuntimeEntityReferenceTypeLinkedServiceReference IntegrationRuntimeEntityReferenceType = original.IntegrationRuntimeEntityReferenceTypeLinkedServiceReference ) type IntegrationRuntimeInternalChannelEncryptionMode = original.IntegrationRuntimeInternalChannelEncryptionMode const ( - NotEncrypted IntegrationRuntimeInternalChannelEncryptionMode = original.NotEncrypted - NotSet IntegrationRuntimeInternalChannelEncryptionMode = original.NotSet - SslEncrypted IntegrationRuntimeInternalChannelEncryptionMode = original.SslEncrypted + IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted IntegrationRuntimeInternalChannelEncryptionMode = original.IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted + IntegrationRuntimeInternalChannelEncryptionModeNotSet IntegrationRuntimeInternalChannelEncryptionMode = original.IntegrationRuntimeInternalChannelEncryptionModeNotSet + IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted IntegrationRuntimeInternalChannelEncryptionMode = original.IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted ) type IntegrationRuntimeLicenseType = original.IntegrationRuntimeLicenseType const ( - BasePrice IntegrationRuntimeLicenseType = original.BasePrice - LicenseIncluded IntegrationRuntimeLicenseType = original.LicenseIncluded + IntegrationRuntimeLicenseTypeBasePrice IntegrationRuntimeLicenseType = original.IntegrationRuntimeLicenseTypeBasePrice + IntegrationRuntimeLicenseTypeLicenseIncluded IntegrationRuntimeLicenseType = original.IntegrationRuntimeLicenseTypeLicenseIncluded ) type IntegrationRuntimeSsisCatalogPricingTier = original.IntegrationRuntimeSsisCatalogPricingTier @@ -185,31 +212,31 @@ const ( type IntegrationRuntimeState = original.IntegrationRuntimeState const ( - AccessDenied IntegrationRuntimeState = original.AccessDenied - Initial IntegrationRuntimeState = original.Initial - Limited IntegrationRuntimeState = original.Limited - NeedRegistration IntegrationRuntimeState = original.NeedRegistration - Offline IntegrationRuntimeState = original.Offline - Online IntegrationRuntimeState = original.Online - Started IntegrationRuntimeState = original.Started - Starting IntegrationRuntimeState = original.Starting - Stopped IntegrationRuntimeState = original.Stopped - Stopping IntegrationRuntimeState = original.Stopping + IntegrationRuntimeStateAccessDenied IntegrationRuntimeState = original.IntegrationRuntimeStateAccessDenied + IntegrationRuntimeStateInitial IntegrationRuntimeState = original.IntegrationRuntimeStateInitial + IntegrationRuntimeStateLimited IntegrationRuntimeState = original.IntegrationRuntimeStateLimited + IntegrationRuntimeStateNeedRegistration IntegrationRuntimeState = original.IntegrationRuntimeStateNeedRegistration + IntegrationRuntimeStateOffline IntegrationRuntimeState = original.IntegrationRuntimeStateOffline + IntegrationRuntimeStateOnline IntegrationRuntimeState = original.IntegrationRuntimeStateOnline + IntegrationRuntimeStateStarted IntegrationRuntimeState = original.IntegrationRuntimeStateStarted + IntegrationRuntimeStateStarting IntegrationRuntimeState = original.IntegrationRuntimeStateStarting + IntegrationRuntimeStateStopped IntegrationRuntimeState = original.IntegrationRuntimeStateStopped + IntegrationRuntimeStateStopping IntegrationRuntimeState = original.IntegrationRuntimeStateStopping ) type IntegrationRuntimeType = original.IntegrationRuntimeType const ( - Managed IntegrationRuntimeType = original.Managed - SelfHosted IntegrationRuntimeType = original.SelfHosted + IntegrationRuntimeTypeManaged IntegrationRuntimeType = original.IntegrationRuntimeTypeManaged + IntegrationRuntimeTypeSelfHosted IntegrationRuntimeType = original.IntegrationRuntimeTypeSelfHosted ) type IntegrationRuntimeUpdateResult = original.IntegrationRuntimeUpdateResult const ( - Fail IntegrationRuntimeUpdateResult = original.Fail - None IntegrationRuntimeUpdateResult = original.None - Succeed IntegrationRuntimeUpdateResult = original.Succeed + IntegrationRuntimeUpdateResultFail IntegrationRuntimeUpdateResult = original.IntegrationRuntimeUpdateResultFail + IntegrationRuntimeUpdateResultNone IntegrationRuntimeUpdateResult = original.IntegrationRuntimeUpdateResultNone + IntegrationRuntimeUpdateResultSucceed IntegrationRuntimeUpdateResult = original.IntegrationRuntimeUpdateResultSucceed ) type ManagedIntegrationRuntimeNodeStatus = original.ManagedIntegrationRuntimeNodeStatus @@ -224,12 +251,12 @@ const ( 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 + ManagementOperationStateCancelInProgress ManagementOperationState = original.ManagementOperationStateCancelInProgress + ManagementOperationStateCancelled ManagementOperationState = original.ManagementOperationStateCancelled + ManagementOperationStateFailed ManagementOperationState = original.ManagementOperationStateFailed + ManagementOperationStateInProgress ManagementOperationState = original.ManagementOperationStateInProgress + ManagementOperationStatePending ManagementOperationState = original.ManagementOperationStatePending + ManagementOperationStateSucceeded ManagementOperationState = original.ManagementOperationStateSucceeded ) type NodeSize = original.NodeSize @@ -247,8 +274,10 @@ const ( type NodeSizeFamily = original.NodeSizeFamily const ( - NodeSizeFamilyMemoryOptimized NodeSizeFamily = original.NodeSizeFamilyMemoryOptimized - NodeSizeFamilyNone NodeSizeFamily = original.NodeSizeFamilyNone + NodeSizeFamilyHardwareAcceleratedFPGA NodeSizeFamily = original.NodeSizeFamilyHardwareAcceleratedFPGA + NodeSizeFamilyHardwareAcceleratedGPU NodeSizeFamily = original.NodeSizeFamilyHardwareAcceleratedGPU + NodeSizeFamilyMemoryOptimized NodeSizeFamily = original.NodeSizeFamilyMemoryOptimized + NodeSizeFamilyNone NodeSizeFamily = original.NodeSizeFamilyNone ) type OperationStatus = original.OperationStatus @@ -273,71 +302,79 @@ const ( type QueryAggregationFunction = original.QueryAggregationFunction const ( - Avg QueryAggregationFunction = original.Avg - Max QueryAggregationFunction = original.Max - Min QueryAggregationFunction = original.Min - Sum QueryAggregationFunction = original.Sum + QueryAggregationFunctionAvg QueryAggregationFunction = original.QueryAggregationFunctionAvg + QueryAggregationFunctionMax QueryAggregationFunction = original.QueryAggregationFunctionMax + QueryAggregationFunctionMin QueryAggregationFunction = original.QueryAggregationFunctionMin + QueryAggregationFunctionSum QueryAggregationFunction = original.QueryAggregationFunctionSum ) type QueryExecutionType = original.QueryExecutionType const ( - Aborted QueryExecutionType = original.Aborted - Any QueryExecutionType = original.Any - Exception QueryExecutionType = original.Exception - Irregular QueryExecutionType = original.Irregular - Regular QueryExecutionType = original.Regular + QueryExecutionTypeAborted QueryExecutionType = original.QueryExecutionTypeAborted + QueryExecutionTypeAny QueryExecutionType = original.QueryExecutionTypeAny + QueryExecutionTypeException QueryExecutionType = original.QueryExecutionTypeException + QueryExecutionTypeIrregular QueryExecutionType = original.QueryExecutionTypeIrregular + QueryExecutionTypeRegular QueryExecutionType = original.QueryExecutionTypeRegular ) type QueryMetricUnit = original.QueryMetricUnit const ( - KB QueryMetricUnit = original.KB - Microseconds QueryMetricUnit = original.Microseconds - Percentage QueryMetricUnit = original.Percentage + QueryMetricUnitKB QueryMetricUnit = original.QueryMetricUnitKB + QueryMetricUnitMicroseconds QueryMetricUnit = original.QueryMetricUnitMicroseconds + QueryMetricUnitPercentage QueryMetricUnit = original.QueryMetricUnitPercentage ) type QueryObservedMetricType = original.QueryObservedMetricType const ( - CPU QueryObservedMetricType = original.CPU - Duration QueryObservedMetricType = original.Duration - ExecutionCount QueryObservedMetricType = original.ExecutionCount - Io QueryObservedMetricType = original.Io - Logio QueryObservedMetricType = original.Logio + QueryObservedMetricTypeCPU QueryObservedMetricType = original.QueryObservedMetricTypeCPU + QueryObservedMetricTypeDuration QueryObservedMetricType = original.QueryObservedMetricTypeDuration + QueryObservedMetricTypeExecutionCount QueryObservedMetricType = original.QueryObservedMetricTypeExecutionCount + QueryObservedMetricTypeIo QueryObservedMetricType = original.QueryObservedMetricTypeIo + QueryObservedMetricTypeLogio QueryObservedMetricType = original.QueryObservedMetricTypeLogio +) + +type RecommendedSensitivityLabelUpdateKind = original.RecommendedSensitivityLabelUpdateKind + +const ( + RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = original.RecommendedSensitivityLabelUpdateKindDisable + RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = original.RecommendedSensitivityLabelUpdateKindEnable ) type ReplicationRole = original.ReplicationRole const ( - Copy ReplicationRole = original.Copy - NonReadableSecondary ReplicationRole = original.NonReadableSecondary - Primary ReplicationRole = original.Primary - Secondary ReplicationRole = original.Secondary - Source ReplicationRole = original.Source + ReplicationRoleCopy ReplicationRole = original.ReplicationRoleCopy + ReplicationRoleNonReadableSecondary ReplicationRole = original.ReplicationRoleNonReadableSecondary + ReplicationRolePrimary ReplicationRole = original.ReplicationRolePrimary + ReplicationRoleSecondary ReplicationRole = original.ReplicationRoleSecondary + ReplicationRoleSource ReplicationRole = original.ReplicationRoleSource ) type ReplicationState = original.ReplicationState const ( - CATCHUP ReplicationState = original.CATCHUP - PENDING ReplicationState = original.PENDING - SEEDING ReplicationState = original.SEEDING - SUSPENDED ReplicationState = original.SUSPENDED + ReplicationStateCATCHUP ReplicationState = original.ReplicationStateCATCHUP + ReplicationStatePENDING ReplicationState = original.ReplicationStatePENDING + ReplicationStateSEEDING ReplicationState = original.ReplicationStateSEEDING + ReplicationStateSUSPENDED ReplicationState = original.ReplicationStateSUSPENDED ) type ResourceIdentityType = original.ResourceIdentityType const ( - ResourceIdentityTypeNone ResourceIdentityType = original.ResourceIdentityTypeNone - ResourceIdentityTypeSystemAssigned ResourceIdentityType = original.ResourceIdentityTypeSystemAssigned + ResourceIdentityTypeNone ResourceIdentityType = original.ResourceIdentityTypeNone + ResourceIdentityTypeSystemAssigned ResourceIdentityType = original.ResourceIdentityTypeSystemAssigned + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = original.ResourceIdentityTypeSystemAssignedUserAssigned ) type RestorePointType = original.RestorePointType const ( - CONTINUOUS RestorePointType = original.CONTINUOUS - DISCRETE RestorePointType = original.DISCRETE + RestorePointTypeCONTINUOUS RestorePointType = original.RestorePointTypeCONTINUOUS + RestorePointTypeDISCRETE RestorePointType = original.RestorePointTypeDISCRETE ) type SecurityAlertPolicyState = original.SecurityAlertPolicyState @@ -360,20 +397,52 @@ const ( SelfHostedIntegrationRuntimeNodeStatusUpgrading SelfHostedIntegrationRuntimeNodeStatus = original.SelfHostedIntegrationRuntimeNodeStatusUpgrading ) +type SensitivityLabelRank = original.SensitivityLabelRank + +const ( + SensitivityLabelRankCritical SensitivityLabelRank = original.SensitivityLabelRankCritical + SensitivityLabelRankHigh SensitivityLabelRank = original.SensitivityLabelRankHigh + SensitivityLabelRankLow SensitivityLabelRank = original.SensitivityLabelRankLow + SensitivityLabelRankMedium SensitivityLabelRank = original.SensitivityLabelRankMedium + SensitivityLabelRankNone SensitivityLabelRank = original.SensitivityLabelRankNone +) + type SensitivityLabelSource = original.SensitivityLabelSource const ( - Current SensitivityLabelSource = original.Current - Recommended SensitivityLabelSource = original.Recommended + SensitivityLabelSourceCurrent SensitivityLabelSource = original.SensitivityLabelSourceCurrent + SensitivityLabelSourceRecommended SensitivityLabelSource = original.SensitivityLabelSourceRecommended +) + +type SensitivityLabelUpdateKind = original.SensitivityLabelUpdateKind + +const ( + SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = original.SensitivityLabelUpdateKindRemove + SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = original.SensitivityLabelUpdateKindSet +) + +type ServerKeyType = original.ServerKeyType + +const ( + ServerKeyTypeAzureKeyVault ServerKeyType = original.ServerKeyTypeAzureKeyVault + ServerKeyTypeServiceManaged ServerKeyType = original.ServerKeyTypeServiceManaged ) type SsisObjectMetadataType = original.SsisObjectMetadataType const ( - Environment SsisObjectMetadataType = original.Environment - Folder SsisObjectMetadataType = original.Folder - Package SsisObjectMetadataType = original.Package - Project SsisObjectMetadataType = original.Project + SsisObjectMetadataTypeEnvironment SsisObjectMetadataType = original.SsisObjectMetadataTypeEnvironment + SsisObjectMetadataTypeFolder SsisObjectMetadataType = original.SsisObjectMetadataTypeFolder + SsisObjectMetadataTypePackage SsisObjectMetadataType = original.SsisObjectMetadataTypePackage + SsisObjectMetadataTypeProject SsisObjectMetadataType = original.SsisObjectMetadataTypeProject +) + +type StorageAccountType = original.StorageAccountType + +const ( + StorageAccountTypeGRS StorageAccountType = original.StorageAccountTypeGRS + StorageAccountTypeLRS StorageAccountType = original.StorageAccountTypeLRS + StorageAccountTypeZRS StorageAccountType = original.StorageAccountTypeZRS ) type TransparentDataEncryptionStatus = original.TransparentDataEncryptionStatus @@ -394,10 +463,10 @@ const ( type TypeBasicCustomSetupBase = original.TypeBasicCustomSetupBase const ( - TypeCmdkeySetup TypeBasicCustomSetupBase = original.TypeCmdkeySetup - TypeComponentSetup TypeBasicCustomSetupBase = original.TypeComponentSetup - TypeCustomSetupBase TypeBasicCustomSetupBase = original.TypeCustomSetupBase - TypeEnvironmentVariableSetup TypeBasicCustomSetupBase = original.TypeEnvironmentVariableSetup + TypeBasicCustomSetupBaseTypeCmdkeySetup TypeBasicCustomSetupBase = original.TypeBasicCustomSetupBaseTypeCmdkeySetup + TypeBasicCustomSetupBaseTypeComponentSetup TypeBasicCustomSetupBase = original.TypeBasicCustomSetupBaseTypeComponentSetup + TypeBasicCustomSetupBaseTypeCustomSetupBase TypeBasicCustomSetupBase = original.TypeBasicCustomSetupBaseTypeCustomSetupBase + TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup TypeBasicCustomSetupBase = original.TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup ) type TypeBasicIntegrationRuntimeStatus = original.TypeBasicIntegrationRuntimeStatus @@ -411,25 +480,25 @@ const ( type TypeBasicSecretBase = original.TypeBasicSecretBase const ( - TypeSecretBase TypeBasicSecretBase = original.TypeSecretBase - TypeSecureString TypeBasicSecretBase = original.TypeSecureString + TypeBasicSecretBaseTypeSecretBase TypeBasicSecretBase = original.TypeBasicSecretBaseTypeSecretBase + TypeBasicSecretBaseTypeSecureString TypeBasicSecretBase = original.TypeBasicSecretBaseTypeSecureString ) type TypeBasicSsisObjectMetadata = original.TypeBasicSsisObjectMetadata const ( - TypeEnvironment TypeBasicSsisObjectMetadata = original.TypeEnvironment - TypeFolder TypeBasicSsisObjectMetadata = original.TypeFolder - TypePackage TypeBasicSsisObjectMetadata = original.TypePackage - TypeProject TypeBasicSsisObjectMetadata = original.TypeProject - TypeSsisObjectMetadata TypeBasicSsisObjectMetadata = original.TypeSsisObjectMetadata + TypeBasicSsisObjectMetadataTypeEnvironment TypeBasicSsisObjectMetadata = original.TypeBasicSsisObjectMetadataTypeEnvironment + TypeBasicSsisObjectMetadataTypeFolder TypeBasicSsisObjectMetadata = original.TypeBasicSsisObjectMetadataTypeFolder + TypeBasicSsisObjectMetadataTypePackage TypeBasicSsisObjectMetadata = original.TypeBasicSsisObjectMetadataTypePackage + TypeBasicSsisObjectMetadataTypeProject TypeBasicSsisObjectMetadata = original.TypeBasicSsisObjectMetadataTypeProject + TypeBasicSsisObjectMetadataTypeSsisObjectMetadata TypeBasicSsisObjectMetadata = original.TypeBasicSsisObjectMetadataTypeSsisObjectMetadata ) type VulnerabilityAssessmentPolicyBaselineName = original.VulnerabilityAssessmentPolicyBaselineName const ( - Default VulnerabilityAssessmentPolicyBaselineName = original.Default - Master VulnerabilityAssessmentPolicyBaselineName = original.Master + VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = original.VulnerabilityAssessmentPolicyBaselineNameDefault + VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = original.VulnerabilityAssessmentPolicyBaselineNameMaster ) type VulnerabilityAssessmentScanState = original.VulnerabilityAssessmentScanState @@ -444,8 +513,15 @@ const ( type VulnerabilityAssessmentScanTriggerType = original.VulnerabilityAssessmentScanTriggerType const ( - OnDemand VulnerabilityAssessmentScanTriggerType = original.OnDemand - Recurring VulnerabilityAssessmentScanTriggerType = original.Recurring + VulnerabilityAssessmentScanTriggerTypeOnDemand VulnerabilityAssessmentScanTriggerType = original.VulnerabilityAssessmentScanTriggerTypeOnDemand + VulnerabilityAssessmentScanTriggerTypeRecurring VulnerabilityAssessmentScanTriggerType = original.VulnerabilityAssessmentScanTriggerTypeRecurring +) + +type WorkspacePublicNetworkAccess = original.WorkspacePublicNetworkAccess + +const ( + WorkspacePublicNetworkAccessDisabled WorkspacePublicNetworkAccess = original.WorkspacePublicNetworkAccessDisabled + WorkspacePublicNetworkAccessEnabled WorkspacePublicNetworkAccess = original.WorkspacePublicNetworkAccessEnabled ) type AadAdminProperties = original.AadAdminProperties @@ -453,6 +529,13 @@ type AutoPauseProperties = original.AutoPauseProperties type AutoScaleProperties = original.AutoScaleProperties type AvailableRpOperation = original.AvailableRpOperation type AvailableRpOperationDisplayInfo = original.AvailableRpOperationDisplayInfo +type AzureADOnlyAuthentication = original.AzureADOnlyAuthentication +type AzureADOnlyAuthenticationListResult = original.AzureADOnlyAuthenticationListResult +type AzureADOnlyAuthenticationListResultIterator = original.AzureADOnlyAuthenticationListResultIterator +type AzureADOnlyAuthenticationListResultPage = original.AzureADOnlyAuthenticationListResultPage +type AzureADOnlyAuthenticationProperties = original.AzureADOnlyAuthenticationProperties +type AzureADOnlyAuthenticationsClient = original.AzureADOnlyAuthenticationsClient +type AzureADOnlyAuthenticationsCreateFuture = original.AzureADOnlyAuthenticationsCreateFuture type AzureEntityResource = original.AzureEntityResource type BaseClient = original.BaseClient type BasicCustomSetupBase = original.BasicCustomSetupBase @@ -472,12 +555,11 @@ type BigDataPoolsCreateOrUpdateFuture = original.BigDataPoolsCreateOrUpdateFutur type BigDataPoolsDeleteFuture = original.BigDataPoolsDeleteFuture type CheckNameAvailabilityRequest = original.CheckNameAvailabilityRequest type CheckNameAvailabilityResponse = original.CheckNameAvailabilityResponse -type CloudError = original.CloudError -type CloudErrorBody = original.CloudErrorBody type CmdkeySetup = original.CmdkeySetup type CmdkeySetupTypeProperties = original.CmdkeySetupTypeProperties type ComponentSetup = original.ComponentSetup type CreateSQLPoolRestorePointDefinition = original.CreateSQLPoolRestorePointDefinition +type CspWorkspaceAdminProperties = original.CspWorkspaceAdminProperties type CustomSetupBase = original.CustomSetupBase type CustomerManagedKeyDetails = original.CustomerManagedKeyDetails type DataLakeStorageAccountDetails = original.DataLakeStorageAccountDetails @@ -490,12 +572,17 @@ type DataMaskingRuleProperties = original.DataMaskingRuleProperties type DataMaskingRulesClient = original.DataMaskingRulesClient type DataWarehouseUserActivities = original.DataWarehouseUserActivities type DataWarehouseUserActivitiesProperties = original.DataWarehouseUserActivitiesProperties +type DynamicExecutorAllocation = original.DynamicExecutorAllocation type EncryptionDetails = original.EncryptionDetails +type EncryptionProtector = original.EncryptionProtector +type EncryptionProtectorListResult = original.EncryptionProtectorListResult +type EncryptionProtectorListResultIterator = original.EncryptionProtectorListResultIterator +type EncryptionProtectorListResultPage = original.EncryptionProtectorListResultPage +type EncryptionProtectorProperties = original.EncryptionProtectorProperties type EntityReference = original.EntityReference type EnvironmentVariableSetup = original.EnvironmentVariableSetup type EnvironmentVariableSetupTypeProperties = original.EnvironmentVariableSetupTypeProperties type ErrorAdditionalInfo = original.ErrorAdditionalInfo -type ErrorContract = original.ErrorContract type ErrorDetail = original.ErrorDetail type ErrorResponse = original.ErrorResponse type ExtendedSQLPoolBlobAuditingPoliciesClient = original.ExtendedSQLPoolBlobAuditingPoliciesClient @@ -543,6 +630,10 @@ type IntegrationRuntimeNodeMonitoringData = original.IntegrationRuntimeNodeMonit type IntegrationRuntimeNodesClient = original.IntegrationRuntimeNodesClient type IntegrationRuntimeObjectMetadataClient = original.IntegrationRuntimeObjectMetadataClient type IntegrationRuntimeObjectMetadataRefreshFuture = original.IntegrationRuntimeObjectMetadataRefreshFuture +type IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint = original.IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint +type IntegrationRuntimeOutboundNetworkDependenciesEndpoint = original.IntegrationRuntimeOutboundNetworkDependenciesEndpoint +type IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails = original.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails +type IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse = original.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse type IntegrationRuntimeRegenerateKeyParameters = original.IntegrationRuntimeRegenerateKeyParameters type IntegrationRuntimeResource = original.IntegrationRuntimeResource type IntegrationRuntimeSsisCatalogInfo = original.IntegrationRuntimeSsisCatalogInfo @@ -558,13 +649,21 @@ type IntegrationRuntimesDisableInteractiveQueryFuture = original.IntegrationRunt type IntegrationRuntimesEnableInteractiveQueryFuture = original.IntegrationRuntimesEnableInteractiveQueryFuture type IntegrationRuntimesStartFuture = original.IntegrationRuntimesStartFuture type IntegrationRuntimesStopFuture = original.IntegrationRuntimesStopFuture +type KekIdentityProperties = original.KekIdentityProperties type Key = original.Key type KeyInfoListResult = original.KeyInfoListResult type KeyInfoListResultIterator = original.KeyInfoListResultIterator type KeyInfoListResultPage = original.KeyInfoListResultPage type KeyProperties = original.KeyProperties type KeysClient = original.KeysClient +type LibrariesClient = original.LibrariesClient +type LibraryClient = original.LibraryClient +type LibraryInfo = original.LibraryInfo +type LibraryListResponse = original.LibraryListResponse +type LibraryListResponseIterator = original.LibraryListResponseIterator +type LibraryListResponsePage = original.LibraryListResponsePage type LibraryRequirements = original.LibraryRequirements +type LibraryResource = original.LibraryResource type LicensedComponentSetupTypeProperties = original.LicensedComponentSetupTypeProperties type LinkedIntegrationRuntime = original.LinkedIntegrationRuntime type LinkedIntegrationRuntimeKeyAuthorization = original.LinkedIntegrationRuntimeKeyAuthorization @@ -574,6 +673,11 @@ type ListAvailableRpOperation = original.ListAvailableRpOperation type ListSQLPoolSecurityAlertPolicies = original.ListSQLPoolSecurityAlertPolicies type ListSQLPoolSecurityAlertPoliciesIterator = original.ListSQLPoolSecurityAlertPoliciesIterator type ListSQLPoolSecurityAlertPoliciesPage = original.ListSQLPoolSecurityAlertPoliciesPage +type MaintenanceWindowOptions = original.MaintenanceWindowOptions +type MaintenanceWindowOptionsProperties = original.MaintenanceWindowOptionsProperties +type MaintenanceWindowTimeRange = original.MaintenanceWindowTimeRange +type MaintenanceWindows = original.MaintenanceWindows +type MaintenanceWindowsProperties = original.MaintenanceWindowsProperties type ManagedIdentity = original.ManagedIdentity type ManagedIdentitySQLControlSettingsModel = original.ManagedIdentitySQLControlSettingsModel type ManagedIdentitySQLControlSettingsModelProperties = original.ManagedIdentitySQLControlSettingsModelProperties @@ -615,6 +719,7 @@ type PrivateLinkHubInfoListResult = original.PrivateLinkHubInfoListResult type PrivateLinkHubInfoListResultIterator = original.PrivateLinkHubInfoListResultIterator type PrivateLinkHubInfoListResultPage = original.PrivateLinkHubInfoListResultPage type PrivateLinkHubPatchInfo = original.PrivateLinkHubPatchInfo +type PrivateLinkHubPrivateLinkResourcesClient = original.PrivateLinkHubPrivateLinkResourcesClient type PrivateLinkHubProperties = original.PrivateLinkHubProperties type PrivateLinkHubsClient = original.PrivateLinkHubsClient type PrivateLinkHubsDeleteFuture = original.PrivateLinkHubsDeleteFuture @@ -630,6 +735,9 @@ type PurviewConfiguration = original.PurviewConfiguration type QueryInterval = original.QueryInterval type QueryMetric = original.QueryMetric type QueryStatistic = original.QueryStatistic +type RecommendedSensitivityLabelUpdate = original.RecommendedSensitivityLabelUpdate +type RecommendedSensitivityLabelUpdateList = original.RecommendedSensitivityLabelUpdateList +type RecommendedSensitivityLabelUpdateProperties = original.RecommendedSensitivityLabelUpdateProperties type RecoverableSQLPool = original.RecoverableSQLPool type RecoverableSQLPoolListResult = original.RecoverableSQLPoolListResult type RecoverableSQLPoolListResultIterator = original.RecoverableSQLPoolListResultIterator @@ -643,6 +751,7 @@ type ReplicationLinkListResultIterator = original.ReplicationLinkListResultItera type ReplicationLinkListResultPage = original.ReplicationLinkListResultPage type ReplicationLinkProperties = original.ReplicationLinkProperties type Resource = original.Resource +type ResourceMoveDefinition = original.ResourceMoveDefinition type RestorableDroppedSQLPool = original.RestorableDroppedSQLPool type RestorableDroppedSQLPoolListResult = original.RestorableDroppedSQLPoolListResult type RestorableDroppedSQLPoolProperties = original.RestorableDroppedSQLPoolProperties @@ -676,12 +785,15 @@ type SQLPoolGeoBackupPoliciesClient = original.SQLPoolGeoBackupPoliciesClient type SQLPoolInfoListResult = original.SQLPoolInfoListResult type SQLPoolInfoListResultIterator = original.SQLPoolInfoListResultIterator type SQLPoolInfoListResultPage = original.SQLPoolInfoListResultPage +type SQLPoolMaintenanceWindowOptionsClient = original.SQLPoolMaintenanceWindowOptionsClient +type SQLPoolMaintenanceWindowsClient = original.SQLPoolMaintenanceWindowsClient type SQLPoolMetadataSyncConfigsClient = original.SQLPoolMetadataSyncConfigsClient type SQLPoolOperation = original.SQLPoolOperation type SQLPoolOperationProperties = original.SQLPoolOperationProperties type SQLPoolOperationResultsClient = original.SQLPoolOperationResultsClient type SQLPoolOperationsClient = original.SQLPoolOperationsClient type SQLPoolPatchInfo = original.SQLPoolPatchInfo +type SQLPoolRecommendedSensitivityLabelsClient = original.SQLPoolRecommendedSensitivityLabelsClient type SQLPoolReplicationLinksClient = original.SQLPoolReplicationLinksClient type SQLPoolResourceProperties = original.SQLPoolResourceProperties type SQLPoolRestorePointsClient = original.SQLPoolRestorePointsClient @@ -744,6 +856,9 @@ type SensitivityLabelListResult = original.SensitivityLabelListResult type SensitivityLabelListResultIterator = original.SensitivityLabelListResultIterator type SensitivityLabelListResultPage = original.SensitivityLabelListResultPage type SensitivityLabelProperties = original.SensitivityLabelProperties +type SensitivityLabelUpdate = original.SensitivityLabelUpdate +type SensitivityLabelUpdateList = original.SensitivityLabelUpdateList +type SensitivityLabelUpdateProperties = original.SensitivityLabelUpdateProperties type ServerBlobAuditingPolicy = original.ServerBlobAuditingPolicy type ServerBlobAuditingPolicyListResult = original.ServerBlobAuditingPolicyListResult type ServerBlobAuditingPolicyListResultIterator = original.ServerBlobAuditingPolicyListResultIterator @@ -765,6 +880,14 @@ type ServerVulnerabilityAssessmentListResultPage = original.ServerVulnerabilityA type ServerVulnerabilityAssessmentProperties = original.ServerVulnerabilityAssessmentProperties type SetObject = original.SetObject type Sku = original.Sku +type SparkConfigProperties = original.SparkConfigProperties +type SparkConfigurationClient = original.SparkConfigurationClient +type SparkConfigurationInfo = original.SparkConfigurationInfo +type SparkConfigurationListResponse = original.SparkConfigurationListResponse +type SparkConfigurationListResponseIterator = original.SparkConfigurationListResponseIterator +type SparkConfigurationListResponsePage = original.SparkConfigurationListResponsePage +type SparkConfigurationResource = original.SparkConfigurationResource +type SparkConfigurationsClient = original.SparkConfigurationsClient type SsisEnvironment = original.SsisEnvironment type SsisEnvironmentReference = original.SsisEnvironmentReference type SsisFolder = original.SsisFolder @@ -786,6 +909,7 @@ type TransparentDataEncryptionListResultPage = original.TransparentDataEncryptio type TransparentDataEncryptionProperties = original.TransparentDataEncryptionProperties type UpdateIntegrationRuntimeNodeRequest = original.UpdateIntegrationRuntimeNodeRequest type UpdateIntegrationRuntimeRequest = original.UpdateIntegrationRuntimeRequest +type UserAssignedManagedIdentity = original.UserAssignedManagedIdentity type VirtualNetworkProfile = original.VirtualNetworkProfile type VulnerabilityAssessmentRecurringScansProperties = original.VulnerabilityAssessmentRecurringScansProperties type VulnerabilityAssessmentScanError = original.VulnerabilityAssessmentScanError @@ -817,9 +941,12 @@ type WorkspaceManagedIdentitySQLControlSettingsClient = original.WorkspaceManage type WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture = original.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture type WorkspaceManagedSQLServerBlobAuditingPoliciesClient = original.WorkspaceManagedSQLServerBlobAuditingPoliciesClient type WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture = original.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture +type WorkspaceManagedSQLServerEncryptionProtectorClient = original.WorkspaceManagedSQLServerEncryptionProtectorClient +type WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture = original.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture +type WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture = original.WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient = original.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture = original.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture -type WorkspaceManagedSQLServerRecoverableSqlpoolsClient = original.WorkspaceManagedSQLServerRecoverableSqlpoolsClient +type WorkspaceManagedSQLServerRecoverableSQLPoolsClient = original.WorkspaceManagedSQLServerRecoverableSQLPoolsClient type WorkspaceManagedSQLServerSecurityAlertPolicyClient = original.WorkspaceManagedSQLServerSecurityAlertPolicyClient type WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture = original.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture type WorkspaceManagedSQLServerUsagesClient = original.WorkspaceManagedSQLServerUsagesClient @@ -839,6 +966,18 @@ type WorkspacesUpdateFuture = original.WorkspacesUpdateFuture func New(subscriptionID string) BaseClient { return original.New(subscriptionID) } +func NewAzureADOnlyAuthenticationListResultIterator(page AzureADOnlyAuthenticationListResultPage) AzureADOnlyAuthenticationListResultIterator { + return original.NewAzureADOnlyAuthenticationListResultIterator(page) +} +func NewAzureADOnlyAuthenticationListResultPage(cur AzureADOnlyAuthenticationListResult, getNextPage func(context.Context, AzureADOnlyAuthenticationListResult) (AzureADOnlyAuthenticationListResult, error)) AzureADOnlyAuthenticationListResultPage { + return original.NewAzureADOnlyAuthenticationListResultPage(cur, getNextPage) +} +func NewAzureADOnlyAuthenticationsClient(subscriptionID string) AzureADOnlyAuthenticationsClient { + return original.NewAzureADOnlyAuthenticationsClient(subscriptionID) +} +func NewAzureADOnlyAuthenticationsClientWithBaseURI(baseURI string, subscriptionID string) AzureADOnlyAuthenticationsClient { + return original.NewAzureADOnlyAuthenticationsClientWithBaseURI(baseURI, subscriptionID) +} func NewBigDataPoolResourceInfoListResultIterator(page BigDataPoolResourceInfoListResultPage) BigDataPoolResourceInfoListResultIterator { return original.NewBigDataPoolResourceInfoListResultIterator(page) } @@ -863,6 +1002,12 @@ func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { func NewDataMaskingRulesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingRulesClient { return original.NewDataMaskingRulesClientWithBaseURI(baseURI, subscriptionID) } +func NewEncryptionProtectorListResultIterator(page EncryptionProtectorListResultPage) EncryptionProtectorListResultIterator { + return original.NewEncryptionProtectorListResultIterator(page) +} +func NewEncryptionProtectorListResultPage(cur EncryptionProtectorListResult, getNextPage func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)) EncryptionProtectorListResultPage { + return original.NewEncryptionProtectorListResultPage(cur, getNextPage) +} func NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID string) ExtendedSQLPoolBlobAuditingPoliciesClient { return original.NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID) } @@ -965,6 +1110,24 @@ func NewKeysClient(subscriptionID string) KeysClient { func NewKeysClientWithBaseURI(baseURI string, subscriptionID string) KeysClient { return original.NewKeysClientWithBaseURI(baseURI, subscriptionID) } +func NewLibrariesClient(subscriptionID string) LibrariesClient { + return original.NewLibrariesClient(subscriptionID) +} +func NewLibrariesClientWithBaseURI(baseURI string, subscriptionID string) LibrariesClient { + return original.NewLibrariesClientWithBaseURI(baseURI, subscriptionID) +} +func NewLibraryClient(subscriptionID string) LibraryClient { + return original.NewLibraryClient(subscriptionID) +} +func NewLibraryClientWithBaseURI(baseURI string, subscriptionID string) LibraryClient { + return original.NewLibraryClientWithBaseURI(baseURI, subscriptionID) +} +func NewLibraryListResponseIterator(page LibraryListResponsePage) LibraryListResponseIterator { + return original.NewLibraryListResponseIterator(page) +} +func NewLibraryListResponsePage(cur LibraryListResponse, getNextPage func(context.Context, LibraryListResponse) (LibraryListResponse, error)) LibraryListResponsePage { + return original.NewLibraryListResponsePage(cur, getNextPage) +} func NewListSQLPoolSecurityAlertPoliciesIterator(page ListSQLPoolSecurityAlertPoliciesPage) ListSQLPoolSecurityAlertPoliciesIterator { return original.NewListSQLPoolSecurityAlertPoliciesIterator(page) } @@ -1007,6 +1170,12 @@ func NewPrivateLinkHubInfoListResultIterator(page PrivateLinkHubInfoListResultPa func NewPrivateLinkHubInfoListResultPage(cur PrivateLinkHubInfoListResult, getNextPage func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error)) PrivateLinkHubInfoListResultPage { return original.NewPrivateLinkHubInfoListResultPage(cur, getNextPage) } +func NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID string) PrivateLinkHubPrivateLinkResourcesClient { + return original.NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkHubPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkHubPrivateLinkResourcesClient { + return original.NewPrivateLinkHubPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} func NewPrivateLinkHubsClient(subscriptionID string) PrivateLinkHubsClient { return original.NewPrivateLinkHubsClient(subscriptionID) } @@ -1103,6 +1272,18 @@ func NewSQLPoolInfoListResultIterator(page SQLPoolInfoListResultPage) SQLPoolInf func NewSQLPoolInfoListResultPage(cur SQLPoolInfoListResult, getNextPage func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error)) SQLPoolInfoListResultPage { return original.NewSQLPoolInfoListResultPage(cur, getNextPage) } +func NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID string) SQLPoolMaintenanceWindowOptionsClient { + return original.NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID) +} +func NewSQLPoolMaintenanceWindowOptionsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolMaintenanceWindowOptionsClient { + return original.NewSQLPoolMaintenanceWindowOptionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewSQLPoolMaintenanceWindowsClient(subscriptionID string) SQLPoolMaintenanceWindowsClient { + return original.NewSQLPoolMaintenanceWindowsClient(subscriptionID) +} +func NewSQLPoolMaintenanceWindowsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolMaintenanceWindowsClient { + return original.NewSQLPoolMaintenanceWindowsClientWithBaseURI(baseURI, subscriptionID) +} func NewSQLPoolMetadataSyncConfigsClient(subscriptionID string) SQLPoolMetadataSyncConfigsClient { return original.NewSQLPoolMetadataSyncConfigsClient(subscriptionID) } @@ -1121,6 +1302,12 @@ func NewSQLPoolOperationsClient(subscriptionID string) SQLPoolOperationsClient { func NewSQLPoolOperationsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolOperationsClient { return original.NewSQLPoolOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID string) SQLPoolRecommendedSensitivityLabelsClient { + return original.NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID) +} +func NewSQLPoolRecommendedSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolRecommendedSensitivityLabelsClient { + return original.NewSQLPoolRecommendedSensitivityLabelsClientWithBaseURI(baseURI, subscriptionID) +} func NewSQLPoolReplicationLinksClient(subscriptionID string) SQLPoolReplicationLinksClient { return original.NewSQLPoolReplicationLinksClient(subscriptionID) } @@ -1265,6 +1452,24 @@ func NewServerVulnerabilityAssessmentListResultIterator(page ServerVulnerability func NewServerVulnerabilityAssessmentListResultPage(cur ServerVulnerabilityAssessmentListResult, getNextPage func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error)) ServerVulnerabilityAssessmentListResultPage { return original.NewServerVulnerabilityAssessmentListResultPage(cur, getNextPage) } +func NewSparkConfigurationClient(subscriptionID string) SparkConfigurationClient { + return original.NewSparkConfigurationClient(subscriptionID) +} +func NewSparkConfigurationClientWithBaseURI(baseURI string, subscriptionID string) SparkConfigurationClient { + return original.NewSparkConfigurationClientWithBaseURI(baseURI, subscriptionID) +} +func NewSparkConfigurationListResponseIterator(page SparkConfigurationListResponsePage) SparkConfigurationListResponseIterator { + return original.NewSparkConfigurationListResponseIterator(page) +} +func NewSparkConfigurationListResponsePage(cur SparkConfigurationListResponse, getNextPage func(context.Context, SparkConfigurationListResponse) (SparkConfigurationListResponse, error)) SparkConfigurationListResponsePage { + return original.NewSparkConfigurationListResponsePage(cur, getNextPage) +} +func NewSparkConfigurationsClient(subscriptionID string) SparkConfigurationsClient { + return original.NewSparkConfigurationsClient(subscriptionID) +} +func NewSparkConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SparkConfigurationsClient { + return original.NewSparkConfigurationsClientWithBaseURI(baseURI, subscriptionID) +} func NewTransparentDataEncryptionListResultIterator(page TransparentDataEncryptionListResultPage) TransparentDataEncryptionListResultIterator { return original.NewTransparentDataEncryptionListResultIterator(page) } @@ -1316,17 +1521,23 @@ func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(subscriptionID strin func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerBlobAuditingPoliciesClient { return original.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClientWithBaseURI(baseURI, subscriptionID) } +func NewWorkspaceManagedSQLServerEncryptionProtectorClient(subscriptionID string) WorkspaceManagedSQLServerEncryptionProtectorClient { + return original.NewWorkspaceManagedSQLServerEncryptionProtectorClient(subscriptionID) +} +func NewWorkspaceManagedSQLServerEncryptionProtectorClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerEncryptionProtectorClient { + return original.NewWorkspaceManagedSQLServerEncryptionProtectorClientWithBaseURI(baseURI, subscriptionID) +} func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(subscriptionID string) WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { return original.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(subscriptionID) } func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { return original.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientWithBaseURI(baseURI, subscriptionID) } -func NewWorkspaceManagedSQLServerRecoverableSqlpoolsClient(subscriptionID string) WorkspaceManagedSQLServerRecoverableSqlpoolsClient { - return original.NewWorkspaceManagedSQLServerRecoverableSqlpoolsClient(subscriptionID) +func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID string) WorkspaceManagedSQLServerRecoverableSQLPoolsClient { + return original.NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID) } -func NewWorkspaceManagedSQLServerRecoverableSqlpoolsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerRecoverableSqlpoolsClient { - return original.NewWorkspaceManagedSQLServerRecoverableSqlpoolsClientWithBaseURI(baseURI, subscriptionID) +func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerRecoverableSQLPoolsClient { + return original.NewWorkspaceManagedSQLServerRecoverableSQLPoolsClientWithBaseURI(baseURI, subscriptionID) } func NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(subscriptionID string) WorkspaceManagedSQLServerSecurityAlertPolicyClient { return original.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(subscriptionID) @@ -1361,6 +1572,9 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works func PossibleActualStateValues() []ActualState { return original.PossibleActualStateValues() } +func PossibleAuthenticationStateValues() []AuthenticationState { + return original.PossibleAuthenticationStateValues() +} func PossibleAuthorizationTypeValues() []AuthorizationType { return original.PossibleAuthorizationTypeValues() } @@ -1370,6 +1584,9 @@ func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState { func PossibleColumnDataTypeValues() []ColumnDataType { return original.PossibleColumnDataTypeValues() } +func PossibleConfigurationTypeValues() []ConfigurationType { + return original.PossibleConfigurationTypeValues() +} func PossibleDataFlowComputeTypeValues() []DataFlowComputeType { return original.PossibleDataFlowComputeTypeValues() } @@ -1382,6 +1599,9 @@ func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState { func PossibleDataMaskingStateValues() []DataMaskingState { return original.PossibleDataMaskingStateValues() } +func PossibleDayOfWeekValues() []DayOfWeek { + return original.PossibleDayOfWeekValues() +} func PossibleDesiredStateValues() []DesiredState { return original.PossibleDesiredStateValues() } @@ -1448,6 +1668,9 @@ func PossibleQueryMetricUnitValues() []QueryMetricUnit { func PossibleQueryObservedMetricTypeValues() []QueryObservedMetricType { return original.PossibleQueryObservedMetricTypeValues() } +func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitivityLabelUpdateKind { + return original.PossibleRecommendedSensitivityLabelUpdateKindValues() +} func PossibleReplicationRoleValues() []ReplicationRole { return original.PossibleReplicationRoleValues() } @@ -1466,12 +1689,24 @@ func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { func PossibleSelfHostedIntegrationRuntimeNodeStatusValues() []SelfHostedIntegrationRuntimeNodeStatus { return original.PossibleSelfHostedIntegrationRuntimeNodeStatusValues() } +func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { + return original.PossibleSensitivityLabelRankValues() +} func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { return original.PossibleSensitivityLabelSourceValues() } +func PossibleSensitivityLabelUpdateKindValues() []SensitivityLabelUpdateKind { + return original.PossibleSensitivityLabelUpdateKindValues() +} +func PossibleServerKeyTypeValues() []ServerKeyType { + return original.PossibleServerKeyTypeValues() +} func PossibleSsisObjectMetadataTypeValues() []SsisObjectMetadataType { return original.PossibleSsisObjectMetadataTypeValues() } +func PossibleStorageAccountTypeValues() []StorageAccountType { + return original.PossibleStorageAccountTypeValues() +} func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus { return original.PossibleTransparentDataEncryptionStatusValues() } @@ -1499,6 +1734,9 @@ func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentS func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType { return original.PossibleVulnerabilityAssessmentScanTriggerTypeValues() } +func PossibleWorkspacePublicNetworkAccessValues() []WorkspacePublicNetworkAccess { + return original.PossibleWorkspacePublicNetworkAccessValues() +} func UserAgent() string { return original.UserAgent() + " profiles/preview" } diff --git a/profiles/preview/preview/synapse/mgmt/synapse/synapseapi/models.go b/profiles/preview/preview/synapse/mgmt/synapse/synapseapi/models.go index 78cb72560e3e..a20b32944397 100644 --- a/profiles/preview/preview/synapse/mgmt/synapse/synapseapi/models.go +++ b/profiles/preview/preview/synapse/mgmt/synapse/synapseapi/models.go @@ -9,8 +9,9 @@ package synapseapi -import original "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/synapseapi" +import original "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2021-06-01-preview/synapse/synapseapi" +type AzureADOnlyAuthenticationsClientAPI = original.AzureADOnlyAuthenticationsClientAPI type BigDataPoolsClientAPI = original.BigDataPoolsClientAPI type DataMaskingPoliciesClientAPI = original.DataMaskingPoliciesClientAPI type DataMaskingRulesClientAPI = original.DataMaskingRulesClientAPI @@ -26,9 +27,12 @@ type IntegrationRuntimeObjectMetadataClientAPI = original.IntegrationRuntimeObje type IntegrationRuntimeStatusClientAPI = original.IntegrationRuntimeStatusClientAPI type IntegrationRuntimesClientAPI = original.IntegrationRuntimesClientAPI type KeysClientAPI = original.KeysClientAPI +type LibrariesClientAPI = original.LibrariesClientAPI +type LibraryClientAPI = original.LibraryClientAPI type OperationsClientAPI = original.OperationsClientAPI type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI type PrivateEndpointConnectionsPrivateLinkHubClientAPI = original.PrivateEndpointConnectionsPrivateLinkHubClientAPI +type PrivateLinkHubPrivateLinkResourcesClientAPI = original.PrivateLinkHubPrivateLinkResourcesClientAPI type PrivateLinkHubsClientAPI = original.PrivateLinkHubsClientAPI type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI type RestorableDroppedSQLPoolsClientAPI = original.RestorableDroppedSQLPoolsClientAPI @@ -37,9 +41,12 @@ type SQLPoolColumnsClientAPI = original.SQLPoolColumnsClientAPI type SQLPoolConnectionPoliciesClientAPI = original.SQLPoolConnectionPoliciesClientAPI type SQLPoolDataWarehouseUserActivitiesClientAPI = original.SQLPoolDataWarehouseUserActivitiesClientAPI type SQLPoolGeoBackupPoliciesClientAPI = original.SQLPoolGeoBackupPoliciesClientAPI +type SQLPoolMaintenanceWindowOptionsClientAPI = original.SQLPoolMaintenanceWindowOptionsClientAPI +type SQLPoolMaintenanceWindowsClientAPI = original.SQLPoolMaintenanceWindowsClientAPI type SQLPoolMetadataSyncConfigsClientAPI = original.SQLPoolMetadataSyncConfigsClientAPI type SQLPoolOperationResultsClientAPI = original.SQLPoolOperationResultsClientAPI type SQLPoolOperationsClientAPI = original.SQLPoolOperationsClientAPI +type SQLPoolRecommendedSensitivityLabelsClientAPI = original.SQLPoolRecommendedSensitivityLabelsClientAPI type SQLPoolReplicationLinksClientAPI = original.SQLPoolReplicationLinksClientAPI type SQLPoolRestorePointsClientAPI = original.SQLPoolRestorePointsClientAPI type SQLPoolSchemasClientAPI = original.SQLPoolSchemasClientAPI @@ -55,11 +62,14 @@ type SQLPoolVulnerabilityAssessmentsClientAPI = original.SQLPoolVulnerabilityAss type SQLPoolWorkloadClassifierClientAPI = original.SQLPoolWorkloadClassifierClientAPI type SQLPoolWorkloadGroupClientAPI = original.SQLPoolWorkloadGroupClientAPI type SQLPoolsClientAPI = original.SQLPoolsClientAPI +type SparkConfigurationClientAPI = original.SparkConfigurationClientAPI +type SparkConfigurationsClientAPI = original.SparkConfigurationsClientAPI type WorkspaceAadAdminsClientAPI = original.WorkspaceAadAdminsClientAPI type WorkspaceManagedIdentitySQLControlSettingsClientAPI = original.WorkspaceManagedIdentitySQLControlSettingsClientAPI type WorkspaceManagedSQLServerBlobAuditingPoliciesClientAPI = original.WorkspaceManagedSQLServerBlobAuditingPoliciesClientAPI +type WorkspaceManagedSQLServerEncryptionProtectorClientAPI = original.WorkspaceManagedSQLServerEncryptionProtectorClientAPI type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientAPI = original.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientAPI -type WorkspaceManagedSQLServerRecoverableSqlpoolsClientAPI = original.WorkspaceManagedSQLServerRecoverableSqlpoolsClientAPI +type WorkspaceManagedSQLServerRecoverableSQLPoolsClientAPI = original.WorkspaceManagedSQLServerRecoverableSQLPoolsClientAPI type WorkspaceManagedSQLServerSecurityAlertPolicyClientAPI = original.WorkspaceManagedSQLServerSecurityAlertPolicyClientAPI type WorkspaceManagedSQLServerUsagesClientAPI = original.WorkspaceManagedSQLServerUsagesClientAPI type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientAPI = original.WorkspaceManagedSQLServerVulnerabilityAssessmentsClientAPI diff --git a/services/compute/mgmt/2021-07-01/compute/CHANGELOG.md b/services/compute/mgmt/2021-07-01/compute/CHANGELOG.md new file mode 100644 index 000000000000..52911e4cc5e4 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/CHANGELOG.md @@ -0,0 +1,2 @@ +# Change History + diff --git a/services/compute/mgmt/2021-07-01/compute/_meta.json b/services/compute/mgmt/2021-07-01/compute/_meta.json new file mode 100644 index 000000000000..624e2ceac83c --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", + "readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", + "tag": "package-2021-07-01", + "use": "@microsoft.azure/autorest.go@2.1.183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-07-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/services/compute/mgmt/2021-07-01/compute/availabilitysets.go b/services/compute/mgmt/2021-07-01/compute/availabilitysets.go new file mode 100644 index 000000000000..7953c6555084 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/availabilitysets.go @@ -0,0 +1,652 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AvailabilitySetsClient is the compute Client +type AvailabilitySetsClient struct { + BaseClient +} + +// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient client. +func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { + return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient { + return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update an availability set. +// Parameters: +// resourceGroupName - the name of the resource group. +// availabilitySetName - the name of the availability set. +// parameters - parameters supplied to the Create Availability Set operation. +func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (result AvailabilitySet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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, availabilitySetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "availabilitySetName": autorest.Encode("path", availabilitySetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/availabilitySets/{availabilitySetName}", 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 AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response) (result AvailabilitySet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an availability set. +// Parameters: +// resourceGroupName - the name of the resource group. +// availabilitySetName - the name of the availability set. +func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, availabilitySetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "availabilitySetName": autorest.Encode("path", availabilitySetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/availabilitySets/{availabilitySetName}", 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 AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about an availability set. +// Parameters: +// resourceGroupName - the name of the resource group. +// availabilitySetName - the name of the availability set. +func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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, availabilitySetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "availabilitySetName": autorest.Encode("path", availabilitySetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/availabilitySets/{availabilitySetName}", 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 AvailabilitySetsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) GetResponder(resp *http.Response) (result AvailabilitySet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all availability sets in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.List") + defer func() { + sc := -1 + if result.aslr.Response.Response != nil { + sc = result.aslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure sending request") + return + } + + result.aslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure responding to request") + return + } + if result.aslr.hasNextLink() && result.aslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailabilitySetsClient) ListPreparer(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 = "2021-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.Compute/availabilitySets", 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 AvailabilitySetsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) ListResponder(resp *http.Response) (result AvailabilitySetListResult, err error) { + err = autorest.Respond( + resp, + 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 AvailabilitySetsClient) listNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) { + req, err := lastResults.availabilitySetListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "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, "compute.AvailabilitySetsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailabilitySetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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) + return +} + +// ListAvailableSizes lists all available virtual machine sizes that can be used to create a new virtual machine in an +// existing availability set. +// Parameters: +// resourceGroupName - the name of the resource group. +// availabilitySetName - the name of the availability set. +func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, availabilitySetName string) (result VirtualMachineSizeListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListAvailableSizes") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, availabilitySetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableSizesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableSizesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableSizesPreparer prepares the ListAvailableSizes request. +func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "availabilitySetName": autorest.Encode("path", availabilitySetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/availabilitySets/{availabilitySetName}/vmSizes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the +// http.Response Body if it receives an error. +func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription lists all availability sets in a subscription. +// Parameters: +// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'. +func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, expand string) (result AvailabilitySetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription") + defer func() { + sc := -1 + if result.aslr.Response.Response != nil { + sc = result.aslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.aslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.aslr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.aslr.hasNextLink() && result.aslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Context, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + 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}/providers/Microsoft.Compute/availabilitySets", 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 AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) ListBySubscriptionResponder(resp *http.Response) (result AvailabilitySetListResult, err error) { + err = autorest.Respond( + resp, + 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 AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) { + req, err := lastResults.availabilitySetListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "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, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, expand string) (result AvailabilitySetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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, expand) + return +} + +// Update update an availability set. +// Parameters: +// resourceGroupName - the name of the resource group. +// availabilitySetName - the name of the availability set. +// parameters - parameters supplied to the Update Availability Set operation. +func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (result AvailabilitySet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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, availabilitySetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "availabilitySetName": autorest.Encode("path", availabilitySetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/availabilitySets/{availabilitySetName}", 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 AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client AvailabilitySetsClient) UpdateResponder(resp *http.Response) (result AvailabilitySet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go b/services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go new file mode 100644 index 000000000000..a525a29711a9 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go @@ -0,0 +1,596 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CapacityReservationGroupsClient is the compute Client +type CapacityReservationGroupsClient struct { + BaseClient +} + +// NewCapacityReservationGroupsClient creates an instance of the CapacityReservationGroupsClient client. +func NewCapacityReservationGroupsClient(subscriptionID string) CapacityReservationGroupsClient { + return NewCapacityReservationGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCapacityReservationGroupsClientWithBaseURI creates an instance of the CapacityReservationGroupsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewCapacityReservationGroupsClientWithBaseURI(baseURI string, subscriptionID string) CapacityReservationGroupsClient { + return CapacityReservationGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update a capacity reservation group. When updating a capacity reservation +// group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// parameters - parameters supplied to the Create capacity reservation Group. +func (client CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup) (result CapacityReservationGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.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, capacityReservationGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CapacityReservationGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/capacityReservationGroups/{capacityReservationGroupName}", 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 CapacityReservationGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityReservationGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a capacity reservation group. This operation is allowed only if all the associated +// resources are disassociated from the reservation group and all capacity reservations under the reservation group +// have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +func (client CapacityReservationGroupsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, capacityReservationGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CapacityReservationGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/capacityReservationGroups/{capacityReservationGroupName}", 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 CapacityReservationGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation that retrieves information about a capacity reservation group. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance +// views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime +// properties of a capacity reservation that is managed by the platform and can change outside of control plane +// operations. +func (client CapacityReservationGroupsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand CapacityReservationGroupInstanceViewTypes) (result CapacityReservationGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.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, capacityReservationGroupName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CapacityReservationGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand CapacityReservationGroupInstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/capacityReservationGroups/{capacityReservationGroupName}", 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 CapacityReservationGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) GetResponder(resp *http.Response) (result CapacityReservationGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all of the capacity reservation groups in the specified resource group. Use the nextLink +// property in the response to get the next page of capacity reservation groups. +// Parameters: +// resourceGroupName - the name of the resource group. +// expand - the expand expression to apply on the operation. Based on the expand param(s) specified we return +// Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation +// group in the response. +func (client CapacityReservationGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.crglr.Response.Response != nil { + sc = result.crglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.crglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.crglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.crglr.hasNextLink() && result.crglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client CapacityReservationGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/capacityReservationGroups", 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 CapacityReservationGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result CapacityReservationGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 CapacityReservationGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults CapacityReservationGroupListResult) (result CapacityReservationGroupListResult, err error) { + req, err := lastResults.capacityReservationGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "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, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client CapacityReservationGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.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, expand) + return +} + +// ListBySubscription lists all of the capacity reservation groups in the subscription. Use the nextLink property in +// the response to get the next page of capacity reservation groups. +// Parameters: +// expand - the expand expression to apply on the operation. Based on the expand param(s) specified we return +// Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation +// group in the response. +func (client CapacityReservationGroupsClient) ListBySubscription(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListBySubscription") + defer func() { + sc := -1 + if result.crglr.Response.Response != nil { + sc = result.crglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.crglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.crglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.crglr.hasNextLink() && result.crglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client CapacityReservationGroupsClient) ListBySubscriptionPreparer(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups", 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 CapacityReservationGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result CapacityReservationGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 CapacityReservationGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults CapacityReservationGroupListResult) (result CapacityReservationGroupListResult, err error) { + req, err := lastResults.capacityReservationGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "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, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client CapacityReservationGroupsClient) ListBySubscriptionComplete(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.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, expand) + return +} + +// Update the operation to update a capacity reservation group. When updating a capacity reservation group, only tags +// may be modified. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// parameters - parameters supplied to the Update capacity reservation Group operation. +func (client CapacityReservationGroupsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate) (result CapacityReservationGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.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, capacityReservationGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client CapacityReservationGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/capacityReservationGroups/{capacityReservationGroupName}", 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 CapacityReservationGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) UpdateResponder(resp *http.Response) (result CapacityReservationGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/capacityreservations.go b/services/compute/mgmt/2021-07-01/compute/capacityreservations.go new file mode 100644 index 000000000000..31f0d699b847 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/capacityreservations.go @@ -0,0 +1,490 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CapacityReservationsClient is the compute Client +type CapacityReservationsClient struct { + BaseClient +} + +// NewCapacityReservationsClient creates an instance of the CapacityReservationsClient client. +func NewCapacityReservationsClient(subscriptionID string) CapacityReservationsClient { + return NewCapacityReservationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCapacityReservationsClientWithBaseURI creates an instance of the CapacityReservationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCapacityReservationsClientWithBaseURI(baseURI string, subscriptionID string) CapacityReservationsClient { + return CapacityReservationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update a capacity reservation. Please note some properties can be set only +// during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +// parameters - parameters supplied to the Create capacity reservation. +func (client CapacityReservationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation) (result CapacityReservationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.CapacityReservationsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CapacityReservationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", 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 CapacityReservationsClient) CreateOrUpdateSender(req *http.Request) (future CapacityReservationsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityReservation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a capacity reservation. This operation is allowed only when all the associated +// resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for +// more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +func (client CapacityReservationsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (result CapacityReservationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CapacityReservationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", 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 CapacityReservationsClient) DeleteSender(req *http.Request) (future CapacityReservationsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation that retrieves information about the capacity reservation. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +// expand - the expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime +// properties of the capacity reservation that is managed by the platform and can change outside of control +// plane operations. +func (client CapacityReservationsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand CapacityReservationInstanceViewTypes) (result CapacityReservation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.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, capacityReservationGroupName, capacityReservationName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CapacityReservationsClient) GetPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand CapacityReservationInstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", 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 CapacityReservationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) GetResponder(resp *http.Response) (result CapacityReservation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByCapacityReservationGroup lists all of the capacity reservations in the specified capacity reservation group. +// Use the nextLink property in the response to get the next page of capacity reservations. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +func (client CapacityReservationsClient) ListByCapacityReservationGroup(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result CapacityReservationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.ListByCapacityReservationGroup") + defer func() { + sc := -1 + if result.crlr.Response.Response != nil { + sc = result.crlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByCapacityReservationGroupNextResults + req, err := client.ListByCapacityReservationGroupPreparer(ctx, resourceGroupName, capacityReservationGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByCapacityReservationGroupSender(req) + if err != nil { + result.crlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", resp, "Failure sending request") + return + } + + result.crlr, err = client.ListByCapacityReservationGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", resp, "Failure responding to request") + return + } + if result.crlr.hasNextLink() && result.crlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByCapacityReservationGroupPreparer prepares the ListByCapacityReservationGroup request. +func (client CapacityReservationsClient) ListByCapacityReservationGroupPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByCapacityReservationGroupSender sends the ListByCapacityReservationGroup request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationsClient) ListByCapacityReservationGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByCapacityReservationGroupResponder handles the response to the ListByCapacityReservationGroup request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) ListByCapacityReservationGroupResponder(resp *http.Response) (result CapacityReservationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByCapacityReservationGroupNextResults retrieves the next set of results, if any. +func (client CapacityReservationsClient) listByCapacityReservationGroupNextResults(ctx context.Context, lastResults CapacityReservationListResult) (result CapacityReservationListResult, err error) { + req, err := lastResults.capacityReservationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByCapacityReservationGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByCapacityReservationGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByCapacityReservationGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client CapacityReservationsClient) ListByCapacityReservationGroupComplete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result CapacityReservationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.ListByCapacityReservationGroup") + 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.ListByCapacityReservationGroup(ctx, resourceGroupName, capacityReservationGroupName) + return +} + +// Update the operation to update a capacity reservation. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +// parameters - parameters supplied to the Update capacity reservation operation. +func (client CapacityReservationsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate) (result CapacityReservationsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client CapacityReservationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", 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 CapacityReservationsClient) UpdateSender(req *http.Request) (future CapacityReservationsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) UpdateResponder(resp *http.Response) (result CapacityReservation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/client.go b/services/compute/mgmt/2021-07-01/compute/client.go similarity index 76% rename from services/securityinsight/mgmt/v1.0/securityinsight/client.go rename to services/compute/mgmt/2021-07-01/compute/client.go index 8abc0940df00..1812f27feb99 100644 --- a/services/securityinsight/mgmt/v1.0/securityinsight/client.go +++ b/services/compute/mgmt/2021-07-01/compute/client.go @@ -1,7 +1,7 @@ -// Package securityinsight implements the Azure ARM Securityinsight service API version 2020-01-01. +// Package compute implements the Azure ARM Compute service API version . // -// API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -package securityinsight +// Compute Client +package compute // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,11 +14,11 @@ import ( ) const ( - // DefaultBaseURI is the default URI used for the service Securityinsight + // DefaultBaseURI is the default URI used for the service Compute DefaultBaseURI = "https://management.azure.com" ) -// BaseClient is the base client for Securityinsight. +// BaseClient is the base client for Compute. type BaseClient struct { autorest.Client BaseURI string diff --git a/services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go b/services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go new file mode 100644 index 000000000000..7dfce08d9096 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go @@ -0,0 +1,422 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CloudServiceOperatingSystemsClient is the compute Client +type CloudServiceOperatingSystemsClient struct { + BaseClient +} + +// NewCloudServiceOperatingSystemsClient creates an instance of the CloudServiceOperatingSystemsClient client. +func NewCloudServiceOperatingSystemsClient(subscriptionID string) CloudServiceOperatingSystemsClient { + return NewCloudServiceOperatingSystemsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCloudServiceOperatingSystemsClientWithBaseURI creates an instance of the CloudServiceOperatingSystemsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewCloudServiceOperatingSystemsClientWithBaseURI(baseURI string, subscriptionID string) CloudServiceOperatingSystemsClient { + return CloudServiceOperatingSystemsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetOSFamily gets properties of a guest operating system family that can be specified in the XML service +// configuration (.cscfg) for a cloud service. +// Parameters: +// location - name of the location that the OS family pertains to. +// osFamilyName - name of the OS family. +func (client CloudServiceOperatingSystemsClient) GetOSFamily(ctx context.Context, location string, osFamilyName string) (result OSFamily, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.GetOSFamily") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetOSFamilyPreparer(ctx, location, osFamilyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSFamily", nil, "Failure preparing request") + return + } + + resp, err := client.GetOSFamilySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSFamily", resp, "Failure sending request") + return + } + + result, err = client.GetOSFamilyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSFamily", resp, "Failure responding to request") + return + } + + return +} + +// GetOSFamilyPreparer prepares the GetOSFamily request. +func (client CloudServiceOperatingSystemsClient) GetOSFamilyPreparer(ctx context.Context, location string, osFamilyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "osFamilyName": autorest.Encode("path", osFamilyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetOSFamilySender sends the GetOSFamily request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceOperatingSystemsClient) GetOSFamilySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetOSFamilyResponder handles the response to the GetOSFamily request. The method always +// closes the http.Response Body. +func (client CloudServiceOperatingSystemsClient) GetOSFamilyResponder(resp *http.Response) (result OSFamily, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetOSVersion gets properties of a guest operating system version that can be specified in the XML service +// configuration (.cscfg) for a cloud service. +// Parameters: +// location - name of the location that the OS version pertains to. +// osVersionName - name of the OS version. +func (client CloudServiceOperatingSystemsClient) GetOSVersion(ctx context.Context, location string, osVersionName string) (result OSVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.GetOSVersion") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetOSVersionPreparer(ctx, location, osVersionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSVersion", nil, "Failure preparing request") + return + } + + resp, err := client.GetOSVersionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSVersion", resp, "Failure sending request") + return + } + + result, err = client.GetOSVersionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSVersion", resp, "Failure responding to request") + return + } + + return +} + +// GetOSVersionPreparer prepares the GetOSVersion request. +func (client CloudServiceOperatingSystemsClient) GetOSVersionPreparer(ctx context.Context, location string, osVersionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "osVersionName": autorest.Encode("path", osVersionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetOSVersionSender sends the GetOSVersion request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceOperatingSystemsClient) GetOSVersionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetOSVersionResponder handles the response to the GetOSVersion request. The method always +// closes the http.Response Body. +func (client CloudServiceOperatingSystemsClient) GetOSVersionResponder(resp *http.Response) (result OSVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListOSFamilies gets a list of all guest operating system families available to be specified in the XML service +// configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS +// Families. Do this till nextLink is null to fetch all the OS Families. +// Parameters: +// location - name of the location that the OS families pertain to. +func (client CloudServiceOperatingSystemsClient) ListOSFamilies(ctx context.Context, location string) (result OSFamilyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSFamilies") + defer func() { + sc := -1 + if result.oflr.Response.Response != nil { + sc = result.oflr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listOSFamiliesNextResults + req, err := client.ListOSFamiliesPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSFamilies", nil, "Failure preparing request") + return + } + + resp, err := client.ListOSFamiliesSender(req) + if err != nil { + result.oflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSFamilies", resp, "Failure sending request") + return + } + + result.oflr, err = client.ListOSFamiliesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSFamilies", resp, "Failure responding to request") + return + } + if result.oflr.hasNextLink() && result.oflr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListOSFamiliesPreparer prepares the ListOSFamilies request. +func (client CloudServiceOperatingSystemsClient) ListOSFamiliesPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOSFamiliesSender sends the ListOSFamilies request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceOperatingSystemsClient) ListOSFamiliesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListOSFamiliesResponder handles the response to the ListOSFamilies request. The method always +// closes the http.Response Body. +func (client CloudServiceOperatingSystemsClient) ListOSFamiliesResponder(resp *http.Response) (result OSFamilyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listOSFamiliesNextResults retrieves the next set of results, if any. +func (client CloudServiceOperatingSystemsClient) listOSFamiliesNextResults(ctx context.Context, lastResults OSFamilyListResult) (result OSFamilyListResult, err error) { + req, err := lastResults.oSFamilyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSFamiliesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListOSFamiliesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSFamiliesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListOSFamiliesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSFamiliesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListOSFamiliesComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServiceOperatingSystemsClient) ListOSFamiliesComplete(ctx context.Context, location string) (result OSFamilyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSFamilies") + 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.ListOSFamilies(ctx, location) + return +} + +// ListOSVersions gets a list of all guest operating system versions available to be specified in the XML service +// configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS +// versions. Do this till nextLink is null to fetch all the OS versions. +// Parameters: +// location - name of the location that the OS versions pertain to. +func (client CloudServiceOperatingSystemsClient) ListOSVersions(ctx context.Context, location string) (result OSVersionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSVersions") + defer func() { + sc := -1 + if result.ovlr.Response.Response != nil { + sc = result.ovlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listOSVersionsNextResults + req, err := client.ListOSVersionsPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSVersions", nil, "Failure preparing request") + return + } + + resp, err := client.ListOSVersionsSender(req) + if err != nil { + result.ovlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSVersions", resp, "Failure sending request") + return + } + + result.ovlr, err = client.ListOSVersionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSVersions", resp, "Failure responding to request") + return + } + if result.ovlr.hasNextLink() && result.ovlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListOSVersionsPreparer prepares the ListOSVersions request. +func (client CloudServiceOperatingSystemsClient) ListOSVersionsPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOSVersionsSender sends the ListOSVersions request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceOperatingSystemsClient) ListOSVersionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListOSVersionsResponder handles the response to the ListOSVersions request. The method always +// closes the http.Response Body. +func (client CloudServiceOperatingSystemsClient) ListOSVersionsResponder(resp *http.Response) (result OSVersionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listOSVersionsNextResults retrieves the next set of results, if any. +func (client CloudServiceOperatingSystemsClient) listOSVersionsNextResults(ctx context.Context, lastResults OSVersionListResult) (result OSVersionListResult, err error) { + req, err := lastResults.oSVersionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSVersionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListOSVersionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSVersionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListOSVersionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSVersionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListOSVersionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServiceOperatingSystemsClient) ListOSVersionsComplete(ctx context.Context, location string) (result OSVersionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSVersions") + 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.ListOSVersions(ctx, location) + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go b/services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go new file mode 100644 index 000000000000..7b0c6da9e32c --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go @@ -0,0 +1,695 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CloudServiceRoleInstancesClient is the compute Client +type CloudServiceRoleInstancesClient struct { + BaseClient +} + +// NewCloudServiceRoleInstancesClient creates an instance of the CloudServiceRoleInstancesClient client. +func NewCloudServiceRoleInstancesClient(subscriptionID string) CloudServiceRoleInstancesClient { + return NewCloudServiceRoleInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCloudServiceRoleInstancesClientWithBaseURI creates an instance of the CloudServiceRoleInstancesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewCloudServiceRoleInstancesClientWithBaseURI(baseURI string, subscriptionID string) CloudServiceRoleInstancesClient { + return CloudServiceRoleInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete deletes a role instance from a cloud service. +// Parameters: +// roleInstanceName - name of the role instance. +func (client CloudServiceRoleInstancesClient) Delete(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CloudServiceRoleInstancesClient) DeletePreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", 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 CloudServiceRoleInstancesClient) DeleteSender(req *http.Request) (future CloudServiceRoleInstancesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a role instance from a cloud service. +// Parameters: +// roleInstanceName - name of the role instance. +// expand - the expand expression to apply to the operation. 'UserData' is not supported for cloud services. +func (client CloudServiceRoleInstancesClient) Get(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (result RoleInstance, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.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, roleInstanceName, resourceGroupName, cloudServiceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CloudServiceRoleInstancesClient) GetPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", 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 CloudServiceRoleInstancesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) GetResponder(resp *http.Response) (result RoleInstance, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceView retrieves information about the run-time state of a role instance in a cloud service. +// Parameters: +// roleInstanceName - name of the role instance. +func (client CloudServiceRoleInstancesClient) GetInstanceView(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result RoleInstanceInstanceView, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.GetInstanceView") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetInstanceViewPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetInstanceView", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceViewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetInstanceView", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceViewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetInstanceView", resp, "Failure responding to request") + return + } + + return +} + +// GetInstanceViewPreparer prepares the GetInstanceView request. +func (client CloudServiceRoleInstancesClient) GetInstanceViewPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInstanceViewSender sends the GetInstanceView request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceRoleInstancesClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) GetInstanceViewResponder(resp *http.Response) (result RoleInstanceInstanceView, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetRemoteDesktopFile gets a remote desktop file for a role instance in a cloud service. +// Parameters: +// roleInstanceName - name of the role instance. +func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFile(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result ReadCloser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.GetRemoteDesktopFile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetRemoteDesktopFilePreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetRemoteDesktopFile", nil, "Failure preparing request") + return + } + + resp, err := client.GetRemoteDesktopFileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetRemoteDesktopFile", resp, "Failure sending request") + return + } + + result, err = client.GetRemoteDesktopFileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetRemoteDesktopFile", resp, "Failure responding to request") + return + } + + return +} + +// GetRemoteDesktopFilePreparer prepares the GetRemoteDesktopFile request. +func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFilePreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetRemoteDesktopFileSender sends the GetRemoteDesktopFile request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFileSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetRemoteDesktopFileResponder handles the response to the GetRemoteDesktopFile request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFileResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK)) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next +// page of role instances. Do this till nextLink is null to fetch all the role instances. +// Parameters: +// expand - the expand expression to apply to the operation. 'UserData' is not supported for cloud services. +func (client CloudServiceRoleInstancesClient) List(ctx context.Context, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (result RoleInstanceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.List") + defer func() { + sc := -1 + if result.rilr.Response.Response != nil { + sc = result.rilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, cloudServiceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "List", resp, "Failure sending request") + return + } + + result.rilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "List", resp, "Failure responding to request") + return + } + if result.rilr.hasNextLink() && result.rilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client CloudServiceRoleInstancesClient) ListPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/cloudServices/{cloudServiceName}/roleInstances", 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 CloudServiceRoleInstancesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) ListResponder(resp *http.Response) (result RoleInstanceListResult, err error) { + err = autorest.Respond( + resp, + 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 CloudServiceRoleInstancesClient) listNextResults(ctx context.Context, lastResults RoleInstanceListResult) (result RoleInstanceListResult, err error) { + req, err := lastResults.roleInstanceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "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, "compute.CloudServiceRoleInstancesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServiceRoleInstancesClient) ListComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (result RoleInstanceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.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, cloudServiceName, expand) + return +} + +// Rebuild the Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles +// or worker roles and initializes the storage resources that are used by them. If you do not want to initialize +// storage resources, you can use Reimage Role Instance. +// Parameters: +// roleInstanceName - name of the role instance. +func (client CloudServiceRoleInstancesClient) Rebuild(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesRebuildFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Rebuild") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RebuildPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Rebuild", nil, "Failure preparing request") + return + } + + result, err = client.RebuildSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Rebuild", nil, "Failure sending request") + return + } + + return +} + +// RebuildPreparer prepares the Rebuild request. +func (client CloudServiceRoleInstancesClient) RebuildPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RebuildSender sends the Rebuild request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceRoleInstancesClient) RebuildSender(req *http.Request) (future CloudServiceRoleInstancesRebuildFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RebuildResponder handles the response to the Rebuild request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) RebuildResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Reimage the Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles +// or worker roles. +// Parameters: +// roleInstanceName - name of the role instance. +func (client CloudServiceRoleInstancesClient) Reimage(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesReimageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Reimage") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReimagePreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Reimage", nil, "Failure preparing request") + return + } + + result, err = client.ReimageSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Reimage", nil, "Failure sending request") + return + } + + return +} + +// ReimagePreparer prepares the Reimage request. +func (client CloudServiceRoleInstancesClient) ReimagePreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageSender sends the Reimage request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServiceRoleInstancesClient) ReimageSender(req *http.Request) (future CloudServiceRoleInstancesReimageFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageResponder handles the response to the Reimage request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Restart the Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. +// Parameters: +// roleInstanceName - name of the role instance. +func (client CloudServiceRoleInstancesClient) Restart(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesRestartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Restart") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RestartPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Restart", nil, "Failure preparing request") + return + } + + result, err = client.RestartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Restart", nil, "Failure sending request") + return + } + + return +} + +// RestartPreparer prepares the Restart request. +func (client CloudServiceRoleInstancesClient) RestartPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/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 CloudServiceRoleInstancesClient) RestartSender(req *http.Request) (future CloudServiceRoleInstancesRestartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RestartResponder handles the response to the Restart request. The method always +// closes the http.Response Body. +func (client CloudServiceRoleInstancesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go b/services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go new file mode 100644 index 000000000000..dac28bd988b1 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go @@ -0,0 +1,224 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CloudServiceRolesClient is the compute Client +type CloudServiceRolesClient struct { + BaseClient +} + +// NewCloudServiceRolesClient creates an instance of the CloudServiceRolesClient client. +func NewCloudServiceRolesClient(subscriptionID string) CloudServiceRolesClient { + return NewCloudServiceRolesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCloudServiceRolesClientWithBaseURI creates an instance of the CloudServiceRolesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCloudServiceRolesClientWithBaseURI(baseURI string, subscriptionID string) CloudServiceRolesClient { + return CloudServiceRolesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a role from a cloud service. +// Parameters: +// roleName - name of the role. +func (client CloudServiceRolesClient) Get(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRole, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRolesClient.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, roleName, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CloudServiceRolesClient) GetPreparer(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleName": autorest.Encode("path", roleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roles/{roleName}", 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 CloudServiceRolesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CloudServiceRolesClient) GetResponder(resp *http.Response) (result CloudServiceRole, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of +// roles. Do this till nextLink is null to fetch all the roles. +func (client CloudServiceRolesClient) List(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRolesClient.List") + defer func() { + sc := -1 + if result.csrlr.Response.Response != nil { + sc = result.csrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.csrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "List", resp, "Failure sending request") + return + } + + result.csrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "List", resp, "Failure responding to request") + return + } + if result.csrlr.hasNextLink() && result.csrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client CloudServiceRolesClient) ListPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roles", 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 CloudServiceRolesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client CloudServiceRolesClient) ListResponder(resp *http.Response) (result CloudServiceRoleListResult, err error) { + err = autorest.Respond( + resp, + 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 CloudServiceRolesClient) listNextResults(ctx context.Context, lastResults CloudServiceRoleListResult) (result CloudServiceRoleListResult, err error) { + req, err := lastResults.cloudServiceRoleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "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, "compute.CloudServiceRolesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServiceRolesClient) ListComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRolesClient.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, cloudServiceName) + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/cloudservices.go b/services/compute/mgmt/2021-07-01/compute/cloudservices.go new file mode 100644 index 000000000000..52b00f268fc6 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/cloudservices.go @@ -0,0 +1,1189 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CloudServicesClient is the compute Client +type CloudServicesClient struct { + BaseClient +} + +// NewCloudServicesClient creates an instance of the CloudServicesClient client. +func NewCloudServicesClient(subscriptionID string) CloudServicesClient { + return NewCloudServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCloudServicesClientWithBaseURI creates an instance of the CloudServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewCloudServicesClientWithBaseURI(baseURI string, subscriptionID string) CloudServicesClient { + return CloudServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a cloud service. Please note some properties can be set only during cloud service +// creation. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// parameters - the cloud service object. +func (client CloudServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudService) (result CloudServicesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.CloudServicesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, cloudServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CloudServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudService) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.ID = nil + parameters.Name = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + 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 CloudServicesClient) CreateOrUpdateSender(req *http.Request) (future CloudServicesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) CreateOrUpdateResponder(resp *http.Response) (result CloudService, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +func (client CloudServicesClient) Delete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServicesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CloudServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}", 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 CloudServicesClient) DeleteSender(req *http.Request) (future CloudServicesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteInstances deletes role instances in a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// parameters - list of cloud service role instance names. +func (client CloudServicesClient) DeleteInstances(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesDeleteInstancesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.DeleteInstances") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.CloudServicesClient", "DeleteInstances", err.Error()) + } + + req, err := client.DeleteInstancesPreparer(ctx, resourceGroupName, cloudServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "DeleteInstances", nil, "Failure preparing request") + return + } + + result, err = client.DeleteInstancesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "DeleteInstances", nil, "Failure sending request") + return + } + + return +} + +// DeleteInstancesPreparer prepares the DeleteInstances request. +func (client CloudServicesClient) DeleteInstancesPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/delete", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteInstancesSender sends the DeleteInstances request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) DeleteInstancesSender(req *http.Request) (future CloudServicesDeleteInstancesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteInstancesResponder handles the response to the DeleteInstances request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) DeleteInstancesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get display information about a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +func (client CloudServicesClient) Get(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudService, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.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, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CloudServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}", 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 CloudServicesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) GetResponder(resp *http.Response) (result CloudService, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceView gets the status of a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +func (client CloudServicesClient) GetInstanceView(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServiceInstanceView, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.GetInstanceView") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "GetInstanceView", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceViewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "GetInstanceView", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceViewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "GetInstanceView", resp, "Failure responding to request") + return + } + + return +} + +// GetInstanceViewPreparer prepares the GetInstanceView request. +func (client CloudServicesClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/instanceView", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInstanceViewSender sends the GetInstanceView request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) GetInstanceViewResponder(resp *http.Response) (result CloudServiceInstanceView, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next +// page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. +// Parameters: +// resourceGroupName - name of the resource group. +func (client CloudServicesClient) List(ctx context.Context, resourceGroupName string) (result CloudServiceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.List") + defer func() { + sc := -1 + if result.cslr.Response.Response != nil { + sc = result.cslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.cslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "List", resp, "Failure sending request") + return + } + + result.cslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "List", resp, "Failure responding to request") + return + } + if result.cslr.hasNextLink() && result.cslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client CloudServicesClient) ListPreparer(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 = "2021-03-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.Compute/cloudServices", 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 CloudServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) ListResponder(resp *http.Response) (result CloudServiceListResult, err error) { + err = autorest.Respond( + resp, + 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 CloudServicesClient) listNextResults(ctx context.Context, lastResults CloudServiceListResult) (result CloudServiceListResult, err error) { + req, err := lastResults.cloudServiceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "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, "compute.CloudServicesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServicesClient) ListComplete(ctx context.Context, resourceGroupName string) (result CloudServiceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.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) + return +} + +// ListAll gets a list of all cloud services in the subscription, regardless of the associated resource group. Use +// nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all +// the Cloud Services. +func (client CloudServicesClient) ListAll(ctx context.Context) (result CloudServiceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.ListAll") + defer func() { + sc := -1 + if result.cslr.Response.Response != nil { + sc = result.cslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.cslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "ListAll", resp, "Failure sending request") + return + } + + result.cslr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.cslr.hasNextLink() && result.cslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client CloudServicesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) ListAllResponder(resp *http.Response) (result CloudServiceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client CloudServicesClient) listAllNextResults(ctx context.Context, lastResults CloudServiceListResult) (result CloudServiceListResult, err error) { + req, err := lastResults.cloudServiceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServicesClient) ListAllComplete(ctx context.Context) (result CloudServiceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.ListAll") + 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.ListAll(ctx) + return +} + +// PowerOff power off the cloud service. Note that resources are still attached and you are getting charged for the +// resources. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +func (client CloudServicesClient) PowerOff(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServicesPowerOffFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.PowerOff") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PowerOffPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "PowerOff", nil, "Failure preparing request") + return + } + + result, err = client.PowerOffSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "PowerOff", nil, "Failure sending request") + return + } + + return +} + +// PowerOffPreparer prepares the PowerOff request. +func (client CloudServicesClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/poweroff", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PowerOffSender sends the PowerOff request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) PowerOffSender(req *http.Request) (future CloudServicesPowerOffFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PowerOffResponder handles the response to the PowerOff request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Rebuild rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and +// initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can +// use Reimage Role Instances. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// parameters - list of cloud service role instance names. +func (client CloudServicesClient) Rebuild(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesRebuildFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Rebuild") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.CloudServicesClient", "Rebuild", err.Error()) + } + + req, err := client.RebuildPreparer(ctx, resourceGroupName, cloudServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Rebuild", nil, "Failure preparing request") + return + } + + result, err = client.RebuildSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Rebuild", nil, "Failure sending request") + return + } + + return +} + +// RebuildPreparer prepares the Rebuild request. +func (client CloudServicesClient) RebuildPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/rebuild", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RebuildSender sends the Rebuild request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) RebuildSender(req *http.Request) (future CloudServicesRebuildFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RebuildResponder handles the response to the Rebuild request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) RebuildResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Reimage reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// parameters - list of cloud service role instance names. +func (client CloudServicesClient) Reimage(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesReimageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Reimage") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.CloudServicesClient", "Reimage", err.Error()) + } + + req, err := client.ReimagePreparer(ctx, resourceGroupName, cloudServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Reimage", nil, "Failure preparing request") + return + } + + result, err = client.ReimageSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Reimage", nil, "Failure sending request") + return + } + + return +} + +// ReimagePreparer prepares the Reimage request. +func (client CloudServicesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/reimage", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageSender sends the Reimage request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) ReimageSender(req *http.Request) (future CloudServicesReimageFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageResponder handles the response to the Reimage request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Restart restarts one or more role instances in a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// parameters - list of cloud service role instance names. +func (client CloudServicesClient) Restart(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesRestartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Restart") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.CloudServicesClient", "Restart", err.Error()) + } + + req, err := client.RestartPreparer(ctx, resourceGroupName, cloudServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Restart", nil, "Failure preparing request") + return + } + + result, err = client.RestartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Restart", nil, "Failure sending request") + return + } + + return +} + +// RestartPreparer prepares the Restart request. +func (client CloudServicesClient) RestartPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/restart", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + 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 CloudServicesClient) RestartSender(req *http.Request) (future CloudServicesRestartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RestartResponder handles the response to the Restart request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Start starts the cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +func (client CloudServicesClient) Start(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServicesStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client CloudServicesClient) StartPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesClient) StartSender(req *http.Request) (future CloudServicesStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update update a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// parameters - the cloud service object. +func (client CloudServicesClient) Update(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudServiceUpdate) (result CloudServicesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, cloudServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client CloudServicesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudServiceUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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/cloudServices/{cloudServiceName}", 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 CloudServicesClient) UpdateSender(req *http.Request) (future CloudServicesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client CloudServicesClient) UpdateResponder(resp *http.Response) (result CloudService, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go b/services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go new file mode 100644 index 000000000000..7e13eb811a16 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go @@ -0,0 +1,318 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CloudServicesUpdateDomainClient is the compute Client +type CloudServicesUpdateDomainClient struct { + BaseClient +} + +// NewCloudServicesUpdateDomainClient creates an instance of the CloudServicesUpdateDomainClient client. +func NewCloudServicesUpdateDomainClient(subscriptionID string) CloudServicesUpdateDomainClient { + return NewCloudServicesUpdateDomainClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCloudServicesUpdateDomainClientWithBaseURI creates an instance of the CloudServicesUpdateDomainClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewCloudServicesUpdateDomainClientWithBaseURI(baseURI string, subscriptionID string) CloudServicesUpdateDomainClient { + return CloudServicesUpdateDomainClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetUpdateDomain gets the specified update domain of a cloud service. Use nextLink property in the response to get +// the next page of update domains. Do this till nextLink is null to fetch all the update domains. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// updateDomain - specifies an integer value that identifies the update domain. Update domains are identified +// with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. +func (client CloudServicesUpdateDomainClient) GetUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32) (result UpdateDomain, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.GetUpdateDomain") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetUpdateDomainPreparer(ctx, resourceGroupName, cloudServiceName, updateDomain) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "GetUpdateDomain", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpdateDomainSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "GetUpdateDomain", resp, "Failure sending request") + return + } + + result, err = client.GetUpdateDomainResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "GetUpdateDomain", resp, "Failure responding to request") + return + } + + return +} + +// GetUpdateDomainPreparer prepares the GetUpdateDomain request. +func (client CloudServicesUpdateDomainClient) GetUpdateDomainPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "updateDomain": autorest.Encode("path", updateDomain), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpdateDomainSender sends the GetUpdateDomain request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesUpdateDomainClient) GetUpdateDomainSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetUpdateDomainResponder handles the response to the GetUpdateDomain request. The method always +// closes the http.Response Body. +func (client CloudServicesUpdateDomainClient) GetUpdateDomainResponder(resp *http.Response) (result UpdateDomain, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListUpdateDomains gets a list of all update domains in a cloud service. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +func (client CloudServicesUpdateDomainClient) ListUpdateDomains(ctx context.Context, resourceGroupName string, cloudServiceName string) (result UpdateDomainListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.ListUpdateDomains") + defer func() { + sc := -1 + if result.udlr.Response.Response != nil { + sc = result.udlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listUpdateDomainsNextResults + req, err := client.ListUpdateDomainsPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "ListUpdateDomains", nil, "Failure preparing request") + return + } + + resp, err := client.ListUpdateDomainsSender(req) + if err != nil { + result.udlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "ListUpdateDomains", resp, "Failure sending request") + return + } + + result.udlr, err = client.ListUpdateDomainsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "ListUpdateDomains", resp, "Failure responding to request") + return + } + if result.udlr.hasNextLink() && result.udlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListUpdateDomainsPreparer prepares the ListUpdateDomains request. +func (client CloudServicesUpdateDomainClient) ListUpdateDomainsPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/updateDomains", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListUpdateDomainsSender sends the ListUpdateDomains request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesUpdateDomainClient) ListUpdateDomainsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListUpdateDomainsResponder handles the response to the ListUpdateDomains request. The method always +// closes the http.Response Body. +func (client CloudServicesUpdateDomainClient) ListUpdateDomainsResponder(resp *http.Response) (result UpdateDomainListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listUpdateDomainsNextResults retrieves the next set of results, if any. +func (client CloudServicesUpdateDomainClient) listUpdateDomainsNextResults(ctx context.Context, lastResults UpdateDomainListResult) (result UpdateDomainListResult, err error) { + req, err := lastResults.updateDomainListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "listUpdateDomainsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListUpdateDomainsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "listUpdateDomainsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListUpdateDomainsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "listUpdateDomainsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListUpdateDomainsComplete enumerates all values, automatically crossing page boundaries as required. +func (client CloudServicesUpdateDomainClient) ListUpdateDomainsComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result UpdateDomainListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.ListUpdateDomains") + 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.ListUpdateDomains(ctx, resourceGroupName, cloudServiceName) + return +} + +// WalkUpdateDomain updates the role instances in the specified update domain. +// Parameters: +// resourceGroupName - name of the resource group. +// cloudServiceName - name of the cloud service. +// updateDomain - specifies an integer value that identifies the update domain. Update domains are identified +// with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. +// parameters - the update domain object. +func (client CloudServicesUpdateDomainClient) WalkUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters *UpdateDomain) (result CloudServicesUpdateDomainWalkUpdateDomainFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.WalkUpdateDomain") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.WalkUpdateDomainPreparer(ctx, resourceGroupName, cloudServiceName, updateDomain, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "WalkUpdateDomain", nil, "Failure preparing request") + return + } + + result, err = client.WalkUpdateDomainSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "WalkUpdateDomain", nil, "Failure sending request") + return + } + + return +} + +// WalkUpdateDomainPreparer prepares the WalkUpdateDomain request. +func (client CloudServicesUpdateDomainClient) WalkUpdateDomainPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters *UpdateDomain) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "updateDomain": autorest.Encode("path", updateDomain), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.ID = nil + parameters.Name = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// WalkUpdateDomainSender sends the WalkUpdateDomain request. The method will close the +// http.Response Body if it receives an error. +func (client CloudServicesUpdateDomainClient) WalkUpdateDomainSender(req *http.Request) (future CloudServicesUpdateDomainWalkUpdateDomainFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// WalkUpdateDomainResponder handles the response to the WalkUpdateDomain request. The method always +// closes the http.Response Body. +func (client CloudServicesUpdateDomainClient) WalkUpdateDomainResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2021-07-01/compute/computeapi/interfaces.go new file mode 100644 index 000000000000..949adc62bbbb --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/computeapi/interfaces.go @@ -0,0 +1,619 @@ +package computeapi + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/compute/mgmt/2021-07-01/compute" + "github.com/Azure/go-autorest/autorest" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result compute.OperationListResult, err error) +} + +var _ OperationsClientAPI = (*compute.OperationsClient)(nil) + +// AvailabilitySetsClientAPI contains the set of methods on the AvailabilitySetsClient type. +type AvailabilitySetsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters compute.AvailabilitySet) (result compute.AvailabilitySet, err error) + Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.AvailabilitySet, err error) + List(ctx context.Context, resourceGroupName string) (result compute.AvailabilitySetListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result compute.AvailabilitySetListResultIterator, err error) + ListAvailableSizes(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.VirtualMachineSizeListResult, err error) + ListBySubscription(ctx context.Context, expand string) (result compute.AvailabilitySetListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string) (result compute.AvailabilitySetListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters compute.AvailabilitySetUpdate) (result compute.AvailabilitySet, err error) +} + +var _ AvailabilitySetsClientAPI = (*compute.AvailabilitySetsClient)(nil) + +// ProximityPlacementGroupsClientAPI contains the set of methods on the ProximityPlacementGroupsClient type. +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, includeColocationStatus string) (result compute.ProximityPlacementGroup, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ProximityPlacementGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.ProximityPlacementGroupListResultIterator, err error) + ListBySubscription(ctx context.Context) (result compute.ProximityPlacementGroupListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result compute.ProximityPlacementGroupListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters compute.ProximityPlacementGroupUpdate) (result compute.ProximityPlacementGroup, err error) +} + +var _ ProximityPlacementGroupsClientAPI = (*compute.ProximityPlacementGroupsClient)(nil) + +// DedicatedHostGroupsClientAPI contains the set of methods on the DedicatedHostGroupsClient type. +type DedicatedHostGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, parameters compute.DedicatedHostGroup) (result compute.DedicatedHostGroup, err error) + Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, hostGroupName string, expand compute.InstanceViewTypes) (result compute.DedicatedHostGroup, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.DedicatedHostGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.DedicatedHostGroupListResultIterator, err error) + ListBySubscription(ctx context.Context) (result compute.DedicatedHostGroupListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result compute.DedicatedHostGroupListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, hostGroupName string, parameters compute.DedicatedHostGroupUpdate) (result compute.DedicatedHostGroup, err error) +} + +var _ DedicatedHostGroupsClientAPI = (*compute.DedicatedHostGroupsClient)(nil) + +// DedicatedHostsClientAPI contains the set of methods on the DedicatedHostsClient type. +type DedicatedHostsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters compute.DedicatedHost) (result compute.DedicatedHostsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (result compute.DedicatedHostsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand compute.InstanceViewTypes) (result compute.DedicatedHost, err error) + ListByHostGroup(ctx context.Context, resourceGroupName string, hostGroupName string) (result compute.DedicatedHostListResultPage, err error) + ListByHostGroupComplete(ctx context.Context, resourceGroupName string, hostGroupName string) (result compute.DedicatedHostListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters compute.DedicatedHostUpdate) (result compute.DedicatedHostsUpdateFuture, err error) +} + +var _ DedicatedHostsClientAPI = (*compute.DedicatedHostsClient)(nil) + +// SSHPublicKeysClientAPI contains the set of methods on the SSHPublicKeysClient type. +type SSHPublicKeysClientAPI interface { + Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters compute.SSHPublicKeyResource) (result compute.SSHPublicKeyResource, err error) + Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) + GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result compute.SSHPublicKeyGenerateKeyPairResult, err error) + Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result compute.SSHPublicKeyResource, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.SSHPublicKeysGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.SSHPublicKeysGroupListResultIterator, err error) + ListBySubscription(ctx context.Context) (result compute.SSHPublicKeysGroupListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result compute.SSHPublicKeysGroupListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters compute.SSHPublicKeyUpdateResource) (result compute.SSHPublicKeyResource, err error) +} + +var _ SSHPublicKeysClientAPI = (*compute.SSHPublicKeysClient)(nil) + +// VirtualMachineExtensionImagesClientAPI contains the set of methods on the VirtualMachineExtensionImagesClient type. +type VirtualMachineExtensionImagesClientAPI interface { + Get(ctx context.Context, location string, publisherName string, typeParameter string, version string) (result compute.VirtualMachineExtensionImage, err error) + ListTypes(ctx context.Context, location string, publisherName string) (result compute.ListVirtualMachineExtensionImage, err error) + ListVersions(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (result compute.ListVirtualMachineExtensionImage, err error) +} + +var _ VirtualMachineExtensionImagesClientAPI = (*compute.VirtualMachineExtensionImagesClient)(nil) + +// VirtualMachineExtensionsClientAPI contains the set of methods on the VirtualMachineExtensionsClient type. +type VirtualMachineExtensionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters compute.VirtualMachineExtension) (result compute.VirtualMachineExtensionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (result compute.VirtualMachineExtensionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (result compute.VirtualMachineExtension, err error) + List(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineExtensionsListResult, err error) + Update(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters compute.VirtualMachineExtensionUpdate) (result compute.VirtualMachineExtensionsUpdateFuture, err error) +} + +var _ VirtualMachineExtensionsClientAPI = (*compute.VirtualMachineExtensionsClient)(nil) + +// VirtualMachineImagesClientAPI contains the set of methods on the VirtualMachineImagesClient type. +type VirtualMachineImagesClientAPI interface { + Get(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (result compute.VirtualMachineImage, err error) + List(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result compute.ListVirtualMachineImageResource, err error) + ListOffers(ctx context.Context, location string, publisherName string) (result compute.ListVirtualMachineImageResource, err error) + ListPublishers(ctx context.Context, location string) (result compute.ListVirtualMachineImageResource, err error) + ListSkus(ctx context.Context, location string, publisherName string, offer string) (result compute.ListVirtualMachineImageResource, err error) +} + +var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(nil) + +// VirtualMachineImagesEdgeZoneClientAPI contains the set of methods on the VirtualMachineImagesEdgeZoneClient type. +type VirtualMachineImagesEdgeZoneClientAPI interface { + Get(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string) (result compute.VirtualMachineImage, err error) + List(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result compute.ListVirtualMachineImageResource, err error) + ListOffers(ctx context.Context, location string, edgeZone string, publisherName string) (result compute.ListVirtualMachineImageResource, err error) + ListPublishers(ctx context.Context, location string, edgeZone string) (result compute.ListVirtualMachineImageResource, err error) + ListSkus(ctx context.Context, location string, edgeZone string, publisherName string, offer string) (result compute.ListVirtualMachineImageResource, err error) +} + +var _ VirtualMachineImagesEdgeZoneClientAPI = (*compute.VirtualMachineImagesEdgeZoneClient)(nil) + +// UsageClientAPI contains the set of methods on the UsageClient type. +type UsageClientAPI interface { + List(ctx context.Context, location string) (result compute.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.ListUsagesResultIterator, err error) +} + +var _ UsageClientAPI = (*compute.UsageClient)(nil) + +// VirtualMachinesClientAPI contains the set of methods on the VirtualMachinesClient type. +type VirtualMachinesClientAPI interface { + AssessPatches(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesAssessPatchesFuture, err error) + Capture(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineCaptureParameters) (result compute.VirtualMachinesCaptureFuture, err error) + ConvertToManagedDisks(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesConvertToManagedDisksFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine) (result compute.VirtualMachinesCreateOrUpdateFuture, err error) + Deallocate(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (result compute.VirtualMachinesDeallocateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (result compute.VirtualMachinesDeleteFuture, err error) + Generalize(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err error) + InstallPatches(ctx context.Context, resourceGroupName string, VMName string, installPatchesInput compute.VirtualMachineInstallPatchesParameters) (result compute.VirtualMachinesInstallPatchesFuture, err error) + InstanceView(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachineInstanceView, err error) + List(ctx context.Context, resourceGroupName string) (result compute.VirtualMachineListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result compute.VirtualMachineListResultIterator, err error) + ListAll(ctx context.Context, statusOnly string) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context, statusOnly string) (result compute.VirtualMachineListResultIterator, err error) + ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachineSizeListResult, err error) + ListByLocation(ctx context.Context, location string) (result compute.VirtualMachineListResultPage, err error) + ListByLocationComplete(ctx context.Context, location string) (result compute.VirtualMachineListResultIterator, err error) + PerformMaintenance(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesPerformMaintenanceFuture, err error) + PowerOff(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (result compute.VirtualMachinesPowerOffFuture, err error) + Reapply(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesReapplyFuture, err error) + Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) + Reimage(ctx context.Context, resourceGroupName string, VMName string, parameters *compute.VirtualMachineReimageParameters) (result compute.VirtualMachinesReimageFuture, err error) + Restart(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRestartFuture, err error) + RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, VMName string, sasURIExpirationTimeInMinutes *int32) (result compute.RetrieveBootDiagnosticsDataResult, err error) + RunCommand(ctx context.Context, resourceGroupName string, VMName string, parameters compute.RunCommandInput) (result compute.VirtualMachinesRunCommandFuture, err error) + SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) + Start(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesStartFuture, err error) + Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate) (result compute.VirtualMachinesUpdateFuture, err error) +} + +var _ VirtualMachinesClientAPI = (*compute.VirtualMachinesClient)(nil) + +// VirtualMachineScaleSetsClientAPI contains the set of methods on the VirtualMachineScaleSetsClient type. +type VirtualMachineScaleSetsClientAPI interface { + ConvertToSinglePlacementGroup(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VMScaleSetConvertToSinglePlacementGroupInput) (result autorest.Response, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (result compute.VirtualMachineScaleSetsCreateOrUpdateFuture, err error) + Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsDeallocateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, forceDeletion *bool) (result compute.VirtualMachineScaleSetsDeleteFuture, err error) + DeleteInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, forceDeletion *bool) (result compute.VirtualMachineScaleSetsDeleteInstancesFuture, err error) + ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (result compute.RecoveryWalkResponse, err error) + Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, expand compute.ExpandTypesForGetVMScaleSets) (result compute.VirtualMachineScaleSet, err error) + GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetInstanceView, err error) + GetOSUpgradeHistory(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetListOSUpgradeHistoryPage, err error) + GetOSUpgradeHistoryComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetListOSUpgradeHistoryIterator, err error) + List(ctx context.Context, resourceGroupName string) (result compute.VirtualMachineScaleSetListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result compute.VirtualMachineScaleSetListResultIterator, err error) + ListAll(ctx context.Context) (result compute.VirtualMachineScaleSetListWithLinkResultPage, err error) + ListAllComplete(ctx context.Context) (result compute.VirtualMachineScaleSetListWithLinkResultIterator, err error) + ListByLocation(ctx context.Context, location string) (result compute.VirtualMachineScaleSetListResultPage, err error) + ListByLocationComplete(ctx context.Context, location string) (result compute.VirtualMachineScaleSetListResultIterator, err error) + ListSkus(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetListSkusResultPage, err error) + ListSkusComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetListSkusResultIterator, err error) + PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsPerformMaintenanceFuture, err error) + PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) + Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRedeployFuture, err error) + Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *compute.VirtualMachineScaleSetReimageParameters) (result compute.VirtualMachineScaleSetsReimageFuture, err error) + ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsReimageAllFuture, err error) + Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRestartFuture, err error) + SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.OrchestrationServiceStateInput) (result compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) + Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsStartFuture, err error) + Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSetUpdate) (result compute.VirtualMachineScaleSetsUpdateFuture, err error) + UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (result compute.VirtualMachineScaleSetsUpdateInstancesFuture, err error) +} + +var _ VirtualMachineScaleSetsClientAPI = (*compute.VirtualMachineScaleSetsClient)(nil) + +// VirtualMachineSizesClientAPI contains the set of methods on the VirtualMachineSizesClient type. +type VirtualMachineSizesClientAPI interface { + List(ctx context.Context, location string) (result compute.VirtualMachineSizeListResult, err error) +} + +var _ VirtualMachineSizesClientAPI = (*compute.VirtualMachineSizesClient)(nil) + +// ImagesClientAPI contains the set of methods on the ImagesClient type. +type ImagesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters compute.Image) (result compute.ImagesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, imageName string) (result compute.ImagesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, imageName string, expand string) (result compute.Image, err error) + List(ctx context.Context) (result compute.ImageListResultPage, err error) + ListComplete(ctx context.Context) (result compute.ImageListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ImageListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.ImageListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, imageName string, parameters compute.ImageUpdate) (result compute.ImagesUpdateFuture, err error) +} + +var _ ImagesClientAPI = (*compute.ImagesClient)(nil) + +// RestorePointCollectionsClientAPI contains the set of methods on the RestorePointCollectionsClient type. +type RestorePointCollectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters compute.RestorePointCollection) (result compute.RestorePointCollection, err error) + Delete(ctx context.Context, resourceGroupName string, restorePointCollectionName string) (result compute.RestorePointCollectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, expand compute.RestorePointCollectionExpandOptions) (result compute.RestorePointCollection, err error) + List(ctx context.Context, resourceGroupName string) (result compute.RestorePointCollectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result compute.RestorePointCollectionListResultIterator, err error) + ListAll(ctx context.Context) (result compute.RestorePointCollectionListResultPage, err error) + ListAllComplete(ctx context.Context) (result compute.RestorePointCollectionListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters compute.RestorePointCollectionUpdate) (result compute.RestorePointCollection, err error) +} + +var _ RestorePointCollectionsClientAPI = (*compute.RestorePointCollectionsClient)(nil) + +// RestorePointsClientAPI contains the set of methods on the RestorePointsClient type. +type RestorePointsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters compute.RestorePoint) (result compute.RestorePointsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (result compute.RestorePointsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (result compute.RestorePoint, err error) +} + +var _ RestorePointsClientAPI = (*compute.RestorePointsClient)(nil) + +// CapacityReservationGroupsClientAPI contains the set of methods on the CapacityReservationGroupsClient type. +type CapacityReservationGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters compute.CapacityReservationGroup) (result compute.CapacityReservationGroup, err error) + Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand compute.CapacityReservationGroupInstanceViewTypes) (result compute.CapacityReservationGroup, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string, expand compute.ExpandTypesForGetCapacityReservationGroups) (result compute.CapacityReservationGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand compute.ExpandTypesForGetCapacityReservationGroups) (result compute.CapacityReservationGroupListResultIterator, err error) + ListBySubscription(ctx context.Context, expand compute.ExpandTypesForGetCapacityReservationGroups) (result compute.CapacityReservationGroupListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand compute.ExpandTypesForGetCapacityReservationGroups) (result compute.CapacityReservationGroupListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters compute.CapacityReservationGroupUpdate) (result compute.CapacityReservationGroup, err error) +} + +var _ CapacityReservationGroupsClientAPI = (*compute.CapacityReservationGroupsClient)(nil) + +// CapacityReservationsClientAPI contains the set of methods on the CapacityReservationsClient type. +type CapacityReservationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters compute.CapacityReservation) (result compute.CapacityReservationsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (result compute.CapacityReservationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand compute.CapacityReservationInstanceViewTypes) (result compute.CapacityReservation, err error) + ListByCapacityReservationGroup(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result compute.CapacityReservationListResultPage, err error) + ListByCapacityReservationGroupComplete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result compute.CapacityReservationListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters compute.CapacityReservationUpdate) (result compute.CapacityReservationsUpdateFuture, err error) +} + +var _ CapacityReservationsClientAPI = (*compute.CapacityReservationsClient)(nil) + +// VirtualMachineScaleSetExtensionsClientAPI contains the set of methods on the VirtualMachineScaleSetExtensionsClient type. +type VirtualMachineScaleSetExtensionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters compute.VirtualMachineScaleSetExtension) (result compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) + 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) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, 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) + +// VirtualMachineScaleSetRollingUpgradesClientAPI contains the set of methods on the VirtualMachineScaleSetRollingUpgradesClient type. +type VirtualMachineScaleSetRollingUpgradesClientAPI interface { + Cancel(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) + GetLatest(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.RollingUpgradeStatusInfo, err error) + StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) + StartOSUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) +} + +var _ VirtualMachineScaleSetRollingUpgradesClientAPI = (*compute.VirtualMachineScaleSetRollingUpgradesClient)(nil) + +// VirtualMachineScaleSetVMExtensionsClientAPI contains the set of methods on the VirtualMachineScaleSetVMExtensionsClient type. +type VirtualMachineScaleSetVMExtensionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters compute.VirtualMachineScaleSetVMExtension) (result compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (result compute.VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (result compute.VirtualMachineScaleSetVMExtension, err error) + List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result compute.VirtualMachineScaleSetVMExtensionsListResult, err error) + Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters compute.VirtualMachineScaleSetVMExtensionUpdate) (result compute.VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) +} + +var _ VirtualMachineScaleSetVMExtensionsClientAPI = (*compute.VirtualMachineScaleSetVMExtensionsClient)(nil) + +// VirtualMachineScaleSetVMsClientAPI contains the set of methods on the VirtualMachineScaleSetVMsClient type. +type VirtualMachineScaleSetVMsClientAPI interface { + Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsDeallocateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, forceDeletion *bool) (result compute.VirtualMachineScaleSetVMsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand compute.InstanceViewTypes) (result compute.VirtualMachineScaleSetVM, err error) + GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMInstanceView, err error) + List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result compute.VirtualMachineScaleSetVMListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result compute.VirtualMachineScaleSetVMListResultIterator, err error) + PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) + PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) + Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRedeployFuture, err error) + Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *compute.VirtualMachineScaleSetVMReimageParameters) (result compute.VirtualMachineScaleSetVMsReimageFuture, err error) + ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageAllFuture, err error) + Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRestartFuture, err error) + RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, sasURIExpirationTimeInMinutes *int32) (result compute.RetrieveBootDiagnosticsDataResult, err error) + RunCommand(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.RunCommandInput) (result compute.VirtualMachineScaleSetVMsRunCommandFuture, err error) + SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) + Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsStartFuture, err error) + Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM) (result compute.VirtualMachineScaleSetVMsUpdateFuture, err error) +} + +var _ VirtualMachineScaleSetVMsClientAPI = (*compute.VirtualMachineScaleSetVMsClient)(nil) + +// LogAnalyticsClientAPI contains the set of methods on the LogAnalyticsClient type. +type LogAnalyticsClientAPI interface { + ExportRequestRateByInterval(ctx context.Context, parameters compute.RequestRateByIntervalInput, location string) (result compute.LogAnalyticsExportRequestRateByIntervalFuture, err error) + ExportThrottledRequests(ctx context.Context, parameters compute.ThrottledRequestsInput, location string) (result compute.LogAnalyticsExportThrottledRequestsFuture, err error) +} + +var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) + +// VirtualMachineRunCommandsClientAPI contains the set of methods on the VirtualMachineRunCommandsClient type. +type VirtualMachineRunCommandsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand compute.VirtualMachineRunCommand) (result compute.VirtualMachineRunCommandsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (result compute.VirtualMachineRunCommandsDeleteFuture, err error) + Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) + GetByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (result compute.VirtualMachineRunCommand, err error) + List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) + ListByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineRunCommandsListResultPage, err error) + ListByVirtualMachineComplete(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineRunCommandsListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand compute.VirtualMachineRunCommandUpdate) (result compute.VirtualMachineRunCommandsUpdateFuture, err error) +} + +var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) + +// VirtualMachineScaleSetVMRunCommandsClientAPI contains the set of methods on the VirtualMachineScaleSetVMRunCommandsClient type. +type VirtualMachineScaleSetVMRunCommandsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand compute.VirtualMachineRunCommand) (result compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (result compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (result compute.VirtualMachineRunCommand, err error) + List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result compute.VirtualMachineRunCommandsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result compute.VirtualMachineRunCommandsListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand compute.VirtualMachineRunCommandUpdate) (result compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) +} + +var _ VirtualMachineScaleSetVMRunCommandsClientAPI = (*compute.VirtualMachineScaleSetVMRunCommandsClient)(nil) + +// ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. +type ResourceSkusClientAPI interface { + List(ctx context.Context, filter string, includeExtendedLocations string) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context, filter string, includeExtendedLocations string) (result compute.ResourceSkusResultIterator, err error) +} + +var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) + +// DisksClientAPI contains the set of methods on the DisksClient type. +type DisksClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk compute.Disk) (result compute.DisksCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, diskName string) (result compute.DisksDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, diskName string) (result compute.Disk, err error) + GrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData compute.GrantAccessData) (result compute.DisksGrantAccessFuture, err error) + List(ctx context.Context) (result compute.DiskListPage, err error) + ListComplete(ctx context.Context) (result compute.DiskListIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.DiskListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.DiskListIterator, err error) + RevokeAccess(ctx context.Context, resourceGroupName string, diskName string) (result compute.DisksRevokeAccessFuture, err error) + Update(ctx context.Context, resourceGroupName string, diskName string, disk compute.DiskUpdate) (result compute.DisksUpdateFuture, err error) +} + +var _ DisksClientAPI = (*compute.DisksClient)(nil) + +// SnapshotsClientAPI contains the set of methods on the SnapshotsClient type. +type SnapshotsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot compute.Snapshot) (result compute.SnapshotsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, snapshotName string) (result compute.SnapshotsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, snapshotName string) (result compute.Snapshot, err error) + GrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData compute.GrantAccessData) (result compute.SnapshotsGrantAccessFuture, err error) + List(ctx context.Context) (result compute.SnapshotListPage, err error) + ListComplete(ctx context.Context) (result compute.SnapshotListIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.SnapshotListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.SnapshotListIterator, err error) + RevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string) (result compute.SnapshotsRevokeAccessFuture, err error) + Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot compute.SnapshotUpdate) (result compute.SnapshotsUpdateFuture, err error) +} + +var _ SnapshotsClientAPI = (*compute.SnapshotsClient)(nil) + +// DiskEncryptionSetsClientAPI contains the set of methods on the DiskEncryptionSetsClient type. +type DiskEncryptionSetsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet compute.DiskEncryptionSet) (result compute.DiskEncryptionSetsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result compute.DiskEncryptionSetsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result compute.DiskEncryptionSet, err error) + List(ctx context.Context) (result compute.DiskEncryptionSetListPage, err error) + ListComplete(ctx context.Context) (result compute.DiskEncryptionSetListIterator, err error) + ListAssociatedResources(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result compute.ResourceURIListPage, err error) + ListAssociatedResourcesComplete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result compute.ResourceURIListIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.DiskEncryptionSetListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.DiskEncryptionSetListIterator, err error) + Update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet compute.DiskEncryptionSetUpdate) (result compute.DiskEncryptionSetsUpdateFuture, err error) +} + +var _ DiskEncryptionSetsClientAPI = (*compute.DiskEncryptionSetsClient)(nil) + +// DiskAccessesClientAPI contains the set of methods on the DiskAccessesClient type. +type DiskAccessesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess compute.DiskAccess) (result compute.DiskAccessesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, diskAccessName string) (result compute.DiskAccessesDeleteFuture, err error) + DeleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) + Get(ctx context.Context, resourceGroupName string, diskAccessName string) (result compute.DiskAccess, err error) + GetAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result compute.PrivateEndpointConnection, err error) + GetPrivateLinkResources(ctx context.Context, resourceGroupName string, diskAccessName string) (result compute.PrivateLinkResourceListResult, err error) + List(ctx context.Context) (result compute.DiskAccessListPage, err error) + ListComplete(ctx context.Context) (result compute.DiskAccessListIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.DiskAccessListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.DiskAccessListIterator, err error) + ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, diskAccessName string) (result compute.PrivateEndpointConnectionListResultPage, err error) + ListPrivateEndpointConnectionsComplete(ctx context.Context, resourceGroupName string, diskAccessName string) (result compute.PrivateEndpointConnectionListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess compute.DiskAccessUpdate) (result compute.DiskAccessesUpdateFuture, err error) + UpdateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection compute.PrivateEndpointConnection) (result compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) +} + +var _ DiskAccessesClientAPI = (*compute.DiskAccessesClient)(nil) + +// DiskRestorePointClientAPI contains the set of methods on the DiskRestorePointClient type. +type DiskRestorePointClientAPI interface { + Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result compute.DiskRestorePoint, err error) + GrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData compute.GrantAccessData) (result compute.DiskRestorePointGrantAccessFuture, err error) + ListByRestorePoint(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result compute.DiskRestorePointListPage, err error) + ListByRestorePointComplete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result compute.DiskRestorePointListIterator, err error) + RevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result compute.DiskRestorePointRevokeAccessFuture, err error) +} + +var _ DiskRestorePointClientAPI = (*compute.DiskRestorePointClient)(nil) + +// GalleriesClientAPI contains the set of methods on the GalleriesClient type. +type GalleriesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery compute.Gallery) (result compute.GalleriesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleriesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, galleryName string, selectParameter compute.SelectPermissions) (result compute.Gallery, err error) + List(ctx context.Context) (result compute.GalleryListPage, err error) + ListComplete(ctx context.Context) (result compute.GalleryListIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.GalleryListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.GalleryListIterator, err error) + Update(ctx context.Context, resourceGroupName string, galleryName string, gallery compute.GalleryUpdate) (result compute.GalleriesUpdateFuture, err error) +} + +var _ GalleriesClientAPI = (*compute.GalleriesClient)(nil) + +// GalleryImagesClientAPI contains the set of methods on the GalleryImagesClient type. +type GalleryImagesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage compute.GalleryImage) (result compute.GalleryImagesCreateOrUpdateFuture, err error) + 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) + ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListIterator, 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) + +// GalleryImageVersionsClientAPI contains the set of methods on the GalleryImageVersionsClient type. +type GalleryImageVersionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion compute.GalleryImageVersion) (result compute.GalleryImageVersionsCreateOrUpdateFuture, err error) + 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) + ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListIterator, 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) + +// GalleryApplicationsClientAPI contains the set of methods on the GalleryApplicationsClient type. +type GalleryApplicationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication compute.GalleryApplication) (result compute.GalleryApplicationsCreateOrUpdateFuture, err error) + 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) + ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryApplicationListIterator, 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) + +// GalleryApplicationVersionsClientAPI contains the set of methods on the GalleryApplicationVersionsClient type. +type GalleryApplicationVersionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion compute.GalleryApplicationVersion) (result compute.GalleryApplicationVersionsCreateOrUpdateFuture, err error) + 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) + ListByGalleryApplicationComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationVersionListIterator, 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) + +// GallerySharingProfileClientAPI contains the set of methods on the GallerySharingProfileClient type. +type GallerySharingProfileClientAPI interface { + Update(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate compute.SharingUpdate) (result compute.GallerySharingProfileUpdateFuture, err error) +} + +var _ GallerySharingProfileClientAPI = (*compute.GallerySharingProfileClient)(nil) + +// SharedGalleriesClientAPI contains the set of methods on the SharedGalleriesClient type. +type SharedGalleriesClientAPI interface { + Get(ctx context.Context, location string, galleryUniqueName string) (result compute.SharedGallery, err error) + List(ctx context.Context, location string, sharedTo compute.SharedToValues) (result compute.SharedGalleryListPage, err error) + ListComplete(ctx context.Context, location string, sharedTo compute.SharedToValues) (result compute.SharedGalleryListIterator, err error) +} + +var _ SharedGalleriesClientAPI = (*compute.SharedGalleriesClient)(nil) + +// SharedGalleryImagesClientAPI contains the set of methods on the SharedGalleryImagesClient type. +type SharedGalleryImagesClientAPI interface { + Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string) (result compute.SharedGalleryImage, err error) + List(ctx context.Context, location string, galleryUniqueName string, sharedTo compute.SharedToValues) (result compute.SharedGalleryImageListPage, err error) + ListComplete(ctx context.Context, location string, galleryUniqueName string, sharedTo compute.SharedToValues) (result compute.SharedGalleryImageListIterator, err error) +} + +var _ SharedGalleryImagesClientAPI = (*compute.SharedGalleryImagesClient)(nil) + +// SharedGalleryImageVersionsClientAPI contains the set of methods on the SharedGalleryImageVersionsClient type. +type SharedGalleryImageVersionsClientAPI interface { + Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string) (result compute.SharedGalleryImageVersion, err error) + List(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo compute.SharedToValues) (result compute.SharedGalleryImageVersionListPage, err error) + ListComplete(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo compute.SharedToValues) (result compute.SharedGalleryImageVersionListIterator, err error) +} + +var _ SharedGalleryImageVersionsClientAPI = (*compute.SharedGalleryImageVersionsClient)(nil) + +// CloudServiceRoleInstancesClientAPI contains the set of methods on the CloudServiceRoleInstancesClient type. +type CloudServiceRoleInstancesClientAPI interface { + Delete(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRoleInstancesDeleteFuture, err error) + Get(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, expand compute.InstanceViewTypes) (result compute.RoleInstance, err error) + GetInstanceView(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result compute.RoleInstanceInstanceView, err error) + GetRemoteDesktopFile(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result compute.ReadCloser, err error) + List(ctx context.Context, resourceGroupName string, cloudServiceName string, expand compute.InstanceViewTypes) (result compute.RoleInstanceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, expand compute.InstanceViewTypes) (result compute.RoleInstanceListResultIterator, err error) + Rebuild(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRoleInstancesRebuildFuture, err error) + Reimage(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRoleInstancesReimageFuture, err error) + Restart(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRoleInstancesRestartFuture, err error) +} + +var _ CloudServiceRoleInstancesClientAPI = (*compute.CloudServiceRoleInstancesClient)(nil) + +// CloudServiceRolesClientAPI contains the set of methods on the CloudServiceRolesClient type. +type CloudServiceRolesClientAPI interface { + Get(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRole, err error) + List(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRoleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceRoleListResultIterator, err error) +} + +var _ CloudServiceRolesClientAPI = (*compute.CloudServiceRolesClient)(nil) + +// CloudServicesClientAPI contains the set of methods on the CloudServicesClient type. +type CloudServicesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *compute.CloudService) (result compute.CloudServicesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudServicesDeleteFuture, err error) + DeleteInstances(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *compute.RoleInstances) (result compute.CloudServicesDeleteInstancesFuture, err error) + Get(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudService, err error) + GetInstanceView(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudServiceInstanceView, err error) + List(ctx context.Context, resourceGroupName string) (result compute.CloudServiceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result compute.CloudServiceListResultIterator, err error) + ListAll(ctx context.Context) (result compute.CloudServiceListResultPage, err error) + ListAllComplete(ctx context.Context) (result compute.CloudServiceListResultIterator, err error) + PowerOff(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudServicesPowerOffFuture, err error) + Rebuild(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *compute.RoleInstances) (result compute.CloudServicesRebuildFuture, err error) + Reimage(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *compute.RoleInstances) (result compute.CloudServicesReimageFuture, err error) + Restart(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *compute.RoleInstances) (result compute.CloudServicesRestartFuture, err error) + Start(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.CloudServicesStartFuture, err error) + Update(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *compute.CloudServiceUpdate) (result compute.CloudServicesUpdateFuture, err error) +} + +var _ CloudServicesClientAPI = (*compute.CloudServicesClient)(nil) + +// CloudServicesUpdateDomainClientAPI contains the set of methods on the CloudServicesUpdateDomainClient type. +type CloudServicesUpdateDomainClientAPI interface { + GetUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32) (result compute.UpdateDomain, err error) + ListUpdateDomains(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.UpdateDomainListResultPage, err error) + ListUpdateDomainsComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result compute.UpdateDomainListResultIterator, err error) + WalkUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters *compute.UpdateDomain) (result compute.CloudServicesUpdateDomainWalkUpdateDomainFuture, err error) +} + +var _ CloudServicesUpdateDomainClientAPI = (*compute.CloudServicesUpdateDomainClient)(nil) + +// CloudServiceOperatingSystemsClientAPI contains the set of methods on the CloudServiceOperatingSystemsClient type. +type CloudServiceOperatingSystemsClientAPI interface { + GetOSFamily(ctx context.Context, location string, osFamilyName string) (result compute.OSFamily, err error) + GetOSVersion(ctx context.Context, location string, osVersionName string) (result compute.OSVersion, err error) + ListOSFamilies(ctx context.Context, location string) (result compute.OSFamilyListResultPage, err error) + ListOSFamiliesComplete(ctx context.Context, location string) (result compute.OSFamilyListResultIterator, err error) + ListOSVersions(ctx context.Context, location string) (result compute.OSVersionListResultPage, err error) + ListOSVersionsComplete(ctx context.Context, location string) (result compute.OSVersionListResultIterator, err error) +} + +var _ CloudServiceOperatingSystemsClientAPI = (*compute.CloudServiceOperatingSystemsClient)(nil) diff --git a/services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go b/services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go new file mode 100644 index 000000000000..67ace3df4d8e --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go @@ -0,0 +1,589 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DedicatedHostGroupsClient is the compute Client +type DedicatedHostGroupsClient struct { + BaseClient +} + +// NewDedicatedHostGroupsClient creates an instance of the DedicatedHostGroupsClient client. +func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClient { + return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient { + return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups +// please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// parameters - parameters supplied to the Create Dedicated Host Group. +func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (result DedicatedHostGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.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: parameters, + 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.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/hostGroups/{hostGroupName}", 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 DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DedicatedHostGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a dedicated host group. +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/hostGroups/{hostGroupName}", 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 DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DedicatedHostGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about a dedicated host group. +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance +// views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host +// group. +func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, expand InstanceViewTypes) (result DedicatedHostGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.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, hostGroupName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/hostGroups/{hostGroupName}", 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 DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DedicatedHostGroupsClient) GetResponder(resp *http.Response) (result DedicatedHostGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all of the dedicated host groups in the specified resource group. Use the nextLink +// property in the response to get the next page of dedicated host groups. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.dhglr.Response.Response != nil { + sc = result.dhglr.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, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.dhglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.dhglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DedicatedHostGroupsClient) 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 = "2021-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.Compute/hostGroups", 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 DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DedicatedHostGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 DedicatedHostGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) { + req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "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, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.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 lists all of the dedicated host groups in the subscription. Use the nextLink property in the +// response to get the next page of dedicated host groups. +func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context) (result DedicatedHostGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription") + defer func() { + sc := -1 + if result.dhglr.Response.Response != nil { + sc = result.dhglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.dhglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.dhglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", 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 DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client DedicatedHostGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 DedicatedHostGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) { + req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "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, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result DedicatedHostGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.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 +} + +// Update update an dedicated host group. +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// parameters - parameters supplied to the Update Dedicated Host Group operation. +func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (result DedicatedHostGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.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, hostGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/hostGroups/{hostGroupName}", 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 DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DedicatedHostGroupsClient) UpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go b/services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go new file mode 100644 index 000000000000..253583b48149 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go @@ -0,0 +1,489 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DedicatedHostsClient is the compute Client +type DedicatedHostsClient struct { + BaseClient +} + +// NewDedicatedHostsClient creates an instance of the DedicatedHostsClient client. +func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient { + return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient { + return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a dedicated host . +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// hostName - the name of the dedicated host . +// parameters - parameters supplied to the Create Dedicated Host. +func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (result DedicatedHostsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + 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.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + }}, + {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.DedicatedHostsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "hostName": autorest.Encode("path", hostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", 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 DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DedicatedHostsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a dedicated host. +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// hostName - the name of the dedicated host. +func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (result DedicatedHostsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName, hostName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "hostName": autorest.Encode("path", hostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", 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 DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DedicatedHostsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about a dedicated host. +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// hostName - the name of the dedicated host. +// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance +// views of the dedicated host. 'UserData' is not supported for dedicated host. +func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (result DedicatedHost, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.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, hostGroupName, hostName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "hostName": autorest.Encode("path", hostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", 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 DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DedicatedHostsClient) GetResponder(resp *http.Response) (result DedicatedHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByHostGroup lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in +// the response to get the next page of dedicated hosts. +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup") + defer func() { + sc := -1 + if result.dhlr.Response.Response != nil { + sc = result.dhlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByHostGroupNextResults + req, err := client.ListByHostGroupPreparer(ctx, resourceGroupName, hostGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByHostGroupSender(req) + if err != nil { + result.dhlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure sending request") + return + } + + result.dhlr, err = client.ListByHostGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure responding to request") + return + } + if result.dhlr.hasNextLink() && result.dhlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByHostGroupPreparer prepares the ListByHostGroup request. +func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/hostGroups/{hostGroupName}/hosts", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByHostGroupSender sends the ListByHostGroup request. The method will close the +// http.Response Body if it receives an error. +func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always +// closes the http.Response Body. +func (client DedicatedHostsClient) ListByHostGroupResponder(resp *http.Response) (result DedicatedHostListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByHostGroupNextResults retrieves the next set of results, if any. +func (client DedicatedHostsClient) listByHostGroupNextResults(ctx context.Context, lastResults DedicatedHostListResult) (result DedicatedHostListResult, err error) { + req, err := lastResults.dedicatedHostListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByHostGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByHostGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByHostGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DedicatedHostsClient) ListByHostGroupComplete(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup") + 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.ListByHostGroup(ctx, resourceGroupName, hostGroupName) + return +} + +// Update update an dedicated host . +// Parameters: +// resourceGroupName - the name of the resource group. +// hostGroupName - the name of the dedicated host group. +// hostName - the name of the dedicated host . +// parameters - parameters supplied to the Update Dedicated Host operation. +func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (result DedicatedHostsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hostGroupName": autorest.Encode("path", hostGroupName), + "hostName": autorest.Encode("path", hostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/hostGroups/{hostGroupName}/hosts/{hostName}", 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 DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DedicatedHostsClient) UpdateResponder(resp *http.Response) (result DedicatedHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/diskaccesses.go b/services/compute/mgmt/2021-07-01/compute/diskaccesses.go new file mode 100644 index 000000000000..44a4985630d6 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/diskaccesses.go @@ -0,0 +1,1040 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DiskAccessesClient is the compute Client +type DiskAccessesClient struct { + BaseClient +} + +// NewDiskAccessesClient creates an instance of the DiskAccessesClient client. +func NewDiskAccessesClient(subscriptionID string) DiskAccessesClient { + return NewDiskAccessesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDiskAccessesClientWithBaseURI creates an instance of the DiskAccessesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDiskAccessesClientWithBaseURI(baseURI string, subscriptionID string) DiskAccessesClient { + return DiskAccessesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a disk access resource +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +// diskAccess - disk access object supplied in the body of the Put disk access operation. +func (client DiskAccessesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess) (result DiskAccessesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskAccessName, diskAccess) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DiskAccessesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}", pathParameters), + autorest.WithJSON(diskAccess), + 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 DiskAccessesClient) CreateOrUpdateSender(req *http.Request) (future DiskAccessesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) CreateOrUpdateResponder(resp *http.Response) (result DiskAccess, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a disk access resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +func (client DiskAccessesClient) Delete(ctx context.Context, resourceGroupName string, diskAccessName string) (result DiskAccessesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, diskAccessName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DiskAccessesClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}", 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 DiskAccessesClient) DeleteSender(req *http.Request) (future DiskAccessesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteAPrivateEndpointConnection deletes a private endpoint connection under a disk access resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +// privateEndpointConnectionName - the name of the private endpoint connection +func (client DiskAccessesClient) DeleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.DeleteAPrivateEndpointConnection") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeleteAPrivateEndpointConnectionPreparer(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "DeleteAPrivateEndpointConnection", nil, "Failure preparing request") + return + } + + result, err = client.DeleteAPrivateEndpointConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "DeleteAPrivateEndpointConnection", nil, "Failure sending request") + return + } + + return +} + +// DeleteAPrivateEndpointConnectionPreparer prepares the DeleteAPrivateEndpointConnection request. +func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteAPrivateEndpointConnectionSender sends the DeleteAPrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionSender(req *http.Request) (future DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteAPrivateEndpointConnectionResponder handles the response to the DeleteAPrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about a disk access resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +func (client DiskAccessesClient) Get(ctx context.Context, resourceGroupName string, diskAccessName string) (result DiskAccess, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.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, diskAccessName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DiskAccessesClient) GetPreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}", 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 DiskAccessesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) GetResponder(resp *http.Response) (result DiskAccess, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAPrivateEndpointConnection gets information about a private endpoint connection under a disk access resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +// privateEndpointConnectionName - the name of the private endpoint connection +func (client DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.GetAPrivateEndpointConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetAPrivateEndpointConnectionPreparer(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetAPrivateEndpointConnection", nil, "Failure preparing request") + return + } + + resp, err := client.GetAPrivateEndpointConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetAPrivateEndpointConnection", resp, "Failure sending request") + return + } + + result, err = client.GetAPrivateEndpointConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetAPrivateEndpointConnection", resp, "Failure responding to request") + return + } + + return +} + +// GetAPrivateEndpointConnectionPreparer prepares the GetAPrivateEndpointConnection request. +func (client DiskAccessesClient) GetAPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAPrivateEndpointConnectionSender sends the GetAPrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client DiskAccessesClient) GetAPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetAPrivateEndpointConnectionResponder handles the response to the GetAPrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) GetAPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPrivateLinkResources gets the private link resources possible under disk access resource +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +func (client DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateLinkResourceListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.GetPrivateLinkResources") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPrivateLinkResourcesPreparer(ctx, resourceGroupName, diskAccessName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", nil, "Failure preparing request") + return + } + + resp, err := client.GetPrivateLinkResourcesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", resp, "Failure sending request") + return + } + + result, err = client.GetPrivateLinkResourcesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", resp, "Failure responding to request") + return + } + + return +} + +// GetPrivateLinkResourcesPreparer prepares the GetPrivateLinkResources request. +func (client DiskAccessesClient) GetPrivateLinkResourcesPreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}/privateLinkResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPrivateLinkResourcesSender sends the GetPrivateLinkResources request. The method will close the +// http.Response Body if it receives an error. +func (client DiskAccessesClient) GetPrivateLinkResourcesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetPrivateLinkResourcesResponder handles the response to the GetPrivateLinkResources request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) GetPrivateLinkResourcesResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the disk access resources under a subscription. +func (client DiskAccessesClient) List(ctx context.Context) (result DiskAccessListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.List") + defer func() { + sc := -1 + if result.dal.Response.Response != nil { + sc = result.dal.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dal.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", resp, "Failure sending request") + return + } + + result.dal, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", resp, "Failure responding to request") + return + } + if result.dal.hasNextLink() && result.dal.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client DiskAccessesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses", 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 DiskAccessesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) ListResponder(resp *http.Response) (result DiskAccessList, err error) { + err = autorest.Respond( + resp, + 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 DiskAccessesClient) listNextResults(ctx context.Context, lastResults DiskAccessList) (result DiskAccessList, err error) { + req, err := lastResults.diskAccessListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "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, "compute.DiskAccessesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskAccessesClient) ListComplete(ctx context.Context) (result DiskAccessListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.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 lists all the disk access resources under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client DiskAccessesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskAccessListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.dal.Response.Response != nil { + sc = result.dal.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, "compute.DiskAccessesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.dal.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.dal, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dal.hasNextLink() && result.dal.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DiskAccessesClient) 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 = "2020-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.Compute/diskAccesses", 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 DiskAccessesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) ListByResourceGroupResponder(resp *http.Response) (result DiskAccessList, err error) { + err = autorest.Respond( + resp, + 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 DiskAccessesClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskAccessList) (result DiskAccessList, err error) { + req, err := lastResults.diskAccessListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "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, "compute.DiskAccessesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskAccessesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskAccessListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.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 +} + +// ListPrivateEndpointConnections list information about private endpoint connections under a disk access resource +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +func (client DiskAccessesClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListPrivateEndpointConnections") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listPrivateEndpointConnectionsNextResults + req, err := client.ListPrivateEndpointConnectionsPreparer(ctx, resourceGroupName, diskAccessName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListPrivateEndpointConnections", nil, "Failure preparing request") + return + } + + resp, err := client.ListPrivateEndpointConnectionsSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListPrivateEndpointConnections", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListPrivateEndpointConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListPrivateEndpointConnections", resp, "Failure responding to request") + return + } + if result.peclr.hasNextLink() && result.peclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPrivateEndpointConnectionsPreparer prepares the ListPrivateEndpointConnections request. +func (client DiskAccessesClient) ListPrivateEndpointConnectionsPreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPrivateEndpointConnectionsSender sends the ListPrivateEndpointConnections request. The method will close the +// http.Response Body if it receives an error. +func (client DiskAccessesClient) ListPrivateEndpointConnectionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListPrivateEndpointConnectionsResponder handles the response to the ListPrivateEndpointConnections request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) ListPrivateEndpointConnectionsResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listPrivateEndpointConnectionsNextResults retrieves the next set of results, if any. +func (client DiskAccessesClient) listPrivateEndpointConnectionsNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listPrivateEndpointConnectionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListPrivateEndpointConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListPrivateEndpointConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListPrivateEndpointConnectionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskAccessesClient) ListPrivateEndpointConnectionsComplete(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListPrivateEndpointConnections") + 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.ListPrivateEndpointConnections(ctx, resourceGroupName, diskAccessName) + return +} + +// Update updates (patches) a disk access resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +// diskAccess - disk access object supplied in the body of the Patch disk access operation. +func (client DiskAccessesClient) Update(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate) (result DiskAccessesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, diskAccessName, diskAccess) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DiskAccessesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskAccesses/{diskAccessName}", pathParameters), + autorest.WithJSON(diskAccess), + 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 DiskAccessesClient) UpdateSender(req *http.Request) (future DiskAccessesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) UpdateResponder(resp *http.Response) (result DiskAccess, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateAPrivateEndpointConnection approve or reject a private endpoint connection under disk access resource, this +// can't be used to create a new private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum +// name length is 80 characters. +// privateEndpointConnectionName - the name of the private endpoint connection +// privateEndpointConnection - private endpoint connection object supplied in the body of the Put private +// endpoint connection operation. +func (client DiskAccessesClient) UpdateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (result DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.UpdateAPrivateEndpointConnection") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: privateEndpointConnection, + Constraints: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", err.Error()) + } + + req, err := client.UpdateAPrivateEndpointConnectionPreparer(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", nil, "Failure preparing request") + return + } + + result, err = client.UpdateAPrivateEndpointConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", nil, "Failure sending request") + return + } + + return +} + +// UpdateAPrivateEndpointConnectionPreparer prepares the UpdateAPrivateEndpointConnection request. +func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskAccessName": autorest.Encode("path", diskAccessName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + privateEndpointConnection.ID = nil + privateEndpointConnection.Name = nil + privateEndpointConnection.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithJSON(privateEndpointConnection), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAPrivateEndpointConnectionSender sends the UpdateAPrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionSender(req *http.Request) (future DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateAPrivateEndpointConnectionResponder handles the response to the UpdateAPrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go b/services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go new file mode 100644 index 000000000000..2a5ea1fb4786 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go @@ -0,0 +1,716 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DiskEncryptionSetsClient is the compute Client +type DiskEncryptionSetsClient struct { + BaseClient +} + +// NewDiskEncryptionSetsClient creates an instance of the DiskEncryptionSetsClient client. +func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient { + return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient { + return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a disk encryption set +// Parameters: +// resourceGroupName - the name of the resource group. +// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// maximum name length is 80 characters. +// diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set +// operation. +func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (result DiskEncryptionSetsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: diskEncryptionSet, + Constraints: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("compute.DiskEncryptionSetsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters), + autorest.WithJSON(diskEncryptionSet), + 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 DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) CreateOrUpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a disk encryption set. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// maximum name length is 80 characters. +func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSetsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, diskEncryptionSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskEncryptionSets/{diskEncryptionSetName}", 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 DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about a disk encryption set. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// maximum name length is 80 characters. +func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.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, diskEncryptionSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskEncryptionSets/{diskEncryptionSetName}", 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 DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) GetResponder(resp *http.Response) (result DiskEncryptionSet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the disk encryption sets under a subscription. +func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEncryptionSetListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.List") + defer func() { + sc := -1 + if result.desl.Response.Response != nil { + sc = result.desl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.desl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure sending request") + return + } + + result.desl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure responding to request") + return + } + if result.desl.hasNextLink() && result.desl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", 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 DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) ListResponder(resp *http.Response) (result DiskEncryptionSetList, err error) { + err = autorest.Respond( + resp, + 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 DiskEncryptionSetsClient) listNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) { + req, err := lastResults.diskEncryptionSetListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "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, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskEncryptionSetsClient) ListComplete(ctx context.Context) (result DiskEncryptionSetListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.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 +} + +// ListAssociatedResources lists all resources that are encrypted with this disk encryption set. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// maximum name length is 80 characters. +func (client DiskEncryptionSetsClient) ListAssociatedResources(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListAssociatedResources") + defer func() { + sc := -1 + if result.rul.Response.Response != nil { + sc = result.rul.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAssociatedResourcesNextResults + req, err := client.ListAssociatedResourcesPreparer(ctx, resourceGroupName, diskEncryptionSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", nil, "Failure preparing request") + return + } + + resp, err := client.ListAssociatedResourcesSender(req) + if err != nil { + result.rul.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", resp, "Failure sending request") + return + } + + result.rul, err = client.ListAssociatedResourcesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", resp, "Failure responding to request") + return + } + if result.rul.hasNextLink() && result.rul.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAssociatedResourcesPreparer prepares the ListAssociatedResources request. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesPreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAssociatedResourcesSender sends the ListAssociatedResources request. The method will close the +// http.Response Body if it receives an error. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAssociatedResourcesResponder handles the response to the ListAssociatedResources request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesResponder(resp *http.Response) (result ResourceURIList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAssociatedResourcesNextResults retrieves the next set of results, if any. +func (client DiskEncryptionSetsClient) listAssociatedResourcesNextResults(ctx context.Context, lastResults ResourceURIList) (result ResourceURIList, err error) { + req, err := lastResults.resourceURIListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAssociatedResourcesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAssociatedResourcesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAssociatedResourcesComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesComplete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListAssociatedResources") + 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.ListAssociatedResources(ctx, resourceGroupName, diskEncryptionSetName) + return +} + +// ListByResourceGroup lists all the disk encryption sets under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.desl.Response.Response != nil { + sc = result.desl.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, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.desl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.desl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.desl.hasNextLink() && result.desl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DiskEncryptionSetsClient) 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 = "2020-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.Compute/diskEncryptionSets", 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 DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) ListByResourceGroupResponder(resp *http.Response) (result DiskEncryptionSetList, err error) { + err = autorest.Respond( + resp, + 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 DiskEncryptionSetsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) { + req, err := lastResults.diskEncryptionSetListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "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, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskEncryptionSetsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.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 (patches) a disk encryption set. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// maximum name length is 80 characters. +// diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set +// operation. +func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (result DiskEncryptionSetsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters), + autorest.WithJSON(diskEncryptionSet), + 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 DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) UpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go b/services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go new file mode 100644 index 000000000000..c8e2f541e739 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go @@ -0,0 +1,416 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DiskRestorePointClient is the compute Client +type DiskRestorePointClient struct { + BaseClient +} + +// NewDiskRestorePointClient creates an instance of the DiskRestorePointClient client. +func NewDiskRestorePointClient(subscriptionID string) DiskRestorePointClient { + return NewDiskRestorePointClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDiskRestorePointClientWithBaseURI creates an instance of the DiskRestorePointClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDiskRestorePointClientWithBaseURI(baseURI string, subscriptionID string) DiskRestorePointClient { + return DiskRestorePointClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get disk restorePoint resource +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. +// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported +// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// diskRestorePointName - the name of the disk restore point created. Supported characters for the name are +// a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +func (client DiskRestorePointClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.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, restorePointCollectionName, VMRestorePointName, diskRestorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DiskRestorePointClient) GetPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskRestorePointName": autorest.Encode("path", diskRestorePointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmRestorePointName": autorest.Encode("path", VMRestorePointName), + } + + const APIVersion = "2020-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}", 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 DiskRestorePointClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DiskRestorePointClient) GetResponder(resp *http.Response) (result DiskRestorePoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GrantAccess grants access to a diskRestorePoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. +// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported +// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// diskRestorePointName - the name of the disk restore point created. Supported characters for the name are +// a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// grantAccessData - access data object supplied in the body of the get disk access operation. +func (client DiskRestorePointClient) GrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (result DiskRestorePointGrantAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.GrantAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: grantAccessData, + Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.DiskRestorePointClient", "GrantAccess", err.Error()) + } + + req, err := client.GrantAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName, grantAccessData) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", nil, "Failure preparing request") + return + } + + result, err = client.GrantAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", nil, "Failure sending request") + return + } + + return +} + +// GrantAccessPreparer prepares the GrantAccess request. +func (client DiskRestorePointClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskRestorePointName": autorest.Encode("path", diskRestorePointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmRestorePointName": autorest.Encode("path", VMRestorePointName), + } + + const APIVersion = "2020-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess", pathParameters), + autorest.WithJSON(grantAccessData), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GrantAccessSender sends the GrantAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DiskRestorePointClient) GrantAccessSender(req *http.Request) (future DiskRestorePointGrantAccessFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GrantAccessResponder handles the response to the GrantAccess request. The method always +// closes the http.Response Body. +func (client DiskRestorePointClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByRestorePoint lists diskRestorePoints under a vmRestorePoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. +// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported +// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +func (client DiskRestorePointClient) ListByRestorePoint(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result DiskRestorePointListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.ListByRestorePoint") + defer func() { + sc := -1 + if result.drpl.Response.Response != nil { + sc = result.drpl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByRestorePointNextResults + req, err := client.ListByRestorePointPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "ListByRestorePoint", nil, "Failure preparing request") + return + } + + resp, err := client.ListByRestorePointSender(req) + if err != nil { + result.drpl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "ListByRestorePoint", resp, "Failure sending request") + return + } + + result.drpl, err = client.ListByRestorePointResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "ListByRestorePoint", resp, "Failure responding to request") + return + } + if result.drpl.hasNextLink() && result.drpl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByRestorePointPreparer prepares the ListByRestorePoint request. +func (client DiskRestorePointClient) ListByRestorePointPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmRestorePointName": autorest.Encode("path", VMRestorePointName), + } + + const APIVersion = "2020-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByRestorePointSender sends the ListByRestorePoint request. The method will close the +// http.Response Body if it receives an error. +func (client DiskRestorePointClient) ListByRestorePointSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByRestorePointResponder handles the response to the ListByRestorePoint request. The method always +// closes the http.Response Body. +func (client DiskRestorePointClient) ListByRestorePointResponder(resp *http.Response) (result DiskRestorePointList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByRestorePointNextResults retrieves the next set of results, if any. +func (client DiskRestorePointClient) listByRestorePointNextResults(ctx context.Context, lastResults DiskRestorePointList) (result DiskRestorePointList, err error) { + req, err := lastResults.diskRestorePointListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "listByRestorePointNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByRestorePointSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "listByRestorePointNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByRestorePointResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "listByRestorePointNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByRestorePointComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskRestorePointClient) ListByRestorePointComplete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result DiskRestorePointListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.ListByRestorePoint") + 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.ListByRestorePoint(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName) + return +} + +// RevokeAccess revokes access to a diskRestorePoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. +// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported +// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// diskRestorePointName - the name of the disk restore point created. Supported characters for the name are +// a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +func (client DiskRestorePointClient) RevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePointRevokeAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.RevokeAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", nil, "Failure preparing request") + return + } + + result, err = client.RevokeAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", nil, "Failure sending request") + return + } + + return +} + +// RevokeAccessPreparer prepares the RevokeAccess request. +func (client DiskRestorePointClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskRestorePointName": autorest.Encode("path", diskRestorePointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmRestorePointName": autorest.Encode("path", VMRestorePointName), + } + + const APIVersion = "2020-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevokeAccessSender sends the RevokeAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DiskRestorePointClient) RevokeAccessSender(req *http.Request) (future DiskRestorePointRevokeAccessFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RevokeAccessResponder handles the response to the RevokeAccess request. The method always +// closes the http.Response Body. +func (client DiskRestorePointClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/disks.go b/services/compute/mgmt/2021-07-01/compute/disks.go new file mode 100644 index 000000000000..438b3cc62735 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/disks.go @@ -0,0 +1,774 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DisksClient is the compute Client +type DisksClient struct { + BaseClient +} + +// NewDisksClient creates an instance of the DisksClient client. +func NewDisksClient(subscriptionID string) DisksClient { + return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDisksClientWithBaseURI creates an instance of the DisksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient { + return DisksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a disk. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is +// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// characters. +// disk - disk object supplied in the body of the Put disk operation. +func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (result DisksCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: disk, + Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.PurchasePlan", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.PurchasePlan.Publisher", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "disk.DiskProperties.PurchasePlan.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "disk.DiskProperties.PurchasePlan.Product", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "disk.DiskProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskName, disk) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + disk.ManagedBy = nil + disk.ManagedByExtended = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters), + autorest.WithJSON(disk), + 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 DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result Disk, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a disk. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is +// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// characters. +func (client DisksClient) Delete(ctx context.Context, resourceGroupName string, diskName string) (result DisksDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, diskName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/disks/{diskName}", 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 DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about a disk. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is +// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// characters. +func (client DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result Disk, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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, diskName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/disks/{diskName}", 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 DisksClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GrantAccess grants access to a disk. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is +// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// characters. +// grantAccessData - access data object supplied in the body of the get disk access operation. +func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (result DisksGrantAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.GrantAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: grantAccessData, + Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.DisksClient", "GrantAccess", err.Error()) + } + + req, err := client.GrantAccessPreparer(ctx, resourceGroupName, diskName, grantAccessData) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure preparing request") + return + } + + result, err = client.GrantAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure sending request") + return + } + + return +} + +// GrantAccessPreparer prepares the GrantAccess request. +func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/disks/{diskName}/beginGetAccess", pathParameters), + autorest.WithJSON(grantAccessData), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GrantAccessSender sends the GrantAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GrantAccessResponder handles the response to the GrantAccess request. The method always +// closes the http.Response Body. +func (client DisksClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the disks under a subscription. +func (client DisksClient) List(ctx context.Context) (result DiskListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.List") + defer func() { + sc := -1 + if result.dl.Response.Response != nil { + sc = result.dl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure sending request") + return + } + + result.dl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to request") + return + } + if result.dl.hasNextLink() && result.dl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", 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 DisksClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DisksClient) ListResponder(resp *http.Response) (result DiskList, err error) { + err = autorest.Respond( + resp, + 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 DisksClient) listNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) { + req, err := lastResults.diskListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DisksClient", "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, "compute.DisksClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DisksClient) ListComplete(ctx context.Context) (result DiskListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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 lists all the disks under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.dl.Response.Response != nil { + sc = result.dl.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, "compute.DisksClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.dl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.dl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dl.hasNextLink() && result.dl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DisksClient) 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 = "2020-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.Compute/disks", 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 DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DisksClient) ListByResourceGroupResponder(resp *http.Response) (result DiskList, err error) { + err = autorest.Respond( + resp, + 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 DisksClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) { + req, err := lastResults.diskListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DisksClient", "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, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DisksClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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 +} + +// RevokeAccess revokes access to a disk. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is +// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// characters. +func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName string, diskName string) (result DisksRevokeAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.RevokeAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, diskName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure preparing request") + return + } + + result, err = client.RevokeAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure sending request") + return + } + + return +} + +// RevokeAccessPreparer prepares the RevokeAccess request. +func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/disks/{diskName}/endGetAccess", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevokeAccessSender sends the RevokeAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RevokeAccessResponder handles the response to the RevokeAccess request. The method always +// closes the http.Response Body. +func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates (patches) a disk. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is +// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// characters. +// disk - disk object supplied in the body of the Patch disk operation. +func (client DisksClient) Update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (result DisksUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, diskName, disk) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/disks/{diskName}", pathParameters), + autorest.WithJSON(disk), + 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 DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DisksClient) UpdateResponder(resp *http.Response) (result Disk, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/enums.go b/services/compute/mgmt/2021-07-01/compute/enums.go new file mode 100644 index 000000000000..14c504670c71 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/enums.go @@ -0,0 +1,2015 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AccessLevel enumerates the values for access level. +type AccessLevel string + +const ( + // AccessLevelNone ... + AccessLevelNone AccessLevel = "None" + // AccessLevelRead ... + AccessLevelRead AccessLevel = "Read" + // AccessLevelWrite ... + AccessLevelWrite AccessLevel = "Write" +) + +// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type. +func PossibleAccessLevelValues() []AccessLevel { + return []AccessLevel{AccessLevelNone, AccessLevelRead, AccessLevelWrite} +} + +// AggregatedReplicationState enumerates the values for aggregated replication state. +type AggregatedReplicationState string + +const ( + // AggregatedReplicationStateCompleted ... + AggregatedReplicationStateCompleted AggregatedReplicationState = "Completed" + // AggregatedReplicationStateFailed ... + AggregatedReplicationStateFailed AggregatedReplicationState = "Failed" + // AggregatedReplicationStateInProgress ... + AggregatedReplicationStateInProgress AggregatedReplicationState = "InProgress" + // AggregatedReplicationStateUnknown ... + AggregatedReplicationStateUnknown AggregatedReplicationState = "Unknown" +) + +// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type. +func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState { + return []AggregatedReplicationState{AggregatedReplicationStateCompleted, AggregatedReplicationStateFailed, AggregatedReplicationStateInProgress, AggregatedReplicationStateUnknown} +} + +// AvailabilitySetSkuTypes enumerates the values for availability set sku types. +type AvailabilitySetSkuTypes string + +const ( + // AvailabilitySetSkuTypesAligned ... + AvailabilitySetSkuTypesAligned AvailabilitySetSkuTypes = "Aligned" + // AvailabilitySetSkuTypesClassic ... + AvailabilitySetSkuTypesClassic AvailabilitySetSkuTypes = "Classic" +) + +// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type. +func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes { + return []AvailabilitySetSkuTypes{AvailabilitySetSkuTypesAligned, AvailabilitySetSkuTypesClassic} +} + +// CachingTypes enumerates the values for caching types. +type CachingTypes string + +const ( + // CachingTypesNone ... + CachingTypesNone CachingTypes = "None" + // CachingTypesReadOnly ... + CachingTypesReadOnly CachingTypes = "ReadOnly" + // CachingTypesReadWrite ... + CachingTypesReadWrite CachingTypes = "ReadWrite" +) + +// PossibleCachingTypesValues returns an array of possible values for the CachingTypes const type. +func PossibleCachingTypesValues() []CachingTypes { + return []CachingTypes{CachingTypesNone, CachingTypesReadOnly, CachingTypesReadWrite} +} + +// CapacityReservationGroupInstanceViewTypes enumerates the values for capacity reservation group instance view +// types. +type CapacityReservationGroupInstanceViewTypes string + +const ( + // CapacityReservationGroupInstanceViewTypesInstanceView ... + CapacityReservationGroupInstanceViewTypesInstanceView CapacityReservationGroupInstanceViewTypes = "instanceView" +) + +// PossibleCapacityReservationGroupInstanceViewTypesValues returns an array of possible values for the CapacityReservationGroupInstanceViewTypes const type. +func PossibleCapacityReservationGroupInstanceViewTypesValues() []CapacityReservationGroupInstanceViewTypes { + return []CapacityReservationGroupInstanceViewTypes{CapacityReservationGroupInstanceViewTypesInstanceView} +} + +// CapacityReservationInstanceViewTypes enumerates the values for capacity reservation instance view types. +type CapacityReservationInstanceViewTypes string + +const ( + // CapacityReservationInstanceViewTypesInstanceView ... + CapacityReservationInstanceViewTypesInstanceView CapacityReservationInstanceViewTypes = "instanceView" +) + +// PossibleCapacityReservationInstanceViewTypesValues returns an array of possible values for the CapacityReservationInstanceViewTypes const type. +func PossibleCapacityReservationInstanceViewTypesValues() []CapacityReservationInstanceViewTypes { + return []CapacityReservationInstanceViewTypes{CapacityReservationInstanceViewTypesInstanceView} +} + +// CloudServiceUpgradeMode enumerates the values for cloud service upgrade mode. +type CloudServiceUpgradeMode string + +const ( + // CloudServiceUpgradeModeAuto ... + CloudServiceUpgradeModeAuto CloudServiceUpgradeMode = "Auto" + // CloudServiceUpgradeModeManual ... + CloudServiceUpgradeModeManual CloudServiceUpgradeMode = "Manual" + // CloudServiceUpgradeModeSimultaneous ... + CloudServiceUpgradeModeSimultaneous CloudServiceUpgradeMode = "Simultaneous" +) + +// PossibleCloudServiceUpgradeModeValues returns an array of possible values for the CloudServiceUpgradeMode const type. +func PossibleCloudServiceUpgradeModeValues() []CloudServiceUpgradeMode { + return []CloudServiceUpgradeMode{CloudServiceUpgradeModeAuto, CloudServiceUpgradeModeManual, CloudServiceUpgradeModeSimultaneous} +} + +// ComponentNames enumerates the values for component names. +type ComponentNames string + +const ( + // ComponentNamesMicrosoftWindowsShellSetup ... + ComponentNamesMicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup" +) + +// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type. +func PossibleComponentNamesValues() []ComponentNames { + return []ComponentNames{ComponentNamesMicrosoftWindowsShellSetup} +} + +// ConsistencyModeTypes enumerates the values for consistency mode types. +type ConsistencyModeTypes string + +const ( + // ConsistencyModeTypesApplicationConsistent ... + ConsistencyModeTypesApplicationConsistent ConsistencyModeTypes = "ApplicationConsistent" + // ConsistencyModeTypesCrashConsistent ... + ConsistencyModeTypesCrashConsistent ConsistencyModeTypes = "CrashConsistent" + // ConsistencyModeTypesFileSystemConsistent ... + ConsistencyModeTypesFileSystemConsistent ConsistencyModeTypes = "FileSystemConsistent" +) + +// PossibleConsistencyModeTypesValues returns an array of possible values for the ConsistencyModeTypes const type. +func PossibleConsistencyModeTypesValues() []ConsistencyModeTypes { + return []ConsistencyModeTypes{ConsistencyModeTypesApplicationConsistent, ConsistencyModeTypesCrashConsistent, ConsistencyModeTypesFileSystemConsistent} +} + +// DedicatedHostLicenseTypes enumerates the values for dedicated host license types. +type DedicatedHostLicenseTypes string + +const ( + // DedicatedHostLicenseTypesNone ... + DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None" + // DedicatedHostLicenseTypesWindowsServerHybrid ... + DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid" + // DedicatedHostLicenseTypesWindowsServerPerpetual ... + DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual" +) + +// PossibleDedicatedHostLicenseTypesValues returns an array of possible values for the DedicatedHostLicenseTypes const type. +func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes { + return []DedicatedHostLicenseTypes{DedicatedHostLicenseTypesNone, DedicatedHostLicenseTypesWindowsServerHybrid, DedicatedHostLicenseTypesWindowsServerPerpetual} +} + +// DeleteOptions enumerates the values for delete options. +type DeleteOptions string + +const ( + // DeleteOptionsDelete ... + DeleteOptionsDelete DeleteOptions = "Delete" + // DeleteOptionsDetach ... + DeleteOptionsDetach DeleteOptions = "Detach" +) + +// PossibleDeleteOptionsValues returns an array of possible values for the DeleteOptions const type. +func PossibleDeleteOptionsValues() []DeleteOptions { + return []DeleteOptions{DeleteOptionsDelete, DeleteOptionsDetach} +} + +// DiffDiskOptions enumerates the values for diff disk options. +type DiffDiskOptions string + +const ( + // DiffDiskOptionsLocal ... + DiffDiskOptionsLocal DiffDiskOptions = "Local" +) + +// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type. +func PossibleDiffDiskOptionsValues() []DiffDiskOptions { + return []DiffDiskOptions{DiffDiskOptionsLocal} +} + +// DiffDiskPlacement enumerates the values for diff disk placement. +type DiffDiskPlacement string + +const ( + // DiffDiskPlacementCacheDisk ... + DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk" + // DiffDiskPlacementResourceDisk ... + DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk" +) + +// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type. +func PossibleDiffDiskPlacementValues() []DiffDiskPlacement { + return []DiffDiskPlacement{DiffDiskPlacementCacheDisk, DiffDiskPlacementResourceDisk} +} + +// DiskCreateOption enumerates the values for disk create option. +type DiskCreateOption string + +const ( + // DiskCreateOptionAttach Disk will be attached to a VM. + DiskCreateOptionAttach DiskCreateOption = "Attach" + // DiskCreateOptionCopy Create a new disk or snapshot by copying from a disk or snapshot specified by the + // given sourceResourceId. + DiskCreateOptionCopy DiskCreateOption = "Copy" + // DiskCreateOptionEmpty Create an empty data disk of a size given by diskSizeGB. + DiskCreateOptionEmpty DiskCreateOption = "Empty" + // DiskCreateOptionFromImage Create a new disk from a platform image specified by the given imageReference + // or galleryImageReference. + DiskCreateOptionFromImage DiskCreateOption = "FromImage" + // DiskCreateOptionImport Create a disk by importing from a blob specified by a sourceUri in a storage + // account specified by storageAccountId. + DiskCreateOptionImport DiskCreateOption = "Import" + // DiskCreateOptionRestore Create a new disk by copying from a backup recovery point. + DiskCreateOptionRestore DiskCreateOption = "Restore" + // DiskCreateOptionUpload Create a new disk by obtaining a write token and using it to directly upload the + // contents of the disk. + DiskCreateOptionUpload DiskCreateOption = "Upload" +) + +// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type. +func PossibleDiskCreateOptionValues() []DiskCreateOption { + return []DiskCreateOption{DiskCreateOptionAttach, DiskCreateOptionCopy, DiskCreateOptionEmpty, DiskCreateOptionFromImage, DiskCreateOptionImport, DiskCreateOptionRestore, DiskCreateOptionUpload} +} + +// DiskCreateOptionTypes enumerates the values for disk create option types. +type DiskCreateOptionTypes string + +const ( + // DiskCreateOptionTypesAttach ... + DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" + // DiskCreateOptionTypesEmpty ... + DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" + // DiskCreateOptionTypesFromImage ... + DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" +) + +// PossibleDiskCreateOptionTypesValues returns an array of possible values for the DiskCreateOptionTypes const type. +func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes { + return []DiskCreateOptionTypes{DiskCreateOptionTypesAttach, DiskCreateOptionTypesEmpty, DiskCreateOptionTypesFromImage} +} + +// DiskDeleteOptionTypes enumerates the values for disk delete option types. +type DiskDeleteOptionTypes string + +const ( + // DiskDeleteOptionTypesDelete ... + DiskDeleteOptionTypesDelete DiskDeleteOptionTypes = "Delete" + // DiskDeleteOptionTypesDetach ... + DiskDeleteOptionTypesDetach DiskDeleteOptionTypes = "Detach" +) + +// PossibleDiskDeleteOptionTypesValues returns an array of possible values for the DiskDeleteOptionTypes const type. +func PossibleDiskDeleteOptionTypesValues() []DiskDeleteOptionTypes { + return []DiskDeleteOptionTypes{DiskDeleteOptionTypesDelete, DiskDeleteOptionTypesDetach} +} + +// DiskDetachOptionTypes enumerates the values for disk detach option types. +type DiskDetachOptionTypes string + +const ( + // DiskDetachOptionTypesForceDetach ... + DiskDetachOptionTypesForceDetach DiskDetachOptionTypes = "ForceDetach" +) + +// PossibleDiskDetachOptionTypesValues returns an array of possible values for the DiskDetachOptionTypes const type. +func PossibleDiskDetachOptionTypesValues() []DiskDetachOptionTypes { + return []DiskDetachOptionTypes{DiskDetachOptionTypesForceDetach} +} + +// DiskEncryptionSetIdentityType enumerates the values for disk encryption set identity type. +type DiskEncryptionSetIdentityType string + +const ( + // DiskEncryptionSetIdentityTypeNone ... + DiskEncryptionSetIdentityTypeNone DiskEncryptionSetIdentityType = "None" + // DiskEncryptionSetIdentityTypeSystemAssigned ... + DiskEncryptionSetIdentityTypeSystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned" +) + +// PossibleDiskEncryptionSetIdentityTypeValues returns an array of possible values for the DiskEncryptionSetIdentityType const type. +func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType { + return []DiskEncryptionSetIdentityType{DiskEncryptionSetIdentityTypeNone, DiskEncryptionSetIdentityTypeSystemAssigned} +} + +// DiskEncryptionSetType enumerates the values for disk encryption set type. +type DiskEncryptionSetType string + +const ( + // DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey Resource using diskEncryptionSet would be encrypted + // at rest with Customer managed key that can be changed and revoked by a customer. + DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey" + // DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys Resource using diskEncryptionSet would + // be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other + // key is Platform managed. + DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys" +) + +// PossibleDiskEncryptionSetTypeValues returns an array of possible values for the DiskEncryptionSetType const type. +func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType { + return []DiskEncryptionSetType{DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey, DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys} +} + +// DiskSecurityTypes enumerates the values for disk security types. +type DiskSecurityTypes string + +const ( + // DiskSecurityTypesTrustedLaunch Trusted Launch provides security features such as secure boot and virtual + // Trusted Platform Module (vTPM) + DiskSecurityTypesTrustedLaunch DiskSecurityTypes = "TrustedLaunch" +) + +// PossibleDiskSecurityTypesValues returns an array of possible values for the DiskSecurityTypes const type. +func PossibleDiskSecurityTypesValues() []DiskSecurityTypes { + return []DiskSecurityTypes{DiskSecurityTypesTrustedLaunch} +} + +// DiskState enumerates the values for disk state. +type DiskState string + +const ( + // DiskStateActiveSAS The disk currently has an Active SAS Uri associated with it. + DiskStateActiveSAS DiskState = "ActiveSAS" + // DiskStateActiveUpload A disk is created for upload and a write token has been issued for uploading to + // it. + DiskStateActiveUpload DiskState = "ActiveUpload" + // DiskStateAttached The disk is currently mounted to a running VM. + DiskStateAttached DiskState = "Attached" + // DiskStateReadyToUpload A disk is ready to be created by upload by requesting a write token. + DiskStateReadyToUpload DiskState = "ReadyToUpload" + // DiskStateReserved The disk is mounted to a stopped-deallocated VM + DiskStateReserved DiskState = "Reserved" + // DiskStateUnattached The disk is not being used and can be attached to a VM. + DiskStateUnattached DiskState = "Unattached" +) + +// PossibleDiskStateValues returns an array of possible values for the DiskState const type. +func PossibleDiskStateValues() []DiskState { + return []DiskState{DiskStateActiveSAS, DiskStateActiveUpload, DiskStateAttached, DiskStateReadyToUpload, DiskStateReserved, DiskStateUnattached} +} + +// DiskStorageAccountTypes enumerates the values for disk storage account types. +type DiskStorageAccountTypes string + +const ( + // DiskStorageAccountTypesPremiumLRS Premium SSD locally redundant storage. Best for production and + // performance sensitive workloads. + DiskStorageAccountTypesPremiumLRS DiskStorageAccountTypes = "Premium_LRS" + // DiskStorageAccountTypesPremiumZRS Premium SSD zone redundant storage. Best for the production workloads + // that need storage resiliency against zone failures. + DiskStorageAccountTypesPremiumZRS DiskStorageAccountTypes = "Premium_ZRS" + // DiskStorageAccountTypesStandardLRS Standard HDD locally redundant storage. Best for backup, + // non-critical, and infrequent access. + DiskStorageAccountTypesStandardLRS DiskStorageAccountTypes = "Standard_LRS" + // DiskStorageAccountTypesStandardSSDLRS Standard SSD locally redundant storage. Best for web servers, + // lightly used enterprise applications and dev/test. + DiskStorageAccountTypesStandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS" + // DiskStorageAccountTypesStandardSSDZRS Standard SSD zone redundant storage. Best for web servers, lightly + // used enterprise applications and dev/test that need storage resiliency against zone failures. + DiskStorageAccountTypesStandardSSDZRS DiskStorageAccountTypes = "StandardSSD_ZRS" + // DiskStorageAccountTypesUltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads + // such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. + DiskStorageAccountTypesUltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS" +) + +// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type. +func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes { + return []DiskStorageAccountTypes{DiskStorageAccountTypesPremiumLRS, DiskStorageAccountTypesPremiumZRS, DiskStorageAccountTypesStandardLRS, DiskStorageAccountTypesStandardSSDLRS, DiskStorageAccountTypesStandardSSDZRS, DiskStorageAccountTypesUltraSSDLRS} +} + +// EncryptionType enumerates the values for encryption type. +type EncryptionType string + +const ( + // EncryptionTypeEncryptionAtRestWithCustomerKey Disk is encrypted at rest with Customer managed key that + // can be changed and revoked by a customer. + EncryptionTypeEncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey" + // EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys Disk is encrypted at rest with 2 layers of + // encryption. One of the keys is Customer managed and the other key is Platform managed. + EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys EncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys" + // EncryptionTypeEncryptionAtRestWithPlatformKey Disk is encrypted at rest with Platform managed key. It is + // the default encryption type. This is not a valid encryption type for disk encryption sets. + EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey" +) + +// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type. +func PossibleEncryptionTypeValues() []EncryptionType { + return []EncryptionType{EncryptionTypeEncryptionAtRestWithCustomerKey, EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys, EncryptionTypeEncryptionAtRestWithPlatformKey} +} + +// ExecutionState enumerates the values for execution state. +type ExecutionState string + +const ( + // ExecutionStateCanceled ... + ExecutionStateCanceled ExecutionState = "Canceled" + // ExecutionStateFailed ... + ExecutionStateFailed ExecutionState = "Failed" + // ExecutionStatePending ... + ExecutionStatePending ExecutionState = "Pending" + // ExecutionStateRunning ... + ExecutionStateRunning ExecutionState = "Running" + // ExecutionStateSucceeded ... + ExecutionStateSucceeded ExecutionState = "Succeeded" + // ExecutionStateTimedOut ... + ExecutionStateTimedOut ExecutionState = "TimedOut" + // ExecutionStateUnknown ... + ExecutionStateUnknown ExecutionState = "Unknown" +) + +// PossibleExecutionStateValues returns an array of possible values for the ExecutionState const type. +func PossibleExecutionStateValues() []ExecutionState { + return []ExecutionState{ExecutionStateCanceled, ExecutionStateFailed, ExecutionStatePending, ExecutionStateRunning, ExecutionStateSucceeded, ExecutionStateTimedOut, ExecutionStateUnknown} +} + +// ExpandTypesForGetCapacityReservationGroups enumerates the values for expand types for get capacity +// reservation groups. +type ExpandTypesForGetCapacityReservationGroups string + +const ( + // ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref ... + ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref ExpandTypesForGetCapacityReservationGroups = "virtualMachineScaleSetVMs/$ref" + // ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref ... + ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref ExpandTypesForGetCapacityReservationGroups = "virtualMachines/$ref" +) + +// PossibleExpandTypesForGetCapacityReservationGroupsValues returns an array of possible values for the ExpandTypesForGetCapacityReservationGroups const type. +func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesForGetCapacityReservationGroups { + return []ExpandTypesForGetCapacityReservationGroups{ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref, ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref} +} + +// ExpandTypesForGetVMScaleSets enumerates the values for expand types for get vm scale sets. +type ExpandTypesForGetVMScaleSets string + +const ( + // ExpandTypesForGetVMScaleSetsUserData ... + ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = "userData" +) + +// PossibleExpandTypesForGetVMScaleSetsValues returns an array of possible values for the ExpandTypesForGetVMScaleSets const type. +func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets { + return []ExpandTypesForGetVMScaleSets{ExpandTypesForGetVMScaleSetsUserData} +} + +// ExtendedLocationType enumerates the values for extended location type. +type ExtendedLocationType string + +const ( + // ExtendedLocationTypeEdgeZone ... + ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone" +) + +// PossibleExtendedLocationTypeValues returns an array of possible values for the ExtendedLocationType const type. +func PossibleExtendedLocationTypeValues() []ExtendedLocationType { + return []ExtendedLocationType{ExtendedLocationTypeEdgeZone} +} + +// ExtendedLocationTypes enumerates the values for extended location types. +type ExtendedLocationTypes string + +const ( + // ExtendedLocationTypesEdgeZone ... + ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone" +) + +// PossibleExtendedLocationTypesValues returns an array of possible values for the ExtendedLocationTypes const type. +func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { + return []ExtendedLocationTypes{ExtendedLocationTypesEdgeZone} +} + +// GallerySharingPermissionTypes enumerates the values for gallery sharing permission types. +type GallerySharingPermissionTypes string + +const ( + // GallerySharingPermissionTypesGroups ... + GallerySharingPermissionTypesGroups GallerySharingPermissionTypes = "Groups" + // GallerySharingPermissionTypesPrivate ... + GallerySharingPermissionTypesPrivate GallerySharingPermissionTypes = "Private" +) + +// PossibleGallerySharingPermissionTypesValues returns an array of possible values for the GallerySharingPermissionTypes const type. +func PossibleGallerySharingPermissionTypesValues() []GallerySharingPermissionTypes { + return []GallerySharingPermissionTypes{GallerySharingPermissionTypesGroups, GallerySharingPermissionTypesPrivate} +} + +// HostCaching enumerates the values for host caching. +type HostCaching string + +const ( + // HostCachingNone ... + HostCachingNone HostCaching = "None" + // HostCachingReadOnly ... + HostCachingReadOnly HostCaching = "ReadOnly" + // HostCachingReadWrite ... + HostCachingReadWrite HostCaching = "ReadWrite" +) + +// PossibleHostCachingValues returns an array of possible values for the HostCaching const type. +func PossibleHostCachingValues() []HostCaching { + return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite} +} + +// HyperVGeneration enumerates the values for hyper v generation. +type HyperVGeneration string + +const ( + // HyperVGenerationV1 ... + HyperVGenerationV1 HyperVGeneration = "V1" + // HyperVGenerationV2 ... + HyperVGenerationV2 HyperVGeneration = "V2" +) + +// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type. +func PossibleHyperVGenerationValues() []HyperVGeneration { + return []HyperVGeneration{HyperVGenerationV1, HyperVGenerationV2} +} + +// HyperVGenerationType enumerates the values for hyper v generation type. +type HyperVGenerationType string + +const ( + // HyperVGenerationTypeV1 ... + HyperVGenerationTypeV1 HyperVGenerationType = "V1" + // HyperVGenerationTypeV2 ... + HyperVGenerationTypeV2 HyperVGenerationType = "V2" +) + +// PossibleHyperVGenerationTypeValues returns an array of possible values for the HyperVGenerationType const type. +func PossibleHyperVGenerationTypeValues() []HyperVGenerationType { + return []HyperVGenerationType{HyperVGenerationTypeV1, HyperVGenerationTypeV2} +} + +// HyperVGenerationTypes enumerates the values for hyper v generation types. +type HyperVGenerationTypes string + +const ( + // HyperVGenerationTypesV1 ... + HyperVGenerationTypesV1 HyperVGenerationTypes = "V1" + // HyperVGenerationTypesV2 ... + HyperVGenerationTypesV2 HyperVGenerationTypes = "V2" +) + +// PossibleHyperVGenerationTypesValues returns an array of possible values for the HyperVGenerationTypes const type. +func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes { + return []HyperVGenerationTypes{HyperVGenerationTypesV1, HyperVGenerationTypesV2} +} + +// InstanceViewTypes enumerates the values for instance view types. +type InstanceViewTypes string + +const ( + // InstanceViewTypesInstanceView ... + InstanceViewTypesInstanceView InstanceViewTypes = "instanceView" + // InstanceViewTypesUserData ... + InstanceViewTypesUserData InstanceViewTypes = "userData" +) + +// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type. +func PossibleInstanceViewTypesValues() []InstanceViewTypes { + return []InstanceViewTypes{InstanceViewTypesInstanceView, InstanceViewTypesUserData} +} + +// IntervalInMins enumerates the values for interval in mins. +type IntervalInMins string + +const ( + // IntervalInMinsFiveMins ... + IntervalInMinsFiveMins IntervalInMins = "FiveMins" + // IntervalInMinsSixtyMins ... + IntervalInMinsSixtyMins IntervalInMins = "SixtyMins" + // IntervalInMinsThirtyMins ... + IntervalInMinsThirtyMins IntervalInMins = "ThirtyMins" + // IntervalInMinsThreeMins ... + IntervalInMinsThreeMins IntervalInMins = "ThreeMins" +) + +// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type. +func PossibleIntervalInMinsValues() []IntervalInMins { + return []IntervalInMins{IntervalInMinsFiveMins, IntervalInMinsSixtyMins, IntervalInMinsThirtyMins, IntervalInMinsThreeMins} +} + +// IPVersion enumerates the values for ip version. +type IPVersion string + +const ( + // IPVersionIPv4 ... + IPVersionIPv4 IPVersion = "IPv4" + // IPVersionIPv6 ... + IPVersionIPv6 IPVersion = "IPv6" +) + +// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. +func PossibleIPVersionValues() []IPVersion { + return []IPVersion{IPVersionIPv4, IPVersionIPv6} +} + +// IPVersions enumerates the values for ip versions. +type IPVersions string + +const ( + // IPVersionsIPv4 ... + IPVersionsIPv4 IPVersions = "IPv4" + // IPVersionsIPv6 ... + IPVersionsIPv6 IPVersions = "IPv6" +) + +// PossibleIPVersionsValues returns an array of possible values for the IPVersions const type. +func PossibleIPVersionsValues() []IPVersions { + return []IPVersions{IPVersionsIPv4, IPVersionsIPv6} +} + +// LinuxPatchAssessmentMode enumerates the values for linux patch assessment mode. +type LinuxPatchAssessmentMode string + +const ( + // LinuxPatchAssessmentModeAutomaticByPlatform ... + LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform" + // LinuxPatchAssessmentModeImageDefault ... + LinuxPatchAssessmentModeImageDefault LinuxPatchAssessmentMode = "ImageDefault" +) + +// PossibleLinuxPatchAssessmentModeValues returns an array of possible values for the LinuxPatchAssessmentMode const type. +func PossibleLinuxPatchAssessmentModeValues() []LinuxPatchAssessmentMode { + return []LinuxPatchAssessmentMode{LinuxPatchAssessmentModeAutomaticByPlatform, LinuxPatchAssessmentModeImageDefault} +} + +// LinuxVMGuestPatchMode enumerates the values for linux vm guest patch mode. +type LinuxVMGuestPatchMode string + +const ( + // LinuxVMGuestPatchModeAutomaticByPlatform ... + LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform" + // LinuxVMGuestPatchModeImageDefault ... + LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault" +) + +// PossibleLinuxVMGuestPatchModeValues returns an array of possible values for the LinuxVMGuestPatchMode const type. +func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode { + return []LinuxVMGuestPatchMode{LinuxVMGuestPatchModeAutomaticByPlatform, LinuxVMGuestPatchModeImageDefault} +} + +// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types. +type MaintenanceOperationResultCodeTypes string + +const ( + // MaintenanceOperationResultCodeTypesMaintenanceAborted ... + MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted" + // MaintenanceOperationResultCodeTypesMaintenanceCompleted ... + MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted" + // MaintenanceOperationResultCodeTypesNone ... + MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None" + // MaintenanceOperationResultCodeTypesRetryLater ... + MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater" +) + +// PossibleMaintenanceOperationResultCodeTypesValues returns an array of possible values for the MaintenanceOperationResultCodeTypes const type. +func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes { + return []MaintenanceOperationResultCodeTypes{MaintenanceOperationResultCodeTypesMaintenanceAborted, MaintenanceOperationResultCodeTypesMaintenanceCompleted, MaintenanceOperationResultCodeTypesNone, MaintenanceOperationResultCodeTypesRetryLater} +} + +// NetworkAccessPolicy enumerates the values for network access policy. +type NetworkAccessPolicy string + +const ( + // NetworkAccessPolicyAllowAll The disk can be exported or uploaded to from any network. + NetworkAccessPolicyAllowAll NetworkAccessPolicy = "AllowAll" + // NetworkAccessPolicyAllowPrivate The disk can be exported or uploaded to using a DiskAccess resource's + // private endpoints. + NetworkAccessPolicyAllowPrivate NetworkAccessPolicy = "AllowPrivate" + // NetworkAccessPolicyDenyAll The disk cannot be exported. + NetworkAccessPolicyDenyAll NetworkAccessPolicy = "DenyAll" +) + +// PossibleNetworkAccessPolicyValues returns an array of possible values for the NetworkAccessPolicy const type. +func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy { + return []NetworkAccessPolicy{NetworkAccessPolicyAllowAll, NetworkAccessPolicyAllowPrivate, NetworkAccessPolicyDenyAll} +} + +// NetworkAPIVersion enumerates the values for network api version. +type NetworkAPIVersion string + +const ( + // NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne ... + NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne NetworkAPIVersion = "2020-11-01" +) + +// PossibleNetworkAPIVersionValues returns an array of possible values for the NetworkAPIVersion const type. +func PossibleNetworkAPIVersionValues() []NetworkAPIVersion { + return []NetworkAPIVersion{NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne} +} + +// OperatingSystemStateTypes enumerates the values for operating system state types. +type OperatingSystemStateTypes string + +const ( + // OperatingSystemStateTypesGeneralized Generalized image. Needs to be provisioned during deployment time. + OperatingSystemStateTypesGeneralized OperatingSystemStateTypes = "Generalized" + // OperatingSystemStateTypesSpecialized Specialized image. Contains already provisioned OS Disk. + OperatingSystemStateTypesSpecialized OperatingSystemStateTypes = "Specialized" +) + +// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type. +func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes { + return []OperatingSystemStateTypes{OperatingSystemStateTypesGeneralized, OperatingSystemStateTypesSpecialized} +} + +// OperatingSystemType enumerates the values for operating system type. +type OperatingSystemType string + +const ( + // OperatingSystemTypeLinux ... + OperatingSystemTypeLinux OperatingSystemType = "Linux" + // OperatingSystemTypeWindows ... + OperatingSystemTypeWindows OperatingSystemType = "Windows" +) + +// PossibleOperatingSystemTypeValues returns an array of possible values for the OperatingSystemType const type. +func PossibleOperatingSystemTypeValues() []OperatingSystemType { + return []OperatingSystemType{OperatingSystemTypeLinux, OperatingSystemTypeWindows} +} + +// OperatingSystemTypes enumerates the values for operating system types. +type OperatingSystemTypes string + +const ( + // OperatingSystemTypesLinux ... + OperatingSystemTypesLinux OperatingSystemTypes = "Linux" + // OperatingSystemTypesWindows ... + OperatingSystemTypesWindows OperatingSystemTypes = "Windows" +) + +// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type. +func PossibleOperatingSystemTypesValues() []OperatingSystemTypes { + return []OperatingSystemTypes{OperatingSystemTypesLinux, OperatingSystemTypesWindows} +} + +// OrchestrationMode enumerates the values for orchestration mode. +type OrchestrationMode string + +const ( + // OrchestrationModeFlexible ... + OrchestrationModeFlexible OrchestrationMode = "Flexible" + // OrchestrationModeUniform ... + OrchestrationModeUniform OrchestrationMode = "Uniform" +) + +// PossibleOrchestrationModeValues returns an array of possible values for the OrchestrationMode const type. +func PossibleOrchestrationModeValues() []OrchestrationMode { + return []OrchestrationMode{OrchestrationModeFlexible, OrchestrationModeUniform} +} + +// OrchestrationServiceNames enumerates the values for orchestration service names. +type OrchestrationServiceNames string + +const ( + // OrchestrationServiceNamesAutomaticRepairs ... + OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" +) + +// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type. +func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames { + return []OrchestrationServiceNames{OrchestrationServiceNamesAutomaticRepairs} +} + +// OrchestrationServiceState enumerates the values for orchestration service state. +type OrchestrationServiceState string + +const ( + // OrchestrationServiceStateNotRunning ... + OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning" + // OrchestrationServiceStateRunning ... + OrchestrationServiceStateRunning OrchestrationServiceState = "Running" + // OrchestrationServiceStateSuspended ... + OrchestrationServiceStateSuspended OrchestrationServiceState = "Suspended" +) + +// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type. +func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState { + return []OrchestrationServiceState{OrchestrationServiceStateNotRunning, OrchestrationServiceStateRunning, OrchestrationServiceStateSuspended} +} + +// OrchestrationServiceStateAction enumerates the values for orchestration service state action. +type OrchestrationServiceStateAction string + +const ( + // OrchestrationServiceStateActionResume ... + OrchestrationServiceStateActionResume OrchestrationServiceStateAction = "Resume" + // OrchestrationServiceStateActionSuspend ... + OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend" +) + +// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type. +func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction { + return []OrchestrationServiceStateAction{OrchestrationServiceStateActionResume, OrchestrationServiceStateActionSuspend} +} + +// PassNames enumerates the values for pass names. +type PassNames string + +const ( + // PassNamesOobeSystem ... + PassNamesOobeSystem PassNames = "OobeSystem" +) + +// PossiblePassNamesValues returns an array of possible values for the PassNames const type. +func PossiblePassNamesValues() []PassNames { + return []PassNames{PassNamesOobeSystem} +} + +// PatchAssessmentState enumerates the values for patch assessment state. +type PatchAssessmentState string + +const ( + // PatchAssessmentStateAvailable ... + PatchAssessmentStateAvailable PatchAssessmentState = "Available" + // PatchAssessmentStateUnknown ... + PatchAssessmentStateUnknown PatchAssessmentState = "Unknown" +) + +// PossiblePatchAssessmentStateValues returns an array of possible values for the PatchAssessmentState const type. +func PossiblePatchAssessmentStateValues() []PatchAssessmentState { + return []PatchAssessmentState{PatchAssessmentStateAvailable, PatchAssessmentStateUnknown} +} + +// PatchInstallationState enumerates the values for patch installation state. +type PatchInstallationState string + +const ( + // PatchInstallationStateExcluded ... + PatchInstallationStateExcluded PatchInstallationState = "Excluded" + // PatchInstallationStateFailed ... + PatchInstallationStateFailed PatchInstallationState = "Failed" + // PatchInstallationStateInstalled ... + PatchInstallationStateInstalled PatchInstallationState = "Installed" + // PatchInstallationStateNotSelected ... + PatchInstallationStateNotSelected PatchInstallationState = "NotSelected" + // PatchInstallationStatePending ... + PatchInstallationStatePending PatchInstallationState = "Pending" + // PatchInstallationStateUnknown ... + PatchInstallationStateUnknown PatchInstallationState = "Unknown" +) + +// PossiblePatchInstallationStateValues returns an array of possible values for the PatchInstallationState const type. +func PossiblePatchInstallationStateValues() []PatchInstallationState { + return []PatchInstallationState{PatchInstallationStateExcluded, PatchInstallationStateFailed, PatchInstallationStateInstalled, PatchInstallationStateNotSelected, PatchInstallationStatePending, PatchInstallationStateUnknown} +} + +// PatchOperationStatus enumerates the values for patch operation status. +type PatchOperationStatus string + +const ( + // PatchOperationStatusCompletedWithWarnings ... + PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings" + // PatchOperationStatusFailed ... + PatchOperationStatusFailed PatchOperationStatus = "Failed" + // PatchOperationStatusInProgress ... + PatchOperationStatusInProgress PatchOperationStatus = "InProgress" + // PatchOperationStatusSucceeded ... + PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded" + // PatchOperationStatusUnknown ... + PatchOperationStatusUnknown PatchOperationStatus = "Unknown" +) + +// PossiblePatchOperationStatusValues returns an array of possible values for the PatchOperationStatus const type. +func PossiblePatchOperationStatusValues() []PatchOperationStatus { + return []PatchOperationStatus{PatchOperationStatusCompletedWithWarnings, PatchOperationStatusFailed, PatchOperationStatusInProgress, PatchOperationStatusSucceeded, PatchOperationStatusUnknown} +} + +// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection +// provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + // PrivateEndpointConnectionProvisioningStateCreating ... + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + // PrivateEndpointConnectionProvisioningStateDeleting ... + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + // PrivateEndpointConnectionProvisioningStateFailed ... + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + // PrivateEndpointConnectionProvisioningStateSucceeded ... + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded} +} + +// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + // PrivateEndpointServiceConnectionStatusApproved ... + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + // PrivateEndpointServiceConnectionStatusPending ... + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + // PrivateEndpointServiceConnectionStatusRejected ... + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{PrivateEndpointServiceConnectionStatusApproved, PrivateEndpointServiceConnectionStatusPending, PrivateEndpointServiceConnectionStatusRejected} +} + +// ProtocolTypes enumerates the values for protocol types. +type ProtocolTypes string + +const ( + // ProtocolTypesHTTP ... + ProtocolTypesHTTP ProtocolTypes = "Http" + // ProtocolTypesHTTPS ... + ProtocolTypesHTTPS ProtocolTypes = "Https" +) + +// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type. +func PossibleProtocolTypesValues() []ProtocolTypes { + return []ProtocolTypes{ProtocolTypesHTTP, ProtocolTypesHTTPS} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateCreating ... + ProvisioningStateCreating ProvisioningState = "Creating" + // ProvisioningStateDeleting ... + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateMigrating ... + ProvisioningStateMigrating ProvisioningState = "Migrating" + // 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{ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateMigrating, ProvisioningStateSucceeded, ProvisioningStateUpdating} +} + +// ProvisioningState1 enumerates the values for provisioning state 1. +type ProvisioningState1 string + +const ( + // ProvisioningState1Creating ... + ProvisioningState1Creating ProvisioningState1 = "Creating" + // ProvisioningState1Deleting ... + ProvisioningState1Deleting ProvisioningState1 = "Deleting" + // ProvisioningState1Failed ... + ProvisioningState1Failed ProvisioningState1 = "Failed" + // ProvisioningState1Migrating ... + ProvisioningState1Migrating ProvisioningState1 = "Migrating" + // 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, ProvisioningState1Migrating, ProvisioningState1Succeeded, ProvisioningState1Updating} +} + +// ProvisioningState2 enumerates the values for provisioning state 2. +type ProvisioningState2 string + +const ( + // ProvisioningState2Creating ... + ProvisioningState2Creating ProvisioningState2 = "Creating" + // ProvisioningState2Deleting ... + ProvisioningState2Deleting ProvisioningState2 = "Deleting" + // ProvisioningState2Failed ... + ProvisioningState2Failed ProvisioningState2 = "Failed" + // ProvisioningState2Migrating ... + ProvisioningState2Migrating ProvisioningState2 = "Migrating" + // ProvisioningState2Succeeded ... + ProvisioningState2Succeeded ProvisioningState2 = "Succeeded" + // ProvisioningState2Updating ... + ProvisioningState2Updating ProvisioningState2 = "Updating" +) + +// PossibleProvisioningState2Values returns an array of possible values for the ProvisioningState2 const type. +func PossibleProvisioningState2Values() []ProvisioningState2 { + return []ProvisioningState2{ProvisioningState2Creating, ProvisioningState2Deleting, ProvisioningState2Failed, ProvisioningState2Migrating, ProvisioningState2Succeeded, ProvisioningState2Updating} +} + +// ProvisioningState3 enumerates the values for provisioning state 3. +type ProvisioningState3 string + +const ( + // ProvisioningState3Creating ... + ProvisioningState3Creating ProvisioningState3 = "Creating" + // ProvisioningState3Deleting ... + ProvisioningState3Deleting ProvisioningState3 = "Deleting" + // ProvisioningState3Failed ... + ProvisioningState3Failed ProvisioningState3 = "Failed" + // ProvisioningState3Migrating ... + ProvisioningState3Migrating ProvisioningState3 = "Migrating" + // ProvisioningState3Succeeded ... + ProvisioningState3Succeeded ProvisioningState3 = "Succeeded" + // ProvisioningState3Updating ... + ProvisioningState3Updating ProvisioningState3 = "Updating" +) + +// PossibleProvisioningState3Values returns an array of possible values for the ProvisioningState3 const type. +func PossibleProvisioningState3Values() []ProvisioningState3 { + return []ProvisioningState3{ProvisioningState3Creating, ProvisioningState3Deleting, ProvisioningState3Failed, ProvisioningState3Migrating, ProvisioningState3Succeeded, ProvisioningState3Updating} +} + +// ProximityPlacementGroupType enumerates the values for proximity placement group type. +type ProximityPlacementGroupType string + +const ( + // ProximityPlacementGroupTypeStandard ... + ProximityPlacementGroupTypeStandard ProximityPlacementGroupType = "Standard" + // ProximityPlacementGroupTypeUltra ... + ProximityPlacementGroupTypeUltra ProximityPlacementGroupType = "Ultra" +) + +// PossibleProximityPlacementGroupTypeValues returns an array of possible values for the ProximityPlacementGroupType const type. +func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType { + return []ProximityPlacementGroupType{ProximityPlacementGroupTypeStandard, ProximityPlacementGroupTypeUltra} +} + +// PublicIPAddressSkuName enumerates the values for public ip address sku name. +type PublicIPAddressSkuName string + +const ( + // PublicIPAddressSkuNameBasic ... + PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" + // PublicIPAddressSkuNameStandard ... + PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" +) + +// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type. +func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { + return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard} +} + +// PublicIPAddressSkuTier enumerates the values for public ip address sku tier. +type PublicIPAddressSkuTier string + +const ( + // PublicIPAddressSkuTierGlobal ... + PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" + // PublicIPAddressSkuTierRegional ... + PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" +) + +// PossiblePublicIPAddressSkuTierValues returns an array of possible values for the PublicIPAddressSkuTier const type. +func PossiblePublicIPAddressSkuTierValues() []PublicIPAddressSkuTier { + return []PublicIPAddressSkuTier{PublicIPAddressSkuTierGlobal, PublicIPAddressSkuTierRegional} +} + +// PublicIPAllocationMethod enumerates the values for public ip allocation method. +type PublicIPAllocationMethod string + +const ( + // PublicIPAllocationMethodDynamic ... + PublicIPAllocationMethodDynamic PublicIPAllocationMethod = "Dynamic" + // PublicIPAllocationMethodStatic ... + PublicIPAllocationMethodStatic PublicIPAllocationMethod = "Static" +) + +// PossiblePublicIPAllocationMethodValues returns an array of possible values for the PublicIPAllocationMethod const type. +func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod { + return []PublicIPAllocationMethod{PublicIPAllocationMethodDynamic, PublicIPAllocationMethodStatic} +} + +// ReplicationMode enumerates the values for replication mode. +type ReplicationMode string + +const ( + // ReplicationModeFull ... + ReplicationModeFull ReplicationMode = "Full" + // ReplicationModeShallow ... + ReplicationModeShallow ReplicationMode = "Shallow" +) + +// PossibleReplicationModeValues returns an array of possible values for the ReplicationMode const type. +func PossibleReplicationModeValues() []ReplicationMode { + return []ReplicationMode{ReplicationModeFull, ReplicationModeShallow} +} + +// ReplicationState enumerates the values for replication state. +type ReplicationState string + +const ( + // ReplicationStateCompleted ... + ReplicationStateCompleted ReplicationState = "Completed" + // ReplicationStateFailed ... + ReplicationStateFailed ReplicationState = "Failed" + // ReplicationStateReplicating ... + ReplicationStateReplicating ReplicationState = "Replicating" + // ReplicationStateUnknown ... + ReplicationStateUnknown ReplicationState = "Unknown" +) + +// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. +func PossibleReplicationStateValues() []ReplicationState { + return []ReplicationState{ReplicationStateCompleted, ReplicationStateFailed, ReplicationStateReplicating, ReplicationStateUnknown} +} + +// ReplicationStatusTypes enumerates the values for replication status types. +type ReplicationStatusTypes string + +const ( + // ReplicationStatusTypesReplicationStatus ... + ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus" +) + +// PossibleReplicationStatusTypesValues returns an array of possible values for the ReplicationStatusTypes const type. +func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes { + return []ReplicationStatusTypes{ReplicationStatusTypesReplicationStatus} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // ResourceIdentityTypeUserAssigned ... + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} +} + +// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. +type ResourceSkuCapacityScaleType string + +const ( + // ResourceSkuCapacityScaleTypeAutomatic ... + ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic" + // ResourceSkuCapacityScaleTypeManual ... + ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual" + // ResourceSkuCapacityScaleTypeNone ... + ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None" +) + +// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. +func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { + return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone} +} + +// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code. +type ResourceSkuRestrictionsReasonCode string + +const ( + // ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ... + ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription" + // ResourceSkuRestrictionsReasonCodeQuotaID ... + ResourceSkuRestrictionsReasonCodeQuotaID ResourceSkuRestrictionsReasonCode = "QuotaId" +) + +// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type. +func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode { + return []ResourceSkuRestrictionsReasonCode{ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription, ResourceSkuRestrictionsReasonCodeQuotaID} +} + +// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type. +type ResourceSkuRestrictionsType string + +const ( + // ResourceSkuRestrictionsTypeLocation ... + ResourceSkuRestrictionsTypeLocation ResourceSkuRestrictionsType = "Location" + // ResourceSkuRestrictionsTypeZone ... + ResourceSkuRestrictionsTypeZone ResourceSkuRestrictionsType = "Zone" +) + +// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type. +func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType { + return []ResourceSkuRestrictionsType{ResourceSkuRestrictionsTypeLocation, ResourceSkuRestrictionsTypeZone} +} + +// RestorePointCollectionExpandOptions enumerates the values for restore point collection expand options. +type RestorePointCollectionExpandOptions string + +const ( + // RestorePointCollectionExpandOptionsRestorePoints ... + RestorePointCollectionExpandOptionsRestorePoints RestorePointCollectionExpandOptions = "restorePoints" +) + +// PossibleRestorePointCollectionExpandOptionsValues returns an array of possible values for the RestorePointCollectionExpandOptions const type. +func PossibleRestorePointCollectionExpandOptionsValues() []RestorePointCollectionExpandOptions { + return []RestorePointCollectionExpandOptions{RestorePointCollectionExpandOptionsRestorePoints} +} + +// RollingUpgradeActionType enumerates the values for rolling upgrade action type. +type RollingUpgradeActionType string + +const ( + // RollingUpgradeActionTypeCancel ... + RollingUpgradeActionTypeCancel RollingUpgradeActionType = "Cancel" + // RollingUpgradeActionTypeStart ... + RollingUpgradeActionTypeStart RollingUpgradeActionType = "Start" +) + +// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type. +func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType { + return []RollingUpgradeActionType{RollingUpgradeActionTypeCancel, RollingUpgradeActionTypeStart} +} + +// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code. +type RollingUpgradeStatusCode string + +const ( + // RollingUpgradeStatusCodeCancelled ... + RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled" + // RollingUpgradeStatusCodeCompleted ... + RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed" + // RollingUpgradeStatusCodeFaulted ... + RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted" + // RollingUpgradeStatusCodeRollingForward ... + RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward" +) + +// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type. +func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode { + return []RollingUpgradeStatusCode{RollingUpgradeStatusCodeCancelled, RollingUpgradeStatusCodeCompleted, RollingUpgradeStatusCodeFaulted, RollingUpgradeStatusCodeRollingForward} +} + +// SecurityTypes enumerates the values for security types. +type SecurityTypes string + +const ( + // SecurityTypesTrustedLaunch ... + SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" +) + +// PossibleSecurityTypesValues returns an array of possible values for the SecurityTypes const type. +func PossibleSecurityTypesValues() []SecurityTypes { + return []SecurityTypes{SecurityTypesTrustedLaunch} +} + +// SelectPermissions enumerates the values for select permissions. +type SelectPermissions string + +const ( + // SelectPermissionsPermissions ... + SelectPermissionsPermissions SelectPermissions = "Permissions" +) + +// PossibleSelectPermissionsValues returns an array of possible values for the SelectPermissions const type. +func PossibleSelectPermissionsValues() []SelectPermissions { + return []SelectPermissions{SelectPermissionsPermissions} +} + +// SettingNames enumerates the values for setting names. +type SettingNames string + +const ( + // SettingNamesAutoLogon ... + SettingNamesAutoLogon SettingNames = "AutoLogon" + // SettingNamesFirstLogonCommands ... + SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands" +) + +// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type. +func PossibleSettingNamesValues() []SettingNames { + return []SettingNames{SettingNamesAutoLogon, SettingNamesFirstLogonCommands} +} + +// SharedToValues enumerates the values for shared to values. +type SharedToValues string + +const ( + // SharedToValuesTenant ... + SharedToValuesTenant SharedToValues = "tenant" +) + +// PossibleSharedToValuesValues returns an array of possible values for the SharedToValues const type. +func PossibleSharedToValuesValues() []SharedToValues { + return []SharedToValues{SharedToValuesTenant} +} + +// SharingProfileGroupTypes enumerates the values for sharing profile group types. +type SharingProfileGroupTypes string + +const ( + // SharingProfileGroupTypesAADTenants ... + SharingProfileGroupTypesAADTenants SharingProfileGroupTypes = "AADTenants" + // SharingProfileGroupTypesSubscriptions ... + SharingProfileGroupTypesSubscriptions SharingProfileGroupTypes = "Subscriptions" +) + +// PossibleSharingProfileGroupTypesValues returns an array of possible values for the SharingProfileGroupTypes const type. +func PossibleSharingProfileGroupTypesValues() []SharingProfileGroupTypes { + return []SharingProfileGroupTypes{SharingProfileGroupTypesAADTenants, SharingProfileGroupTypesSubscriptions} +} + +// SharingUpdateOperationTypes enumerates the values for sharing update operation types. +type SharingUpdateOperationTypes string + +const ( + // SharingUpdateOperationTypesAdd ... + SharingUpdateOperationTypesAdd SharingUpdateOperationTypes = "Add" + // SharingUpdateOperationTypesRemove ... + SharingUpdateOperationTypesRemove SharingUpdateOperationTypes = "Remove" + // SharingUpdateOperationTypesReset ... + SharingUpdateOperationTypesReset SharingUpdateOperationTypes = "Reset" +) + +// PossibleSharingUpdateOperationTypesValues returns an array of possible values for the SharingUpdateOperationTypes const type. +func PossibleSharingUpdateOperationTypesValues() []SharingUpdateOperationTypes { + return []SharingUpdateOperationTypes{SharingUpdateOperationTypesAdd, SharingUpdateOperationTypesRemove, SharingUpdateOperationTypesReset} +} + +// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types. +type SnapshotStorageAccountTypes string + +const ( + // SnapshotStorageAccountTypesPremiumLRS Premium SSD locally redundant storage + SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS" + // SnapshotStorageAccountTypesStandardLRS Standard HDD locally redundant storage + SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS" + // SnapshotStorageAccountTypesStandardZRS Standard zone redundant storage + SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS" +) + +// PossibleSnapshotStorageAccountTypesValues returns an array of possible values for the SnapshotStorageAccountTypes const type. +func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes { + return []SnapshotStorageAccountTypes{SnapshotStorageAccountTypesPremiumLRS, SnapshotStorageAccountTypesStandardLRS, SnapshotStorageAccountTypesStandardZRS} +} + +// StatusLevelTypes enumerates the values for status level types. +type StatusLevelTypes string + +const ( + // StatusLevelTypesError ... + StatusLevelTypesError StatusLevelTypes = "Error" + // StatusLevelTypesInfo ... + StatusLevelTypesInfo StatusLevelTypes = "Info" + // StatusLevelTypesWarning ... + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type. +func PossibleStatusLevelTypesValues() []StatusLevelTypes { + return []StatusLevelTypes{StatusLevelTypesError, StatusLevelTypesInfo, StatusLevelTypesWarning} +} + +// StorageAccountType enumerates the values for storage account type. +type StorageAccountType string + +const ( + // StorageAccountTypePremiumLRS ... + StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" + // StorageAccountTypeStandardLRS ... + StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" + // StorageAccountTypeStandardZRS ... + StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS" +) + +// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. +func PossibleStorageAccountTypeValues() []StorageAccountType { + return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} +} + +// StorageAccountTypes enumerates the values for storage account types. +type StorageAccountTypes string + +const ( + // StorageAccountTypesPremiumLRS ... + StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" + // StorageAccountTypesPremiumZRS ... + StorageAccountTypesPremiumZRS StorageAccountTypes = "Premium_ZRS" + // StorageAccountTypesStandardLRS ... + StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" + // StorageAccountTypesStandardSSDLRS ... + StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" + // StorageAccountTypesStandardSSDZRS ... + StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS" + // StorageAccountTypesUltraSSDLRS ... + StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" +) + +// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type. +func PossibleStorageAccountTypesValues() []StorageAccountTypes { + return []StorageAccountTypes{StorageAccountTypesPremiumLRS, StorageAccountTypesPremiumZRS, StorageAccountTypesStandardLRS, StorageAccountTypesStandardSSDLRS, StorageAccountTypesStandardSSDZRS, StorageAccountTypesUltraSSDLRS} +} + +// UpgradeMode enumerates the values for upgrade mode. +type UpgradeMode string + +const ( + // UpgradeModeAutomatic ... + UpgradeModeAutomatic UpgradeMode = "Automatic" + // UpgradeModeManual ... + UpgradeModeManual UpgradeMode = "Manual" + // UpgradeModeRolling ... + UpgradeModeRolling UpgradeMode = "Rolling" +) + +// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type. +func PossibleUpgradeModeValues() []UpgradeMode { + return []UpgradeMode{UpgradeModeAutomatic, UpgradeModeManual, UpgradeModeRolling} +} + +// UpgradeOperationInvoker enumerates the values for upgrade operation invoker. +type UpgradeOperationInvoker string + +const ( + // UpgradeOperationInvokerPlatform ... + UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform" + // UpgradeOperationInvokerUnknown ... + UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown" + // UpgradeOperationInvokerUser ... + UpgradeOperationInvokerUser UpgradeOperationInvoker = "User" +) + +// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type. +func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker { + return []UpgradeOperationInvoker{UpgradeOperationInvokerPlatform, UpgradeOperationInvokerUnknown, UpgradeOperationInvokerUser} +} + +// UpgradeState enumerates the values for upgrade state. +type UpgradeState string + +const ( + // UpgradeStateCancelled ... + UpgradeStateCancelled UpgradeState = "Cancelled" + // UpgradeStateCompleted ... + UpgradeStateCompleted UpgradeState = "Completed" + // UpgradeStateFaulted ... + UpgradeStateFaulted UpgradeState = "Faulted" + // UpgradeStateRollingForward ... + UpgradeStateRollingForward UpgradeState = "RollingForward" +) + +// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type. +func PossibleUpgradeStateValues() []UpgradeState { + return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward} +} + +// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types. +type VirtualMachineEvictionPolicyTypes string + +const ( + // VirtualMachineEvictionPolicyTypesDeallocate ... + VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate" + // VirtualMachineEvictionPolicyTypesDelete ... + VirtualMachineEvictionPolicyTypesDelete VirtualMachineEvictionPolicyTypes = "Delete" +) + +// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type. +func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes { + return []VirtualMachineEvictionPolicyTypes{VirtualMachineEvictionPolicyTypesDeallocate, VirtualMachineEvictionPolicyTypesDelete} +} + +// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types. +type VirtualMachinePriorityTypes string + +const ( + // VirtualMachinePriorityTypesLow ... + VirtualMachinePriorityTypesLow VirtualMachinePriorityTypes = "Low" + // VirtualMachinePriorityTypesRegular ... + VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular" + // VirtualMachinePriorityTypesSpot ... + VirtualMachinePriorityTypesSpot VirtualMachinePriorityTypes = "Spot" +) + +// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. +func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { + return []VirtualMachinePriorityTypes{VirtualMachinePriorityTypesLow, VirtualMachinePriorityTypesRegular, VirtualMachinePriorityTypesSpot} +} + +// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules. +type VirtualMachineScaleSetScaleInRules string + +const ( + // VirtualMachineScaleSetScaleInRulesDefault ... + VirtualMachineScaleSetScaleInRulesDefault VirtualMachineScaleSetScaleInRules = "Default" + // VirtualMachineScaleSetScaleInRulesNewestVM ... + VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM" + // VirtualMachineScaleSetScaleInRulesOldestVM ... + VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM" +) + +// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type. +func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules { + return []VirtualMachineScaleSetScaleInRules{VirtualMachineScaleSetScaleInRulesDefault, VirtualMachineScaleSetScaleInRulesNewestVM, VirtualMachineScaleSetScaleInRulesOldestVM} +} + +// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type. +type VirtualMachineScaleSetSkuScaleType string + +const ( + // VirtualMachineScaleSetSkuScaleTypeAutomatic ... + VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" + // VirtualMachineScaleSetSkuScaleTypeNone ... + VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" +) + +// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type. +func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType { + return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone} +} + +// VirtualMachineSizeTypes enumerates the values for virtual machine size types. +type VirtualMachineSizeTypes string + +const ( + // VirtualMachineSizeTypesBasicA0 ... + VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0" + // VirtualMachineSizeTypesBasicA1 ... + VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1" + // VirtualMachineSizeTypesBasicA2 ... + VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2" + // VirtualMachineSizeTypesBasicA3 ... + VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3" + // VirtualMachineSizeTypesBasicA4 ... + VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4" + // VirtualMachineSizeTypesStandardA0 ... + VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0" + // VirtualMachineSizeTypesStandardA1 ... + VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1" + // VirtualMachineSizeTypesStandardA10 ... + VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10" + // VirtualMachineSizeTypesStandardA11 ... + VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11" + // VirtualMachineSizeTypesStandardA1V2 ... + VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2" + // VirtualMachineSizeTypesStandardA2 ... + VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2" + // VirtualMachineSizeTypesStandardA2mV2 ... + VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2" + // VirtualMachineSizeTypesStandardA2V2 ... + VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2" + // VirtualMachineSizeTypesStandardA3 ... + VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3" + // VirtualMachineSizeTypesStandardA4 ... + VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4" + // VirtualMachineSizeTypesStandardA4mV2 ... + VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2" + // VirtualMachineSizeTypesStandardA4V2 ... + VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2" + // VirtualMachineSizeTypesStandardA5 ... + VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5" + // VirtualMachineSizeTypesStandardA6 ... + VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6" + // VirtualMachineSizeTypesStandardA7 ... + VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7" + // VirtualMachineSizeTypesStandardA8 ... + VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8" + // VirtualMachineSizeTypesStandardA8mV2 ... + VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2" + // VirtualMachineSizeTypesStandardA8V2 ... + VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2" + // VirtualMachineSizeTypesStandardA9 ... + VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9" + // VirtualMachineSizeTypesStandardB1ms ... + VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms" + // VirtualMachineSizeTypesStandardB1s ... + VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s" + // VirtualMachineSizeTypesStandardB2ms ... + VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms" + // VirtualMachineSizeTypesStandardB2s ... + VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s" + // VirtualMachineSizeTypesStandardB4ms ... + VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms" + // VirtualMachineSizeTypesStandardB8ms ... + VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms" + // VirtualMachineSizeTypesStandardD1 ... + VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1" + // VirtualMachineSizeTypesStandardD11 ... + VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11" + // VirtualMachineSizeTypesStandardD11V2 ... + VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2" + // VirtualMachineSizeTypesStandardD12 ... + VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12" + // VirtualMachineSizeTypesStandardD12V2 ... + VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2" + // VirtualMachineSizeTypesStandardD13 ... + VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13" + // VirtualMachineSizeTypesStandardD13V2 ... + VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2" + // VirtualMachineSizeTypesStandardD14 ... + VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14" + // VirtualMachineSizeTypesStandardD14V2 ... + VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2" + // VirtualMachineSizeTypesStandardD15V2 ... + VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2" + // VirtualMachineSizeTypesStandardD16sV3 ... + VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3" + // VirtualMachineSizeTypesStandardD16V3 ... + VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3" + // VirtualMachineSizeTypesStandardD1V2 ... + VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2" + // VirtualMachineSizeTypesStandardD2 ... + VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2" + // VirtualMachineSizeTypesStandardD2sV3 ... + VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3" + // VirtualMachineSizeTypesStandardD2V2 ... + VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2" + // VirtualMachineSizeTypesStandardD2V3 ... + VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3" + // VirtualMachineSizeTypesStandardD3 ... + VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3" + // VirtualMachineSizeTypesStandardD32sV3 ... + VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3" + // VirtualMachineSizeTypesStandardD32V3 ... + VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3" + // VirtualMachineSizeTypesStandardD3V2 ... + VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2" + // VirtualMachineSizeTypesStandardD4 ... + VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4" + // VirtualMachineSizeTypesStandardD4sV3 ... + VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3" + // VirtualMachineSizeTypesStandardD4V2 ... + VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2" + // VirtualMachineSizeTypesStandardD4V3 ... + VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3" + // VirtualMachineSizeTypesStandardD5V2 ... + VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2" + // VirtualMachineSizeTypesStandardD64sV3 ... + VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3" + // VirtualMachineSizeTypesStandardD64V3 ... + VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3" + // VirtualMachineSizeTypesStandardD8sV3 ... + VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3" + // VirtualMachineSizeTypesStandardD8V3 ... + VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3" + // VirtualMachineSizeTypesStandardDS1 ... + VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1" + // VirtualMachineSizeTypesStandardDS11 ... + VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11" + // VirtualMachineSizeTypesStandardDS11V2 ... + VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2" + // VirtualMachineSizeTypesStandardDS12 ... + VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12" + // VirtualMachineSizeTypesStandardDS12V2 ... + VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2" + // VirtualMachineSizeTypesStandardDS13 ... + VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13" + // VirtualMachineSizeTypesStandardDS132V2 ... + VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2" + // VirtualMachineSizeTypesStandardDS134V2 ... + VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2" + // VirtualMachineSizeTypesStandardDS13V2 ... + VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2" + // VirtualMachineSizeTypesStandardDS14 ... + VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14" + // VirtualMachineSizeTypesStandardDS144V2 ... + VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2" + // VirtualMachineSizeTypesStandardDS148V2 ... + VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2" + // VirtualMachineSizeTypesStandardDS14V2 ... + VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2" + // VirtualMachineSizeTypesStandardDS15V2 ... + VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2" + // VirtualMachineSizeTypesStandardDS1V2 ... + VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2" + // VirtualMachineSizeTypesStandardDS2 ... + VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2" + // VirtualMachineSizeTypesStandardDS2V2 ... + VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2" + // VirtualMachineSizeTypesStandardDS3 ... + VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3" + // VirtualMachineSizeTypesStandardDS3V2 ... + VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2" + // VirtualMachineSizeTypesStandardDS4 ... + VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4" + // VirtualMachineSizeTypesStandardDS4V2 ... + VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2" + // VirtualMachineSizeTypesStandardDS5V2 ... + VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2" + // VirtualMachineSizeTypesStandardE16sV3 ... + VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3" + // VirtualMachineSizeTypesStandardE16V3 ... + VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3" + // VirtualMachineSizeTypesStandardE2sV3 ... + VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3" + // VirtualMachineSizeTypesStandardE2V3 ... + VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3" + // VirtualMachineSizeTypesStandardE3216V3 ... + VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3" + // VirtualMachineSizeTypesStandardE328sV3 ... + VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3" + // VirtualMachineSizeTypesStandardE32sV3 ... + VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3" + // VirtualMachineSizeTypesStandardE32V3 ... + VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3" + // VirtualMachineSizeTypesStandardE4sV3 ... + VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3" + // VirtualMachineSizeTypesStandardE4V3 ... + VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3" + // VirtualMachineSizeTypesStandardE6416sV3 ... + VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3" + // VirtualMachineSizeTypesStandardE6432sV3 ... + VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3" + // VirtualMachineSizeTypesStandardE64sV3 ... + VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3" + // VirtualMachineSizeTypesStandardE64V3 ... + VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3" + // VirtualMachineSizeTypesStandardE8sV3 ... + VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3" + // VirtualMachineSizeTypesStandardE8V3 ... + VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3" + // VirtualMachineSizeTypesStandardF1 ... + VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1" + // VirtualMachineSizeTypesStandardF16 ... + VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16" + // VirtualMachineSizeTypesStandardF16s ... + VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s" + // VirtualMachineSizeTypesStandardF16sV2 ... + VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2" + // VirtualMachineSizeTypesStandardF1s ... + VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s" + // VirtualMachineSizeTypesStandardF2 ... + VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2" + // VirtualMachineSizeTypesStandardF2s ... + VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s" + // VirtualMachineSizeTypesStandardF2sV2 ... + VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2" + // VirtualMachineSizeTypesStandardF32sV2 ... + VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2" + // VirtualMachineSizeTypesStandardF4 ... + VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4" + // VirtualMachineSizeTypesStandardF4s ... + VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s" + // VirtualMachineSizeTypesStandardF4sV2 ... + VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2" + // VirtualMachineSizeTypesStandardF64sV2 ... + VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2" + // VirtualMachineSizeTypesStandardF72sV2 ... + VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2" + // VirtualMachineSizeTypesStandardF8 ... + VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8" + // VirtualMachineSizeTypesStandardF8s ... + VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s" + // VirtualMachineSizeTypesStandardF8sV2 ... + VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2" + // VirtualMachineSizeTypesStandardG1 ... + VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1" + // VirtualMachineSizeTypesStandardG2 ... + VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2" + // VirtualMachineSizeTypesStandardG3 ... + VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3" + // VirtualMachineSizeTypesStandardG4 ... + VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4" + // VirtualMachineSizeTypesStandardG5 ... + VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5" + // VirtualMachineSizeTypesStandardGS1 ... + VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1" + // VirtualMachineSizeTypesStandardGS2 ... + VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2" + // VirtualMachineSizeTypesStandardGS3 ... + VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3" + // VirtualMachineSizeTypesStandardGS4 ... + VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4" + // VirtualMachineSizeTypesStandardGS44 ... + VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4" + // VirtualMachineSizeTypesStandardGS48 ... + VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8" + // VirtualMachineSizeTypesStandardGS5 ... + VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5" + // VirtualMachineSizeTypesStandardGS516 ... + VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16" + // VirtualMachineSizeTypesStandardGS58 ... + VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8" + // VirtualMachineSizeTypesStandardH16 ... + VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16" + // VirtualMachineSizeTypesStandardH16m ... + VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m" + // VirtualMachineSizeTypesStandardH16mr ... + VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr" + // VirtualMachineSizeTypesStandardH16r ... + VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r" + // VirtualMachineSizeTypesStandardH8 ... + VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8" + // VirtualMachineSizeTypesStandardH8m ... + VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m" + // VirtualMachineSizeTypesStandardL16s ... + VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s" + // VirtualMachineSizeTypesStandardL32s ... + VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s" + // VirtualMachineSizeTypesStandardL4s ... + VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s" + // VirtualMachineSizeTypesStandardL8s ... + VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s" + // VirtualMachineSizeTypesStandardM12832ms ... + VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms" + // VirtualMachineSizeTypesStandardM12864ms ... + VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms" + // VirtualMachineSizeTypesStandardM128ms ... + VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms" + // VirtualMachineSizeTypesStandardM128s ... + VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s" + // VirtualMachineSizeTypesStandardM6416ms ... + VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms" + // VirtualMachineSizeTypesStandardM6432ms ... + VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms" + // VirtualMachineSizeTypesStandardM64ms ... + VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms" + // VirtualMachineSizeTypesStandardM64s ... + VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s" + // VirtualMachineSizeTypesStandardNC12 ... + VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12" + // VirtualMachineSizeTypesStandardNC12sV2 ... + VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2" + // VirtualMachineSizeTypesStandardNC12sV3 ... + VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3" + // VirtualMachineSizeTypesStandardNC24 ... + VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24" + // VirtualMachineSizeTypesStandardNC24r ... + VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r" + // VirtualMachineSizeTypesStandardNC24rsV2 ... + VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2" + // VirtualMachineSizeTypesStandardNC24rsV3 ... + VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3" + // VirtualMachineSizeTypesStandardNC24sV2 ... + VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2" + // VirtualMachineSizeTypesStandardNC24sV3 ... + VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3" + // VirtualMachineSizeTypesStandardNC6 ... + VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6" + // VirtualMachineSizeTypesStandardNC6sV2 ... + VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2" + // VirtualMachineSizeTypesStandardNC6sV3 ... + VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3" + // VirtualMachineSizeTypesStandardND12s ... + VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s" + // VirtualMachineSizeTypesStandardND24rs ... + VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs" + // VirtualMachineSizeTypesStandardND24s ... + VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s" + // VirtualMachineSizeTypesStandardND6s ... + VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s" + // VirtualMachineSizeTypesStandardNV12 ... + VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12" + // VirtualMachineSizeTypesStandardNV24 ... + VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24" + // VirtualMachineSizeTypesStandardNV6 ... + VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6" +) + +// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type. +func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes { + return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6} +} + +// VMDiskTypes enumerates the values for vm disk types. +type VMDiskTypes string + +const ( + // VMDiskTypesNone ... + VMDiskTypesNone VMDiskTypes = "None" + // VMDiskTypesUnmanaged ... + VMDiskTypesUnmanaged VMDiskTypes = "Unmanaged" +) + +// PossibleVMDiskTypesValues returns an array of possible values for the VMDiskTypes const type. +func PossibleVMDiskTypesValues() []VMDiskTypes { + return []VMDiskTypes{VMDiskTypesNone, VMDiskTypesUnmanaged} +} + +// VMGuestPatchClassificationLinux enumerates the values for vm guest patch classification linux. +type VMGuestPatchClassificationLinux string + +const ( + // VMGuestPatchClassificationLinuxCritical ... + VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical" + // VMGuestPatchClassificationLinuxOther ... + VMGuestPatchClassificationLinuxOther VMGuestPatchClassificationLinux = "Other" + // VMGuestPatchClassificationLinuxSecurity ... + VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security" +) + +// PossibleVMGuestPatchClassificationLinuxValues returns an array of possible values for the VMGuestPatchClassificationLinux const type. +func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux { + return []VMGuestPatchClassificationLinux{VMGuestPatchClassificationLinuxCritical, VMGuestPatchClassificationLinuxOther, VMGuestPatchClassificationLinuxSecurity} +} + +// VMGuestPatchClassificationWindows enumerates the values for vm guest patch classification windows. +type VMGuestPatchClassificationWindows string + +const ( + // VMGuestPatchClassificationWindowsCritical ... + VMGuestPatchClassificationWindowsCritical VMGuestPatchClassificationWindows = "Critical" + // VMGuestPatchClassificationWindowsDefinition ... + VMGuestPatchClassificationWindowsDefinition VMGuestPatchClassificationWindows = "Definition" + // VMGuestPatchClassificationWindowsFeaturePack ... + VMGuestPatchClassificationWindowsFeaturePack VMGuestPatchClassificationWindows = "FeaturePack" + // VMGuestPatchClassificationWindowsSecurity ... + VMGuestPatchClassificationWindowsSecurity VMGuestPatchClassificationWindows = "Security" + // VMGuestPatchClassificationWindowsServicePack ... + VMGuestPatchClassificationWindowsServicePack VMGuestPatchClassificationWindows = "ServicePack" + // VMGuestPatchClassificationWindowsTools ... + VMGuestPatchClassificationWindowsTools VMGuestPatchClassificationWindows = "Tools" + // VMGuestPatchClassificationWindowsUpdateRollUp ... + VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp" + // VMGuestPatchClassificationWindowsUpdates ... + VMGuestPatchClassificationWindowsUpdates VMGuestPatchClassificationWindows = "Updates" +) + +// PossibleVMGuestPatchClassificationWindowsValues returns an array of possible values for the VMGuestPatchClassificationWindows const type. +func PossibleVMGuestPatchClassificationWindowsValues() []VMGuestPatchClassificationWindows { + return []VMGuestPatchClassificationWindows{VMGuestPatchClassificationWindowsCritical, VMGuestPatchClassificationWindowsDefinition, VMGuestPatchClassificationWindowsFeaturePack, VMGuestPatchClassificationWindowsSecurity, VMGuestPatchClassificationWindowsServicePack, VMGuestPatchClassificationWindowsTools, VMGuestPatchClassificationWindowsUpdateRollUp, VMGuestPatchClassificationWindowsUpdates} +} + +// VMGuestPatchRebootBehavior enumerates the values for vm guest patch reboot behavior. +type VMGuestPatchRebootBehavior string + +const ( + // VMGuestPatchRebootBehaviorAlwaysRequiresReboot ... + VMGuestPatchRebootBehaviorAlwaysRequiresReboot VMGuestPatchRebootBehavior = "AlwaysRequiresReboot" + // VMGuestPatchRebootBehaviorCanRequestReboot ... + VMGuestPatchRebootBehaviorCanRequestReboot VMGuestPatchRebootBehavior = "CanRequestReboot" + // VMGuestPatchRebootBehaviorNeverReboots ... + VMGuestPatchRebootBehaviorNeverReboots VMGuestPatchRebootBehavior = "NeverReboots" + // VMGuestPatchRebootBehaviorUnknown ... + VMGuestPatchRebootBehaviorUnknown VMGuestPatchRebootBehavior = "Unknown" +) + +// PossibleVMGuestPatchRebootBehaviorValues returns an array of possible values for the VMGuestPatchRebootBehavior const type. +func PossibleVMGuestPatchRebootBehaviorValues() []VMGuestPatchRebootBehavior { + return []VMGuestPatchRebootBehavior{VMGuestPatchRebootBehaviorAlwaysRequiresReboot, VMGuestPatchRebootBehaviorCanRequestReboot, VMGuestPatchRebootBehaviorNeverReboots, VMGuestPatchRebootBehaviorUnknown} +} + +// VMGuestPatchRebootSetting enumerates the values for vm guest patch reboot setting. +type VMGuestPatchRebootSetting string + +const ( + // VMGuestPatchRebootSettingAlways ... + VMGuestPatchRebootSettingAlways VMGuestPatchRebootSetting = "Always" + // VMGuestPatchRebootSettingIfRequired ... + VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired" + // VMGuestPatchRebootSettingNever ... + VMGuestPatchRebootSettingNever VMGuestPatchRebootSetting = "Never" +) + +// PossibleVMGuestPatchRebootSettingValues returns an array of possible values for the VMGuestPatchRebootSetting const type. +func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting { + return []VMGuestPatchRebootSetting{VMGuestPatchRebootSettingAlways, VMGuestPatchRebootSettingIfRequired, VMGuestPatchRebootSettingNever} +} + +// VMGuestPatchRebootStatus enumerates the values for vm guest patch reboot status. +type VMGuestPatchRebootStatus string + +const ( + // VMGuestPatchRebootStatusCompleted ... + VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed" + // VMGuestPatchRebootStatusFailed ... + VMGuestPatchRebootStatusFailed VMGuestPatchRebootStatus = "Failed" + // VMGuestPatchRebootStatusNotNeeded ... + VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded" + // VMGuestPatchRebootStatusRequired ... + VMGuestPatchRebootStatusRequired VMGuestPatchRebootStatus = "Required" + // VMGuestPatchRebootStatusStarted ... + VMGuestPatchRebootStatusStarted VMGuestPatchRebootStatus = "Started" + // VMGuestPatchRebootStatusUnknown ... + VMGuestPatchRebootStatusUnknown VMGuestPatchRebootStatus = "Unknown" +) + +// PossibleVMGuestPatchRebootStatusValues returns an array of possible values for the VMGuestPatchRebootStatus const type. +func PossibleVMGuestPatchRebootStatusValues() []VMGuestPatchRebootStatus { + return []VMGuestPatchRebootStatus{VMGuestPatchRebootStatusCompleted, VMGuestPatchRebootStatusFailed, VMGuestPatchRebootStatusNotNeeded, VMGuestPatchRebootStatusRequired, VMGuestPatchRebootStatusStarted, VMGuestPatchRebootStatusUnknown} +} + +// WindowsPatchAssessmentMode enumerates the values for windows patch assessment mode. +type WindowsPatchAssessmentMode string + +const ( + // WindowsPatchAssessmentModeAutomaticByPlatform ... + WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform" + // WindowsPatchAssessmentModeImageDefault ... + WindowsPatchAssessmentModeImageDefault WindowsPatchAssessmentMode = "ImageDefault" +) + +// PossibleWindowsPatchAssessmentModeValues returns an array of possible values for the WindowsPatchAssessmentMode const type. +func PossibleWindowsPatchAssessmentModeValues() []WindowsPatchAssessmentMode { + return []WindowsPatchAssessmentMode{WindowsPatchAssessmentModeAutomaticByPlatform, WindowsPatchAssessmentModeImageDefault} +} + +// WindowsVMGuestPatchMode enumerates the values for windows vm guest patch mode. +type WindowsVMGuestPatchMode string + +const ( + // WindowsVMGuestPatchModeAutomaticByOS ... + WindowsVMGuestPatchModeAutomaticByOS WindowsVMGuestPatchMode = "AutomaticByOS" + // WindowsVMGuestPatchModeAutomaticByPlatform ... + WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform" + // WindowsVMGuestPatchModeManual ... + WindowsVMGuestPatchModeManual WindowsVMGuestPatchMode = "Manual" +) + +// PossibleWindowsVMGuestPatchModeValues returns an array of possible values for the WindowsVMGuestPatchMode const type. +func PossibleWindowsVMGuestPatchModeValues() []WindowsVMGuestPatchMode { + return []WindowsVMGuestPatchMode{WindowsVMGuestPatchModeAutomaticByOS, WindowsVMGuestPatchModeAutomaticByPlatform, WindowsVMGuestPatchModeManual} +} diff --git a/services/compute/mgmt/2021-07-01/compute/galleries.go b/services/compute/mgmt/2021-07-01/compute/galleries.go new file mode 100644 index 000000000000..7be71102686f --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/galleries.go @@ -0,0 +1,581 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// GalleriesClient is the compute Client +type GalleriesClient struct { + BaseClient +} + +// NewGalleriesClient creates an instance of the GalleriesClient client. +func NewGalleriesClient(subscriptionID string) GalleriesClient { + return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient { + return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or 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 create or update Shared Image Gallery operation. +func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (result GalleriesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, gallery) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (*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 = "2021-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.Compute/galleries/{galleryName}", pathParameters), + autorest.WithJSON(gallery), + 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 GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GalleriesClient) CreateOrUpdateResponder(resp *http.Response) (result Gallery, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a Shared Image Gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery to be deleted. +func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleriesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string) (*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 = "2021-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.Compute/galleries/{galleryName}", 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 GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client GalleriesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about a Shared Image Gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery. +// selectParameter - the select expression to apply on the operation. +func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, selectParameter SelectPermissions) (result Gallery, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.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, galleryName, selectParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, selectParameter SelectPermissions) (*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 = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(selectParameter)) > 0 { + queryParameters["$select"] = autorest.Encode("query", selectParameter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", 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 GalleriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GalleriesClient) GetResponder(resp *http.Response) (result Gallery, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list galleries under a subscription. +func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List") + defer func() { + sc := -1 + if result.gl.Response.Response != nil { + sc = result.gl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.gl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure sending request") + return + } + + result.gl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure responding to request") + return + } + if result.gl.hasNextLink() && result.gl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", 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 GalleriesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client GalleriesClient) ListResponder(resp *http.Response) (result GalleryList, err error) { + err = autorest.Respond( + resp, + 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 GalleriesClient) listNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) { + req, err := lastResults.galleryListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "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, "compute.GalleriesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client GalleriesClient) ListComplete(ctx context.Context) (result GalleryListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.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 list galleries under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result GalleryListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.gl.Response.Response != nil { + sc = result.gl.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, "compute.GalleriesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.gl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.gl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.gl.hasNextLink() && result.gl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client GalleriesClient) 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 = "2021-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.Compute/galleries", 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 GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client GalleriesClient) ListByResourceGroupResponder(resp *http.Response) (result GalleryList, err error) { + err = autorest.Respond( + resp, + 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 GalleriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) { + req, err := lastResults.galleryListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "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, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result GalleryListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.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 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.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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", nil, "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 = "2021-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) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/galleryapplications.go b/services/compute/mgmt/2021-07-01/compute/galleryapplications.go new file mode 100644 index 000000000000..987dc05a5725 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/galleryapplications.go @@ -0,0 +1,482 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// GalleryApplicationsClient is the compute Client +type GalleryApplicationsClient struct { + BaseClient +} + +// NewGalleryApplicationsClient creates an instance of the GalleryApplicationsClient client. +func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClient { + return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient { + return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or 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 +// created. +// galleryApplicationName - the name of the gallery Application Definition to be created or 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 create or update gallery Application operation. +func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (result GalleryApplicationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (*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 = "2021-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters), + autorest.WithJSON(galleryApplication), + 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 GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GalleryApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplication, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a gallery Application. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be +// deleted. +// galleryApplicationName - the name of the gallery Application Definition to be deleted. +func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*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 = "2021-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", 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 GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client GalleryApplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about a gallery Application Definition. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery from which the Application Definitions are to be +// retrieved. +// galleryApplicationName - the name of the gallery Application Definition to be retrieved. +func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplication, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.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, galleryName, galleryApplicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*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 = "2021-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", 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 GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GalleryApplicationsClient) GetResponder(resp *http.Response) (result GalleryApplication, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByGallery list gallery Application Definitions in a gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery from which Application Definitions are to be +// listed. +func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery") + defer func() { + sc := -1 + if result.gal.Response.Response != nil { + sc = result.gal.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByGalleryNextResults + req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", nil, "Failure preparing request") + return + } + + resp, err := client.ListByGallerySender(req) + if err != nil { + result.gal.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure sending request") + return + } + + result.gal, err = client.ListByGalleryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure responding to request") + return + } + if result.gal.hasNextLink() && result.gal.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByGalleryPreparer prepares the ListByGallery request. +func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*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 = "2021-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.Compute/galleries/{galleryName}/applications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByGallerySender sends the ListByGallery request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByGalleryResponder handles the response to the ListByGallery request. The method always +// closes the http.Response Body. +func (client GalleryApplicationsClient) ListByGalleryResponder(resp *http.Response) (result GalleryApplicationList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByGalleryNextResults retrieves the next set of results, if any. +func (client GalleryApplicationsClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryApplicationList) (result GalleryApplicationList, err error) { + req, err := lastResults.galleryApplicationListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByGallerySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByGalleryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required. +func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery") + 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.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.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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", nil, "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 = "2021-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) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go b/services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go new file mode 100644 index 000000000000..16b457b61eb9 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go @@ -0,0 +1,513 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// GalleryApplicationVersionsClient is the compute Client +type GalleryApplicationVersionsClient struct { + BaseClient +} + +// NewGalleryApplicationVersionsClient creates an instance of the GalleryApplicationVersionsClient client. +func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicationVersionsClient { + return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient { + return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or 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 created. +// galleryApplicationVersionName - the name of the gallery Application Version to be created. 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 create or update gallery Application Version +// operation. +func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (result GalleryApplicationVersionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: galleryApplicationVersion, + Constraints: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source.MediaLink", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.ManageActions", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.ManageActions.Install", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.ManageActions.Remove", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("compute.GalleryApplicationVersionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (*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 = "2021-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters), + autorest.WithJSON(galleryApplicationVersion), + 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 GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GalleryApplicationVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete 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 +// resides. +// galleryApplicationVersionName - the name of the gallery Application Version to be deleted. +func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result GalleryApplicationVersionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (*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 = "2021-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", 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 GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client GalleryApplicationVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about 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 +// resides. +// galleryApplicationVersionName - the name of the gallery Application Version to be retrieved. +// expand - the expand expression to apply on the operation. +func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (result GalleryApplicationVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.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, galleryName, galleryApplicationName, galleryApplicationVersionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (*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 = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", 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 GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GalleryApplicationVersionsClient) GetResponder(resp *http.Response) (result GalleryApplicationVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByGalleryApplication list gallery Application Versions in 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 resides. +// galleryApplicationName - the name of the Shared Application Gallery Application Definition from which the +// Application Versions are to be listed. +func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication") + defer func() { + sc := -1 + if result.gavl.Response.Response != nil { + sc = result.gavl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByGalleryApplicationNextResults + req, err := client.ListByGalleryApplicationPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", nil, "Failure preparing request") + return + } + + resp, err := client.ListByGalleryApplicationSender(req) + if err != nil { + result.gavl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure sending request") + return + } + + result.gavl, err = client.ListByGalleryApplicationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure responding to request") + return + } + if result.gavl.hasNextLink() && result.gavl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByGalleryApplicationPreparer prepares the ListByGalleryApplication request. +func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*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 = "2021-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always +// closes the http.Response Body. +func (client GalleryApplicationVersionsClient) ListByGalleryApplicationResponder(resp *http.Response) (result GalleryApplicationVersionList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByGalleryApplicationNextResults retrieves the next set of results, if any. +func (client GalleryApplicationVersionsClient) listByGalleryApplicationNextResults(ctx context.Context, lastResults GalleryApplicationVersionList) (result GalleryApplicationVersionList, err error) { + req, err := lastResults.galleryApplicationVersionListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByGalleryApplicationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByGalleryApplicationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByGalleryApplicationComplete enumerates all values, automatically crossing page boundaries as required. +func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication") + 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.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.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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", nil, "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 = "2021-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) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/galleryimages.go b/services/compute/mgmt/2021-07-01/compute/galleryimages.go new file mode 100644 index 000000000000..7d5b7b20141b --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/galleryimages.go @@ -0,0 +1,489 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// GalleryImagesClient is the compute Client +type GalleryImagesClient struct { + BaseClient +} + +// NewGalleryImagesClient creates an instance of the GalleryImagesClient client. +func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { + return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient { + return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or 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 created. +// galleryImageName - the name of the gallery image definition to be created or 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 create or update gallery image operation. +func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (result GalleryImagesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: galleryImage, + Constraints: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier.Publisher", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "galleryImage.GalleryImageProperties.Identifier.Offer", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "galleryImage.GalleryImageProperties.Identifier.Sku", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("compute.GalleryImagesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (*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 = "2021-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.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters), + autorest.WithJSON(galleryImage), + 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 GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GalleryImagesClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a gallery image. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be deleted. +// galleryImageName - the name of the gallery image definition to be deleted. +func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImagesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*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 = "2021-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.Compute/galleries/{galleryName}/images/{galleryImageName}", 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 GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client GalleryImagesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about a gallery image definition. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery from which the Image Definitions are to be retrieved. +// galleryImageName - the name of the gallery image definition to be retrieved. +func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.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, galleryName, galleryImageName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*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 = "2021-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.Compute/galleries/{galleryName}/images/{galleryImageName}", 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 GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GalleryImagesClient) GetResponder(resp *http.Response) (result GalleryImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByGallery list gallery image definitions in a gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery from which Image Definitions are to be listed. +func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery") + defer func() { + sc := -1 + if result.gil.Response.Response != nil { + sc = result.gil.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByGalleryNextResults + req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", nil, "Failure preparing request") + return + } + + resp, err := client.ListByGallerySender(req) + if err != nil { + result.gil.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure sending request") + return + } + + result.gil, err = client.ListByGalleryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure responding to request") + return + } + if result.gil.hasNextLink() && result.gil.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByGalleryPreparer prepares the ListByGallery request. +func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*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 = "2021-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.Compute/galleries/{galleryName}/images", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByGallerySender sends the ListByGallery request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByGalleryResponder handles the response to the ListByGallery request. The method always +// closes the http.Response Body. +func (client GalleryImagesClient) ListByGalleryResponder(resp *http.Response) (result GalleryImageList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByGalleryNextResults retrieves the next set of results, if any. +func (client GalleryImagesClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryImageList) (result GalleryImageList, err error) { + req, err := lastResults.galleryImageListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByGallerySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByGalleryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required. +func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery") + 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.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.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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", nil, "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 = "2021-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) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/galleryimageversions.go b/services/compute/mgmt/2021-07-01/compute/galleryimageversions.go new file mode 100644 index 000000000000..ca56b99eb5f9 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/galleryimageversions.go @@ -0,0 +1,500 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// GalleryImageVersionsClient is the compute Client +type GalleryImageVersionsClient struct { + BaseClient +} + +// NewGalleryImageVersionsClient creates an instance of the GalleryImageVersionsClient client. +func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsClient { + return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageVersionsClient { + return GalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or 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 created. +// galleryImageVersionName - the name of the gallery image version to be created. 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 create or update gallery image version operation. +func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (result GalleryImageVersionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: galleryImageVersion, + Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (*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 = "2021-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters), + autorest.WithJSON(galleryImageVersion), + 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 GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GalleryImageVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete 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 resides. +// galleryImageVersionName - the name of the gallery image version to be deleted. +func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result GalleryImageVersionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (*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 = "2021-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", 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 GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client GalleryImageVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about 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 resides. +// galleryImageVersionName - the name of the gallery image version to be retrieved. +// expand - the expand expression to apply on the operation. +func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (result GalleryImageVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.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, galleryName, galleryImageName, galleryImageVersionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (*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 = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", 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 GalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GalleryImageVersionsClient) GetResponder(resp *http.Response) (result GalleryImageVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByGalleryImage list gallery image versions in 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 resides. +// galleryImageName - the name of the Shared Image Gallery Image Definition from which the Image Versions are +// to be listed. +func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage") + defer func() { + sc := -1 + if result.givl.Response.Response != nil { + sc = result.givl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByGalleryImageNextResults + req, err := client.ListByGalleryImagePreparer(ctx, resourceGroupName, galleryName, galleryImageName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", nil, "Failure preparing request") + return + } + + resp, err := client.ListByGalleryImageSender(req) + if err != nil { + result.givl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure sending request") + return + } + + result.givl, err = client.ListByGalleryImageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure responding to request") + return + } + if result.givl.hasNextLink() && result.givl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByGalleryImagePreparer prepares the ListByGalleryImage request. +func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*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 = "2021-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByGalleryImageSender sends the ListByGalleryImage request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByGalleryImageResponder handles the response to the ListByGalleryImage request. The method always +// closes the http.Response Body. +func (client GalleryImageVersionsClient) ListByGalleryImageResponder(resp *http.Response) (result GalleryImageVersionList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByGalleryImageNextResults retrieves the next set of results, if any. +func (client GalleryImageVersionsClient) listByGalleryImageNextResults(ctx context.Context, lastResults GalleryImageVersionList) (result GalleryImageVersionList, err error) { + req, err := lastResults.galleryImageVersionListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByGalleryImageSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByGalleryImageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByGalleryImageComplete enumerates all values, automatically crossing page boundaries as required. +func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage") + 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.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.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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", nil, "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 = "2021-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) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go b/services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go new file mode 100644 index 000000000000..8c7863e26e03 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go @@ -0,0 +1,113 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// GallerySharingProfileClient is the compute Client +type GallerySharingProfileClient struct { + BaseClient +} + +// NewGallerySharingProfileClient creates an instance of the GallerySharingProfileClient client. +func NewGallerySharingProfileClient(subscriptionID string) GallerySharingProfileClient { + return NewGallerySharingProfileClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGallerySharingProfileClientWithBaseURI creates an instance of the GallerySharingProfileClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewGallerySharingProfileClientWithBaseURI(baseURI string, subscriptionID string) GallerySharingProfileClient { + return GallerySharingProfileClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Update update sharing profile of a gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery. +// sharingUpdate - parameters supplied to the update gallery sharing profile. +func (client GallerySharingProfileClient) Update(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate) (result GallerySharingProfileUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GallerySharingProfileClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, sharingUpdate) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GallerySharingProfileClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate) (*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 = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share", pathParameters), + autorest.WithJSON(sharingUpdate), + 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 GallerySharingProfileClient) UpdateSender(req *http.Request) (future GallerySharingProfileUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GallerySharingProfileClient) UpdateResponder(resp *http.Response) (result SharingUpdate, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/images.go b/services/compute/mgmt/2021-07-01/compute/images.go new file mode 100644 index 000000000000..363567d56dd9 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/images.go @@ -0,0 +1,580 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ImagesClient is the compute Client +type ImagesClient struct { + BaseClient +} + +// NewImagesClient creates an instance of the ImagesClient client. +func NewImagesClient(subscriptionID string) ImagesClient { + return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewImagesClientWithBaseURI creates an instance of the ImagesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient { + return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update an image. +// Parameters: +// resourceGroupName - the name of the resource group. +// imageName - the name of the image. +// parameters - parameters supplied to the Create Image operation. +func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (result ImagesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, imageName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "imageName": autorest.Encode("path", imageName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/images/{imageName}", 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 ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result Image, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an Image. +// Parameters: +// resourceGroupName - the name of the resource group. +// imageName - the name of the image. +func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string, imageName string) (result ImagesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, imageName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, imageName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "imageName": autorest.Encode("path", imageName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/images/{imageName}", 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 ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ImagesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets an image. +// Parameters: +// resourceGroupName - the name of the resource group. +// imageName - the name of the image. +// expand - the expand expression to apply on the operation. +func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, expand string) (result Image, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.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, imageName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, imageName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "imageName": autorest.Encode("path", imageName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + 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.Compute/images/{imageName}", 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 ImagesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ImagesClient) GetResponder(resp *http.Response) (result Image, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of Images in the subscription. Use nextLink property in the response to get the next page of +// Images. Do this till nextLink is null to fetch all the Images. +func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.List") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", 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 ImagesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ImagesClient) ListResponder(resp *http.Response) (result ImageListResult, err error) { + err = autorest.Respond( + resp, + 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 ImagesClient) listNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) { + req, err := lastResults.imageListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "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, "compute.ImagesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ImagesClient) ListComplete(ctx context.Context) (result ImageListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.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 the list of images under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ImageListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.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, "compute.ImagesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ImagesClient) 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 = "2021-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.Compute/images", 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 ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ImagesClient) ListByResourceGroupResponder(resp *http.Response) (result ImageListResult, err error) { + err = autorest.Respond( + resp, + 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 ImagesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) { + req, err := lastResults.imageListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "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, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ImagesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ImageListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.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 update an image. +// Parameters: +// resourceGroupName - the name of the resource group. +// imageName - the name of the image. +// parameters - parameters supplied to the Update Image operation. +func (client ImagesClient) Update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (result ImagesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, imageName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "imageName": autorest.Encode("path", imageName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/images/{imageName}", 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 ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ImagesClient) UpdateResponder(resp *http.Response) (result Image, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/loganalytics.go b/services/compute/mgmt/2021-07-01/compute/loganalytics.go new file mode 100644 index 000000000000..b8e2920cecac --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/loganalytics.go @@ -0,0 +1,204 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LogAnalyticsClient is the compute Client +type LogAnalyticsClient struct { + BaseClient +} + +// NewLogAnalyticsClient creates an instance of the LogAnalyticsClient client. +func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { + return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient { + return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ExportRequestRateByInterval export logs that show Api requests made by this subscription in the given time window to +// show throttling activities. +// Parameters: +// parameters - parameters supplied to the LogAnalytics getRequestRateByInterval Api. +// location - the location upon which virtual-machine-sizes is queried. +func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context, parameters RequestRateByIntervalInput, location string) (result LogAnalyticsExportRequestRateByIntervalFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportRequestRateByInterval") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.LogAnalyticsClient", "ExportRequestRateByInterval", err.Error()) + } + + req, err := client.ExportRequestRateByIntervalPreparer(ctx, parameters, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure preparing request") + return + } + + result, err = client.ExportRequestRateByIntervalSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure sending request") + return + } + + return +} + +// ExportRequestRateByIntervalPreparer prepares the ExportRequestRateByInterval request. +func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context.Context, parameters RequestRateByIntervalInput, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the +// http.Response Body if it receives an error. +func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ExportRequestRateByIntervalResponder handles the response to the ExportRequestRateByInterval request. The method always +// closes the http.Response Body. +func (client LogAnalyticsClient) ExportRequestRateByIntervalResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ExportThrottledRequests export logs that show total throttled Api requests for this subscription in the given time +// window. +// Parameters: +// parameters - parameters supplied to the LogAnalytics getThrottledRequests Api. +// location - the location upon which virtual-machine-sizes is queried. +func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, parameters ThrottledRequestsInput, location string) (result LogAnalyticsExportThrottledRequestsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportThrottledRequests") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.LogAnalyticsClient", "ExportThrottledRequests", err.Error()) + } + + req, err := client.ExportThrottledRequestsPreparer(ctx, parameters, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure preparing request") + return + } + + result, err = client.ExportThrottledRequestsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request") + return + } + + return +} + +// ExportThrottledRequestsPreparer prepares the ExportThrottledRequests request. +func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Context, parameters ThrottledRequestsInput, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the +// http.Response Body if it receives an error. +func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ExportThrottledRequestsResponder handles the response to the ExportThrottledRequests request. The method always +// closes the http.Response Body. +func (client LogAnalyticsClient) ExportThrottledRequestsResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/models.go b/services/compute/mgmt/2021-07-01/compute/models.go new file mode 100644 index 000000000000..5c694a60b737 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/models.go @@ -0,0 +1,22985 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" + "io" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute" + +// AccessURI a disk access SAS uri. +type AccessURI struct { + autorest.Response `json:"-"` + // AccessSAS - READ-ONLY; A SAS uri for accessing a disk. + AccessSAS *string `json:"accessSAS,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccessURI. +func (au AccessURI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale +// set. +type AdditionalCapabilities struct { + // UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"` + // HibernationEnabled - The flag that enables or disables hibernation capability on the VM. + HibernationEnabled *bool `json:"hibernationEnabled,omitempty"` +} + +// AdditionalUnattendContent specifies additional XML formatted information that can be included in the +// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, +// and the pass in which the content is applied. +type AdditionalUnattendContent struct { + // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'PassNamesOobeSystem' + PassName PassNames `json:"passName,omitempty"` + // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'ComponentNamesMicrosoftWindowsShellSetup' + ComponentName ComponentNames `json:"componentName,omitempty"` + // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'SettingNamesAutoLogon', 'SettingNamesFirstLogonCommands' + SettingName SettingNames `json:"settingName,omitempty"` + // Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. + Content *string `json:"content,omitempty"` +} + +// APIEntityReference the API entity reference. +type APIEntityReference struct { + // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + ID *string `json:"id,omitempty"` +} + +// APIError api error. +type APIError struct { + // Details - The Api error details + Details *[]APIErrorBase `json:"details,omitempty"` + // Innererror - The Api inner error + Innererror *InnerError `json:"innererror,omitempty"` + // Code - The error code. + Code *string `json:"code,omitempty"` + // Target - The target of the particular error. + Target *string `json:"target,omitempty"` + // Message - The error message. + Message *string `json:"message,omitempty"` +} + +// APIErrorBase api error base. +type APIErrorBase struct { + // Code - The error code. + Code *string `json:"code,omitempty"` + // Target - The target of the particular error. + Target *string `json:"target,omitempty"` + // Message - The error message. + Message *string `json:"message,omitempty"` +} + +// ApplicationProfile contains the list of gallery applications that should be made available to the +// VM/VMSS +type ApplicationProfile struct { + // GalleryApplications - Specifies the gallery applications that should be made available to the VM/VMSS + GalleryApplications *[]VMGalleryApplication `json:"galleryApplications,omitempty"` +} + +// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade. +type AutomaticOSUpgradePolicy struct { + // EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.

If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. + EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"` + // DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false. + DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"` +} + +// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image. +type AutomaticOSUpgradeProperties struct { + // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image. + AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"` +} + +// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual +// machine scale set. +type AutomaticRepairsPolicy struct { + // Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. + Enabled *bool `json:"enabled,omitempty"` + // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M). + GracePeriod *string `json:"gracePeriod,omitempty"` +} + +// AvailabilitySet specifies information about the availability set that the virtual machine should be +// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to +// maximize availability. For more information about availability sets, see [Availability sets +// overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

For +// more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in +// Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

Currently, a +// VM can only be added to availability set at creation time. An existing VM cannot be added to an +// availability set. +type AvailabilitySet struct { + autorest.Response `json:"-"` + *AvailabilitySetProperties `json:"properties,omitempty"` + // Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. + Sku *Sku `json:"sku,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 AvailabilitySet. +func (as AvailabilitySet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if as.AvailabilitySetProperties != nil { + objectMap["properties"] = as.AvailabilitySetProperties + } + if as.Sku != nil { + objectMap["sku"] = as.Sku + } + if as.Location != nil { + objectMap["location"] = as.Location + } + if as.Tags != nil { + objectMap["tags"] = as.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct. +func (as *AvailabilitySet) 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 availabilitySetProperties AvailabilitySetProperties + err = json.Unmarshal(*v, &availabilitySetProperties) + if err != nil { + return err + } + as.AvailabilitySetProperties = &availabilitySetProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + as.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + as.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + as.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + as.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + as.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + as.Tags = tags + } + } + } + + return nil +} + +// AvailabilitySetListResult the List Availability Set operation response. +type AvailabilitySetListResult struct { + autorest.Response `json:"-"` + // Value - The list of availability sets + Value *[]AvailabilitySet `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets. + NextLink *string `json:"nextLink,omitempty"` +} + +// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values. +type AvailabilitySetListResultIterator struct { + i int + page AvailabilitySetListResultPage +} + +// 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 *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.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 *AvailabilitySetListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailabilitySetListResultIterator) 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 AvailabilitySetListResultIterator) Response() AvailabilitySetListResult { + 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 AvailabilitySetListResultIterator) Value() AvailabilitySet { + if !iter.page.NotDone() { + return AvailabilitySet{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AvailabilitySetListResultIterator type. +func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator { + return AvailabilitySetListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aslr AvailabilitySetListResult) IsEmpty() bool { + return aslr.Value == nil || len(*aslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (aslr AvailabilitySetListResult) hasNextLink() bool { + return aslr.NextLink != nil && len(*aslr.NextLink) != 0 +} + +// availabilitySetListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) { + if !aslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aslr.NextLink))) +} + +// AvailabilitySetListResultPage contains a page of AvailabilitySet values. +type AvailabilitySetListResultPage struct { + fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error) + aslr AvailabilitySetListResult +} + +// 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 *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.aslr) + if err != nil { + return err + } + page.aslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AvailabilitySetListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailabilitySetListResultPage) NotDone() bool { + return !page.aslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult { + return page.aslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailabilitySetListResultPage) Values() []AvailabilitySet { + if page.aslr.IsEmpty() { + return nil + } + return *page.aslr.Value +} + +// Creates a new instance of the AvailabilitySetListResultPage type. +func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage { + return AvailabilitySetListResultPage{ + fn: getNextPage, + aslr: cur, + } +} + +// AvailabilitySetProperties the instance view of a resource. +type AvailabilitySetProperties struct { + // PlatformUpdateDomainCount - Update Domain count. + PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"` + // PlatformFaultDomainCount - Fault Domain count. + PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` + // VirtualMachines - A list of references to all virtual machines in the availability set. + VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` + // Statuses - READ-ONLY; The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for AvailabilitySetProperties. +func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asp.PlatformUpdateDomainCount != nil { + objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount + } + if asp.PlatformFaultDomainCount != nil { + objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount + } + if asp.VirtualMachines != nil { + objectMap["virtualMachines"] = asp.VirtualMachines + } + if asp.ProximityPlacementGroup != nil { + objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup + } + return json.Marshal(objectMap) +} + +// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should +// be assigned to. Only tags may be updated. +type AvailabilitySetUpdate struct { + *AvailabilitySetProperties `json:"properties,omitempty"` + // Sku - Sku of the availability set + Sku *Sku `json:"sku,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for AvailabilitySetUpdate. +func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asu.AvailabilitySetProperties != nil { + objectMap["properties"] = asu.AvailabilitySetProperties + } + if asu.Sku != nil { + objectMap["sku"] = asu.Sku + } + if asu.Tags != nil { + objectMap["tags"] = asu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct. +func (asu *AvailabilitySetUpdate) 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 availabilitySetProperties AvailabilitySetProperties + err = json.Unmarshal(*v, &availabilitySetProperties) + if err != nil { + return err + } + asu.AvailabilitySetProperties = &availabilitySetProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + asu.Sku = &sku + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + asu.Tags = tags + } + } + } + + return nil +} + +// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch +// summary. +type AvailablePatchSummary struct { + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + AssessmentActivityID *string `json:"assessmentActivityId,omitempty"` + // RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + RebootPending *bool `json:"rebootPending,omitempty"` + // CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed. + CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"` + // OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security. + OtherPatchCount *int32 `json:"otherPatchCount,omitempty"` + // StartTime - READ-ONLY; The UTC timestamp when the operation began. + StartTime *date.Time `json:"startTime,omitempty"` + // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for AvailablePatchSummary. +func (aps AvailablePatchSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// 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 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"` +} + +// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and +// Screenshot to diagnose VM status.

You can easily view the output of your console log.

+// Azure also enables you to see a screenshot of the VM from the hypervisor. +type BootDiagnostics struct { + // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine. + Enabled *bool `json:"enabled,omitempty"` + // StorageURI - Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + StorageURI *string `json:"storageUri,omitempty"` +} + +// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics. +type BootDiagnosticsInstanceView struct { + // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` + // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` + // Status - READ-ONLY; The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + Status *InstanceViewStatus `json:"status,omitempty"` +} + +// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView. +func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservation specifies information about the capacity reservation. +type CapacityReservation struct { + autorest.Response `json:"-"` + *CapacityReservationProperties `json:"properties,omitempty"` + // Sku - SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. + Sku *Sku `json:"sku,omitempty"` + // Zones - Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. + Zones *[]string `json:"zones,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 CapacityReservation. +func (cr CapacityReservation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cr.CapacityReservationProperties != nil { + objectMap["properties"] = cr.CapacityReservationProperties + } + if cr.Sku != nil { + objectMap["sku"] = cr.Sku + } + if cr.Zones != nil { + objectMap["zones"] = cr.Zones + } + if cr.Location != nil { + objectMap["location"] = cr.Location + } + if cr.Tags != nil { + objectMap["tags"] = cr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservation struct. +func (cr *CapacityReservation) 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 capacityReservationProperties CapacityReservationProperties + err = json.Unmarshal(*v, &capacityReservationProperties) + if err != nil { + return err + } + cr.CapacityReservationProperties = &capacityReservationProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + cr.Sku = &sku + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + cr.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cr.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationGroup specifies information about the capacity reservation group that the capacity +// reservations should be assigned to.

Currently, a capacity reservation can only be added to a +// capacity reservation group at creation time. An existing capacity reservation cannot be added or moved +// to another capacity reservation group. +type CapacityReservationGroup struct { + autorest.Response `json:"-"` + *CapacityReservationGroupProperties `json:"properties,omitempty"` + // Zones - Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones. + Zones *[]string `json:"zones,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 CapacityReservationGroup. +func (crg CapacityReservationGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if crg.CapacityReservationGroupProperties != nil { + objectMap["properties"] = crg.CapacityReservationGroupProperties + } + if crg.Zones != nil { + objectMap["zones"] = crg.Zones + } + if crg.Location != nil { + objectMap["location"] = crg.Location + } + if crg.Tags != nil { + objectMap["tags"] = crg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservationGroup struct. +func (crg *CapacityReservationGroup) 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 capacityReservationGroupProperties CapacityReservationGroupProperties + err = json.Unmarshal(*v, &capacityReservationGroupProperties) + if err != nil { + return err + } + crg.CapacityReservationGroupProperties = &capacityReservationGroupProperties + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + crg.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + crg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + crg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + crg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + crg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + crg.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationGroupInstanceView ... +type CapacityReservationGroupInstanceView struct { + // CapacityReservations - READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group. + CapacityReservations *[]CapacityReservationInstanceViewWithName `json:"capacityReservations,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroupInstanceView. +func (crgiv CapacityReservationGroupInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservationGroupListResult the List capacity reservation group with resource group response. +type CapacityReservationGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of capacity reservation groups + Value *[]CapacityReservationGroup `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of capacity reservation groups. Call ListNext() with this URI to fetch the next page of capacity reservation groups. + NextLink *string `json:"nextLink,omitempty"` +} + +// CapacityReservationGroupListResultIterator provides access to a complete listing of +// CapacityReservationGroup values. +type CapacityReservationGroupListResultIterator struct { + i int + page CapacityReservationGroupListResultPage +} + +// 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 *CapacityReservationGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupListResultIterator.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 *CapacityReservationGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CapacityReservationGroupListResultIterator) 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 CapacityReservationGroupListResultIterator) Response() CapacityReservationGroupListResult { + 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 CapacityReservationGroupListResultIterator) Value() CapacityReservationGroup { + if !iter.page.NotDone() { + return CapacityReservationGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CapacityReservationGroupListResultIterator type. +func NewCapacityReservationGroupListResultIterator(page CapacityReservationGroupListResultPage) CapacityReservationGroupListResultIterator { + return CapacityReservationGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (crglr CapacityReservationGroupListResult) IsEmpty() bool { + return crglr.Value == nil || len(*crglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (crglr CapacityReservationGroupListResult) hasNextLink() bool { + return crglr.NextLink != nil && len(*crglr.NextLink) != 0 +} + +// capacityReservationGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (crglr CapacityReservationGroupListResult) capacityReservationGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !crglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(crglr.NextLink))) +} + +// CapacityReservationGroupListResultPage contains a page of CapacityReservationGroup values. +type CapacityReservationGroupListResultPage struct { + fn func(context.Context, CapacityReservationGroupListResult) (CapacityReservationGroupListResult, error) + crglr CapacityReservationGroupListResult +} + +// 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 *CapacityReservationGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.crglr) + if err != nil { + return err + } + page.crglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *CapacityReservationGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CapacityReservationGroupListResultPage) NotDone() bool { + return !page.crglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CapacityReservationGroupListResultPage) Response() CapacityReservationGroupListResult { + return page.crglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CapacityReservationGroupListResultPage) Values() []CapacityReservationGroup { + if page.crglr.IsEmpty() { + return nil + } + return *page.crglr.Value +} + +// Creates a new instance of the CapacityReservationGroupListResultPage type. +func NewCapacityReservationGroupListResultPage(cur CapacityReservationGroupListResult, getNextPage func(context.Context, CapacityReservationGroupListResult) (CapacityReservationGroupListResult, error)) CapacityReservationGroupListResultPage { + return CapacityReservationGroupListResultPage{ + fn: getNextPage, + crglr: cur, + } +} + +// CapacityReservationGroupProperties capacity reservation group Properties. +type CapacityReservationGroupProperties struct { + // CapacityReservations - READ-ONLY; A list of all capacity reservation resource ids that belong to capacity reservation group. + CapacityReservations *[]SubResourceReadOnly `json:"capacityReservations,omitempty"` + // VirtualMachinesAssociated - READ-ONLY; A list of references to all virtual machines associated to the capacity reservation group. + VirtualMachinesAssociated *[]SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty"` + // InstanceView - READ-ONLY; The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group. + InstanceView *CapacityReservationGroupInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroupProperties. +func (crgp CapacityReservationGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservationGroupUpdate specifies information about the capacity reservation group. Only tags can +// be updated. +type CapacityReservationGroupUpdate struct { + *CapacityReservationGroupProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroupUpdate. +func (crgu CapacityReservationGroupUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if crgu.CapacityReservationGroupProperties != nil { + objectMap["properties"] = crgu.CapacityReservationGroupProperties + } + if crgu.Tags != nil { + objectMap["tags"] = crgu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservationGroupUpdate struct. +func (crgu *CapacityReservationGroupUpdate) 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 capacityReservationGroupProperties CapacityReservationGroupProperties + err = json.Unmarshal(*v, &capacityReservationGroupProperties) + if err != nil { + return err + } + crgu.CapacityReservationGroupProperties = &capacityReservationGroupProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + crgu.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationInstanceView the instance view of a capacity reservation that provides as snapshot of +// the runtime properties of the capacity reservation that is managed by the platform and can change +// outside of control plane operations. +type CapacityReservationInstanceView struct { + // UtilizationInfo - Unutilized capacity of the capacity reservation. + UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// CapacityReservationInstanceViewWithName the instance view of a capacity reservation that includes the +// name of the capacity reservation. It is used for the response to the instance view of a capacity +// reservation group. +type CapacityReservationInstanceViewWithName struct { + // Name - READ-ONLY; The name of the capacity reservation. + Name *string `json:"name,omitempty"` + // UtilizationInfo - Unutilized capacity of the capacity reservation. + UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationInstanceViewWithName. +func (crivwn CapacityReservationInstanceViewWithName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if crivwn.UtilizationInfo != nil { + objectMap["utilizationInfo"] = crivwn.UtilizationInfo + } + if crivwn.Statuses != nil { + objectMap["statuses"] = crivwn.Statuses + } + return json.Marshal(objectMap) +} + +// CapacityReservationListResult the list capacity reservation operation response. +type CapacityReservationListResult struct { + autorest.Response `json:"-"` + // Value - The list of capacity reservations + Value *[]CapacityReservation `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of capacity reservations. Call ListNext() with this URI to fetch the next page of capacity reservations. + NextLink *string `json:"nextLink,omitempty"` +} + +// CapacityReservationListResultIterator provides access to a complete listing of CapacityReservation +// values. +type CapacityReservationListResultIterator struct { + i int + page CapacityReservationListResultPage +} + +// 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 *CapacityReservationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationListResultIterator.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 *CapacityReservationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CapacityReservationListResultIterator) 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 CapacityReservationListResultIterator) Response() CapacityReservationListResult { + 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 CapacityReservationListResultIterator) Value() CapacityReservation { + if !iter.page.NotDone() { + return CapacityReservation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CapacityReservationListResultIterator type. +func NewCapacityReservationListResultIterator(page CapacityReservationListResultPage) CapacityReservationListResultIterator { + return CapacityReservationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (crlr CapacityReservationListResult) IsEmpty() bool { + return crlr.Value == nil || len(*crlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (crlr CapacityReservationListResult) hasNextLink() bool { + return crlr.NextLink != nil && len(*crlr.NextLink) != 0 +} + +// capacityReservationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (crlr CapacityReservationListResult) capacityReservationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !crlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(crlr.NextLink))) +} + +// CapacityReservationListResultPage contains a page of CapacityReservation values. +type CapacityReservationListResultPage struct { + fn func(context.Context, CapacityReservationListResult) (CapacityReservationListResult, error) + crlr CapacityReservationListResult +} + +// 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 *CapacityReservationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.crlr) + if err != nil { + return err + } + page.crlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *CapacityReservationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CapacityReservationListResultPage) NotDone() bool { + return !page.crlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CapacityReservationListResultPage) Response() CapacityReservationListResult { + return page.crlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CapacityReservationListResultPage) Values() []CapacityReservation { + if page.crlr.IsEmpty() { + return nil + } + return *page.crlr.Value +} + +// Creates a new instance of the CapacityReservationListResultPage type. +func NewCapacityReservationListResultPage(cur CapacityReservationListResult, getNextPage func(context.Context, CapacityReservationListResult) (CapacityReservationListResult, error)) CapacityReservationListResultPage { + return CapacityReservationListResultPage{ + fn: getNextPage, + crlr: cur, + } +} + +// CapacityReservationProfile the parameters of a capacity reservation Profile. +type CapacityReservationProfile struct { + // CapacityReservationGroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details. + CapacityReservationGroup *SubResource `json:"capacityReservationGroup,omitempty"` +} + +// CapacityReservationProperties properties of the Capacity reservation. +type CapacityReservationProperties struct { + // ReservationID - READ-ONLY; A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource. + ReservationID *string `json:"reservationId,omitempty"` + // VirtualMachinesAssociated - READ-ONLY; A list of all virtual machine resource ids that are associated with the capacity reservation. + VirtualMachinesAssociated *[]SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty"` + // ProvisioningTime - READ-ONLY; The date time when the capacity reservation was last updated. + ProvisioningTime *date.Time `json:"provisioningTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The Capacity reservation instance view. + InstanceView *CapacityReservationInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationProperties. +func (crp CapacityReservationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CapacityReservationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CapacityReservationsClient) (CapacityReservation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CapacityReservationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CapacityReservationsCreateOrUpdateFuture.Result. +func (future *CapacityReservationsCreateOrUpdateFuture) result(client CapacityReservationsClient) (cr CapacityReservation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent { + cr, err = client.CreateOrUpdateResponder(cr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request") + } + } + return +} + +// CapacityReservationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CapacityReservationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CapacityReservationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CapacityReservationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CapacityReservationsDeleteFuture.Result. +func (future *CapacityReservationsDeleteFuture) result(client CapacityReservationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// CapacityReservationsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CapacityReservationsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CapacityReservationsClient) (CapacityReservation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CapacityReservationsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CapacityReservationsUpdateFuture.Result. +func (future *CapacityReservationsUpdateFuture) result(client CapacityReservationsClient) (cr CapacityReservation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent { + cr, err = client.UpdateResponder(cr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsUpdateFuture", "Result", cr.Response.Response, "Failure responding to request") + } + } + return +} + +// CapacityReservationUpdate specifies information about the capacity reservation. Only tags and +// sku.capacity can be updated. +type CapacityReservationUpdate struct { + *CapacityReservationProperties `json:"properties,omitempty"` + // Sku - SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. + Sku *Sku `json:"sku,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationUpdate. +func (cru CapacityReservationUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cru.CapacityReservationProperties != nil { + objectMap["properties"] = cru.CapacityReservationProperties + } + if cru.Sku != nil { + objectMap["sku"] = cru.Sku + } + if cru.Tags != nil { + objectMap["tags"] = cru.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservationUpdate struct. +func (cru *CapacityReservationUpdate) 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 capacityReservationProperties CapacityReservationProperties + err = json.Unmarshal(*v, &capacityReservationProperties) + if err != nil { + return err + } + cru.CapacityReservationProperties = &capacityReservationProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + cru.Sku = &sku + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cru.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationUtilization represents the capacity reservation utilization in terms of resources +// allocated. +type CapacityReservationUtilization struct { + // VirtualMachinesAllocated - READ-ONLY; A list of all virtual machines resource ids allocated against the capacity reservation. + VirtualMachinesAllocated *[]SubResourceReadOnly `json:"virtualMachinesAllocated,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationUtilization. +func (cru CapacityReservationUtilization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CloudError an error response from the Compute service. +type CloudError struct { + Error *APIError `json:"error,omitempty"` +} + +// CloudService describes the cloud service. +type CloudService struct { + autorest.Response `json:"-"` + // 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"` + Properties *CloudServiceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CloudService. +func (cs CloudService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cs.Location != nil { + objectMap["location"] = cs.Location + } + if cs.Tags != nil { + objectMap["tags"] = cs.Tags + } + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } + return json.Marshal(objectMap) +} + +// CloudServiceExtensionProfile describes a cloud service extension profile. +type CloudServiceExtensionProfile struct { + // Extensions - List of extensions for the cloud service. + Extensions *[]Extension `json:"extensions,omitempty"` +} + +// CloudServiceExtensionProperties extension Properties. +type CloudServiceExtensionProperties struct { + // Publisher - The name of the extension handler publisher. + Publisher *string `json:"publisher,omitempty"` + // Type - Specifies the type of the extension. + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // AutoUpgradeMinorVersion - Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // Settings - Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. + Settings *string `json:"settings,omitempty"` + // ProtectedSettings - Protected settings for the extension which are encrypted before sent to the role instance. + ProtectedSettings *string `json:"protectedSettings,omitempty"` + ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference `json:"protectedSettingsFromKeyVault,omitempty"` + // ForceUpdateTag - Tag to force apply the provided public and protected settings. + // Changing the tag value allows for re-running the extension without changing any of the public or protected settings. + // If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. + // If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and + // it is up to handler implementation whether to re-run it or not + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // RolesAppliedTo - Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. + RolesAppliedTo *[]string `json:"rolesAppliedTo,omitempty"` +} + +// MarshalJSON is the custom marshaler for CloudServiceExtensionProperties. +func (csep CloudServiceExtensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csep.Publisher != nil { + objectMap["publisher"] = csep.Publisher + } + if csep.Type != nil { + objectMap["type"] = csep.Type + } + if csep.TypeHandlerVersion != nil { + objectMap["typeHandlerVersion"] = csep.TypeHandlerVersion + } + if csep.AutoUpgradeMinorVersion != nil { + objectMap["autoUpgradeMinorVersion"] = csep.AutoUpgradeMinorVersion + } + if csep.Settings != nil { + objectMap["settings"] = csep.Settings + } + if csep.ProtectedSettings != nil { + objectMap["protectedSettings"] = csep.ProtectedSettings + } + if csep.ProtectedSettingsFromKeyVault != nil { + objectMap["protectedSettingsFromKeyVault"] = csep.ProtectedSettingsFromKeyVault + } + if csep.ForceUpdateTag != nil { + objectMap["forceUpdateTag"] = csep.ForceUpdateTag + } + if csep.RolesAppliedTo != nil { + objectMap["rolesAppliedTo"] = csep.RolesAppliedTo + } + return json.Marshal(objectMap) +} + +// CloudServiceInstanceView instanceView of CloudService as a whole +type CloudServiceInstanceView struct { + autorest.Response `json:"-"` + RoleInstance *InstanceViewStatusesSummary `json:"roleInstance,omitempty"` + // SdkVersion - READ-ONLY; The version of the SDK that was used to generate the package for the cloud service. + SdkVersion *string `json:"sdkVersion,omitempty"` + // PrivateIds - READ-ONLY; Specifies a list of unique identifiers generated internally for the cloud service.

NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. + PrivateIds *[]string `json:"privateIds,omitempty"` + // Statuses - READ-ONLY + Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for CloudServiceInstanceView. +func (csiv CloudServiceInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csiv.RoleInstance != nil { + objectMap["roleInstance"] = csiv.RoleInstance + } + return json.Marshal(objectMap) +} + +// CloudServiceListResult ... +type CloudServiceListResult struct { + autorest.Response `json:"-"` + Value *[]CloudService `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// CloudServiceListResultIterator provides access to a complete listing of CloudService values. +type CloudServiceListResultIterator struct { + i int + page CloudServiceListResultPage +} + +// 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 *CloudServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultIterator.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 *CloudServiceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CloudServiceListResultIterator) 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 CloudServiceListResultIterator) Response() CloudServiceListResult { + 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 CloudServiceListResultIterator) Value() CloudService { + if !iter.page.NotDone() { + return CloudService{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CloudServiceListResultIterator type. +func NewCloudServiceListResultIterator(page CloudServiceListResultPage) CloudServiceListResultIterator { + return CloudServiceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cslr CloudServiceListResult) IsEmpty() bool { + return cslr.Value == nil || len(*cslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (cslr CloudServiceListResult) hasNextLink() bool { + return cslr.NextLink != nil && len(*cslr.NextLink) != 0 +} + +// cloudServiceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cslr CloudServiceListResult) cloudServiceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !cslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cslr.NextLink))) +} + +// CloudServiceListResultPage contains a page of CloudService values. +type CloudServiceListResultPage struct { + fn func(context.Context, CloudServiceListResult) (CloudServiceListResult, error) + cslr CloudServiceListResult +} + +// 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 *CloudServiceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.cslr) + if err != nil { + return err + } + page.cslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *CloudServiceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CloudServiceListResultPage) NotDone() bool { + return !page.cslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CloudServiceListResultPage) Response() CloudServiceListResult { + return page.cslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CloudServiceListResultPage) Values() []CloudService { + if page.cslr.IsEmpty() { + return nil + } + return *page.cslr.Value +} + +// Creates a new instance of the CloudServiceListResultPage type. +func NewCloudServiceListResultPage(cur CloudServiceListResult, getNextPage func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)) CloudServiceListResultPage { + return CloudServiceListResultPage{ + fn: getNextPage, + cslr: cur, + } +} + +// CloudServiceNetworkProfile network Profile for the cloud service. +type CloudServiceNetworkProfile struct { + // LoadBalancerConfigurations - List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. + LoadBalancerConfigurations *[]LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"` + // SwappableCloudService - The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. + SwappableCloudService *SubResource `json:"swappableCloudService,omitempty"` +} + +// CloudServiceOsProfile describes the OS profile for the cloud service. +type CloudServiceOsProfile struct { + // Secrets - Specifies set of certificates that should be installed onto the role instances. + Secrets *[]CloudServiceVaultSecretGroup `json:"secrets,omitempty"` +} + +// CloudServiceProperties cloud service properties +type CloudServiceProperties struct { + // PackageURL - Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + // This is a write-only property and is not returned in GET calls. + PackageURL *string `json:"packageUrl,omitempty"` + // Configuration - Specifies the XML service configuration (.cscfg) for the cloud service. + Configuration *string `json:"configuration,omitempty"` + // ConfigurationURL - Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + // This is a write-only property and is not returned in GET calls. + ConfigurationURL *string `json:"configurationUrl,omitempty"` + // StartCloudService - (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. + // If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. + StartCloudService *bool `json:"startCloudService,omitempty"` + // AllowModelOverride - (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. + // The default value is `false`. + AllowModelOverride *bool `json:"allowModelOverride,omitempty"` + // UpgradeMode - Possible values include: 'CloudServiceUpgradeModeAuto', 'CloudServiceUpgradeModeManual', 'CloudServiceUpgradeModeSimultaneous' + UpgradeMode CloudServiceUpgradeMode `json:"upgradeMode,omitempty"` + RoleProfile *CloudServiceRoleProfile `json:"roleProfile,omitempty"` + OsProfile *CloudServiceOsProfile `json:"osProfile,omitempty"` + NetworkProfile *CloudServiceNetworkProfile `json:"networkProfile,omitempty"` + ExtensionProfile *CloudServiceExtensionProfile `json:"extensionProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // UniqueID - READ-ONLY; The unique identifier for the cloud service. + UniqueID *string `json:"uniqueId,omitempty"` +} + +// MarshalJSON is the custom marshaler for CloudServiceProperties. +func (csp CloudServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csp.PackageURL != nil { + objectMap["packageUrl"] = csp.PackageURL + } + if csp.Configuration != nil { + objectMap["configuration"] = csp.Configuration + } + if csp.ConfigurationURL != nil { + objectMap["configurationUrl"] = csp.ConfigurationURL + } + if csp.StartCloudService != nil { + objectMap["startCloudService"] = csp.StartCloudService + } + if csp.AllowModelOverride != nil { + objectMap["allowModelOverride"] = csp.AllowModelOverride + } + if csp.UpgradeMode != "" { + objectMap["upgradeMode"] = csp.UpgradeMode + } + if csp.RoleProfile != nil { + objectMap["roleProfile"] = csp.RoleProfile + } + if csp.OsProfile != nil { + objectMap["osProfile"] = csp.OsProfile + } + if csp.NetworkProfile != nil { + objectMap["networkProfile"] = csp.NetworkProfile + } + if csp.ExtensionProfile != nil { + objectMap["extensionProfile"] = csp.ExtensionProfile + } + return json.Marshal(objectMap) +} + +// CloudServiceRole describes a role of the cloud service. +type CloudServiceRole struct { + autorest.Response `json:"-"` + // 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; Resource location + Location *string `json:"location,omitempty"` + Sku *CloudServiceRoleSku `json:"sku,omitempty"` + Properties *CloudServiceRoleProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CloudServiceRole. +func (csr CloudServiceRole) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csr.Sku != nil { + objectMap["sku"] = csr.Sku + } + if csr.Properties != nil { + objectMap["properties"] = csr.Properties + } + return json.Marshal(objectMap) +} + +// CloudServiceRoleInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CloudServiceRoleInstancesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServiceRoleInstancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServiceRoleInstancesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServiceRoleInstancesDeleteFuture.Result. +func (future *CloudServiceRoleInstancesDeleteFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServiceRoleInstancesRebuildFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CloudServiceRoleInstancesRebuildFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServiceRoleInstancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServiceRoleInstancesRebuildFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServiceRoleInstancesRebuildFuture.Result. +func (future *CloudServiceRoleInstancesRebuildFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesRebuildFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesRebuildFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServiceRoleInstancesReimageFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CloudServiceRoleInstancesReimageFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServiceRoleInstancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServiceRoleInstancesReimageFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServiceRoleInstancesReimageFuture.Result. +func (future *CloudServiceRoleInstancesReimageFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesReimageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesReimageFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServiceRoleInstancesRestartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CloudServiceRoleInstancesRestartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServiceRoleInstancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServiceRoleInstancesRestartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServiceRoleInstancesRestartFuture.Result. +func (future *CloudServiceRoleInstancesRestartFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesRestartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesRestartFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServiceRoleListResult ... +type CloudServiceRoleListResult struct { + autorest.Response `json:"-"` + Value *[]CloudServiceRole `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// CloudServiceRoleListResultIterator provides access to a complete listing of CloudServiceRole values. +type CloudServiceRoleListResultIterator struct { + i int + page CloudServiceRoleListResultPage +} + +// 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 *CloudServiceRoleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultIterator.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 *CloudServiceRoleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CloudServiceRoleListResultIterator) 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 CloudServiceRoleListResultIterator) Response() CloudServiceRoleListResult { + 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 CloudServiceRoleListResultIterator) Value() CloudServiceRole { + if !iter.page.NotDone() { + return CloudServiceRole{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CloudServiceRoleListResultIterator type. +func NewCloudServiceRoleListResultIterator(page CloudServiceRoleListResultPage) CloudServiceRoleListResultIterator { + return CloudServiceRoleListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (csrlr CloudServiceRoleListResult) IsEmpty() bool { + return csrlr.Value == nil || len(*csrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (csrlr CloudServiceRoleListResult) hasNextLink() bool { + return csrlr.NextLink != nil && len(*csrlr.NextLink) != 0 +} + +// cloudServiceRoleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (csrlr CloudServiceRoleListResult) cloudServiceRoleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !csrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(csrlr.NextLink))) +} + +// CloudServiceRoleListResultPage contains a page of CloudServiceRole values. +type CloudServiceRoleListResultPage struct { + fn func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error) + csrlr CloudServiceRoleListResult +} + +// 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 *CloudServiceRoleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.csrlr) + if err != nil { + return err + } + page.csrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *CloudServiceRoleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CloudServiceRoleListResultPage) NotDone() bool { + return !page.csrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CloudServiceRoleListResultPage) Response() CloudServiceRoleListResult { + return page.csrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CloudServiceRoleListResultPage) Values() []CloudServiceRole { + if page.csrlr.IsEmpty() { + return nil + } + return *page.csrlr.Value +} + +// Creates a new instance of the CloudServiceRoleListResultPage type. +func NewCloudServiceRoleListResultPage(cur CloudServiceRoleListResult, getNextPage func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)) CloudServiceRoleListResultPage { + return CloudServiceRoleListResultPage{ + fn: getNextPage, + csrlr: cur, + } +} + +// CloudServiceRoleProfile describes the role profile for the cloud service. +type CloudServiceRoleProfile struct { + // Roles - List of roles for the cloud service. + Roles *[]CloudServiceRoleProfileProperties `json:"roles,omitempty"` +} + +// CloudServiceRoleProfileProperties describes the role properties. +type CloudServiceRoleProfileProperties struct { + // Name - Resource name. + Name *string `json:"name,omitempty"` + Sku *CloudServiceRoleSku `json:"sku,omitempty"` +} + +// CloudServiceRoleProperties ... +type CloudServiceRoleProperties struct { + // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a cloud service role. + UniqueID *string `json:"uniqueId,omitempty"` +} + +// MarshalJSON is the custom marshaler for CloudServiceRoleProperties. +func (csrp CloudServiceRoleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CloudServiceRoleSku describes the cloud service role sku. +type CloudServiceRoleSku struct { + // Name - The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku. + Name *string `json:"name,omitempty"` + // Tier - Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic** + Tier *string `json:"tier,omitempty"` + // Capacity - Specifies the number of role instances in the cloud service. + Capacity *int64 `json:"capacity,omitempty"` +} + +// CloudServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CloudServicesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (CloudService, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesCreateOrUpdateFuture.Result. +func (future *CloudServicesCreateOrUpdateFuture) result(client CloudServicesClient) (cs CloudService, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cs.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { + cs, err = client.CreateOrUpdateResponder(cs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request") + } + } + return +} + +// CloudServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesDeleteFuture.Result. +func (future *CloudServicesDeleteFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesDeleteInstancesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CloudServicesDeleteInstancesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesDeleteInstancesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesDeleteInstancesFuture.Result. +func (future *CloudServicesDeleteInstancesFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesDeleteInstancesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesDeleteInstancesFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesPowerOffFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesPowerOffFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesPowerOffFuture.Result. +func (future *CloudServicesPowerOffFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesPowerOffFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesPowerOffFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesRebuildFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesRebuildFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesRebuildFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesRebuildFuture.Result. +func (future *CloudServicesRebuildFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesRebuildFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesRebuildFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesReimageFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesReimageFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesReimageFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesReimageFuture.Result. +func (future *CloudServicesReimageFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesReimageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesReimageFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesRestartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesRestartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesRestartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesRestartFuture.Result. +func (future *CloudServicesRestartFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesRestartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesRestartFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesStartFuture.Result. +func (future *CloudServicesStartFuture) result(client CloudServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesStartFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesUpdateDomainWalkUpdateDomainFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type CloudServicesUpdateDomainWalkUpdateDomainFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesUpdateDomainClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesUpdateDomainWalkUpdateDomainFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesUpdateDomainWalkUpdateDomainFuture.Result. +func (future *CloudServicesUpdateDomainWalkUpdateDomainFuture) result(client CloudServicesUpdateDomainClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainWalkUpdateDomainFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesUpdateDomainWalkUpdateDomainFuture") + return + } + ar.Response = future.Response() + return +} + +// CloudServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CloudServicesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CloudServicesClient) (CloudService, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CloudServicesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CloudServicesUpdateFuture.Result. +func (future *CloudServicesUpdateFuture) result(client CloudServicesClient) (cs CloudService, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cs.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CloudServicesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { + cs, err = client.UpdateResponder(cs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateFuture", "Result", cs.Response.Response, "Failure responding to request") + } + } + return +} + +// CloudServiceUpdate ... +type CloudServiceUpdate struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CloudServiceUpdate. +func (csu CloudServiceUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csu.Tags != nil { + objectMap["tags"] = csu.Tags + } + return json.Marshal(objectMap) +} + +// CloudServiceVaultAndSecretReference ... +type CloudServiceVaultAndSecretReference struct { + SourceVault *SubResource `json:"sourceVault,omitempty"` + SecretURL *string `json:"secretUrl,omitempty"` +} + +// CloudServiceVaultCertificate describes a single certificate reference in a Key Vault, and where the +// certificate should reside on the role instance. +type CloudServiceVaultCertificate struct { + // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. + CertificateURL *string `json:"certificateUrl,omitempty"` +} + +// CloudServiceVaultSecretGroup describes a set of certificates which are all in the same Key Vault. +type CloudServiceVaultSecretGroup struct { + // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates. + SourceVault *SubResource `json:"sourceVault,omitempty"` + // VaultCertificates - The list of key vault references in SourceVault which contain certificates. + VaultCertificates *[]CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"` +} + +// CreationData data used when creating a disk. +type CreationData struct { + // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'DiskCreateOptionEmpty', 'DiskCreateOptionAttach', 'DiskCreateOptionFromImage', 'DiskCreateOptionImport', 'DiskCreateOptionCopy', 'DiskCreateOptionRestore', 'DiskCreateOptionUpload' + CreateOption DiskCreateOption `json:"createOption,omitempty"` + // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // ImageReference - Disk source information. + ImageReference *ImageDiskReference `json:"imageReference,omitempty"` + // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. + GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"` + // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk. + SourceURI *string `json:"sourceUri,omitempty"` + // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource. + SourceUniqueID *string `json:"sourceUniqueId,omitempty"` + // UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). + UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"` + // LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. + LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreationData. +func (cd CreationData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cd.CreateOption != "" { + objectMap["createOption"] = cd.CreateOption + } + if cd.StorageAccountID != nil { + objectMap["storageAccountId"] = cd.StorageAccountID + } + if cd.ImageReference != nil { + objectMap["imageReference"] = cd.ImageReference + } + if cd.GalleryImageReference != nil { + objectMap["galleryImageReference"] = cd.GalleryImageReference + } + if cd.SourceURI != nil { + objectMap["sourceUri"] = cd.SourceURI + } + if cd.SourceResourceID != nil { + objectMap["sourceResourceId"] = cd.SourceResourceID + } + if cd.UploadSizeBytes != nil { + objectMap["uploadSizeBytes"] = cd.UploadSizeBytes + } + if cd.LogicalSectorSize != nil { + objectMap["logicalSectorSize"] = cd.LogicalSectorSize + } + return json.Marshal(objectMap) +} + +// DataDisk describes a data disk. +type DataDisk struct { + // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + Lun *int32 `json:"lun,omitempty"` + // Name - The disk name. + Name *string `json:"name,omitempty"` + // Vhd - The virtual hard disk. + Vhd *VirtualHardDisk `json:"vhd,omitempty"` + // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + Image *VirtualHardDisk `json:"image,omitempty"` + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` + // CreateOption - Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' + CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` + // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // ManagedDisk - The managed disk parameters. + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + // ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset + ToBeDetached *bool `json:"toBeDetached,omitempty"` + // DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` + // DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DetachOption - Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**.

detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior.

This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. Possible values include: 'DiskDetachOptionTypesForceDetach' + DetachOption DiskDetachOptionTypes `json:"detachOption,omitempty"` + // DeleteOption - Specifies whether data disk should be deleted or detached upon VM deletion.

Possible values:

**Delete** If this value is used, the data disk is deleted when VM is deleted.

**Detach** If this value is used, the data disk is retained after VM is deleted.

The default value is set to **detach**. Possible values include: 'DiskDeleteOptionTypesDelete', 'DiskDeleteOptionTypesDetach' + DeleteOption DiskDeleteOptionTypes `json:"deleteOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataDisk. +func (dd DataDisk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dd.Lun != nil { + objectMap["lun"] = dd.Lun + } + if dd.Name != nil { + objectMap["name"] = dd.Name + } + if dd.Vhd != nil { + objectMap["vhd"] = dd.Vhd + } + if dd.Image != nil { + objectMap["image"] = dd.Image + } + if dd.Caching != "" { + objectMap["caching"] = dd.Caching + } + if dd.WriteAcceleratorEnabled != nil { + objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled + } + if dd.CreateOption != "" { + objectMap["createOption"] = dd.CreateOption + } + if dd.DiskSizeGB != nil { + objectMap["diskSizeGB"] = dd.DiskSizeGB + } + if dd.ManagedDisk != nil { + objectMap["managedDisk"] = dd.ManagedDisk + } + if dd.ToBeDetached != nil { + objectMap["toBeDetached"] = dd.ToBeDetached + } + if dd.DetachOption != "" { + objectMap["detachOption"] = dd.DetachOption + } + if dd.DeleteOption != "" { + objectMap["deleteOption"] = dd.DeleteOption + } + return json.Marshal(objectMap) +} + +// DataDiskImage contains the data disk images information. +type DataDiskImage struct { + // Lun - READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + Lun *int32 `json:"lun,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataDiskImage. +func (ddi DataDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DataDiskImageEncryption contains encryption settings for a data disk image. +type DataDiskImageEncryption 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"` + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + +// DedicatedHost specifies information about the Dedicated host. +type DedicatedHost struct { + autorest.Response `json:"-"` + *DedicatedHostProperties `json:"properties,omitempty"` + // Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. + Sku *Sku `json:"sku,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 DedicatedHost. +func (dh DedicatedHost) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dh.DedicatedHostProperties != nil { + objectMap["properties"] = dh.DedicatedHostProperties + } + if dh.Sku != nil { + objectMap["sku"] = dh.Sku + } + if dh.Location != nil { + objectMap["location"] = dh.Location + } + if dh.Tags != nil { + objectMap["tags"] = dh.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct. +func (dh *DedicatedHost) 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 dedicatedHostProperties DedicatedHostProperties + err = json.Unmarshal(*v, &dedicatedHostProperties) + if err != nil { + return err + } + dh.DedicatedHostProperties = &dedicatedHostProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + dh.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dh.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dh.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dh.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dh.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dh.Tags = tags + } + } + } + + return nil +} + +// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM +// size. +type DedicatedHostAllocatableVM struct { + // VMSize - VM size in terms of which the unutilized capacity is represented. + VMSize *string `json:"vmSize,omitempty"` + // Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. + Count *float64 `json:"count,omitempty"` +} + +// DedicatedHostAvailableCapacity dedicated host unutilized capacity. +type DedicatedHostAvailableCapacity struct { + // AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host. + AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"` +} + +// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should +// be assigned to.

Currently, a dedicated host can only be added to a dedicated host group at +// creation time. An existing dedicated host cannot be added to another dedicated host group. +type DedicatedHostGroup struct { + autorest.Response `json:"-"` + *DedicatedHostGroupProperties `json:"properties,omitempty"` + // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. + Zones *[]string `json:"zones,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 DedicatedHostGroup. +func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhg.DedicatedHostGroupProperties != nil { + objectMap["properties"] = dhg.DedicatedHostGroupProperties + } + if dhg.Zones != nil { + objectMap["zones"] = dhg.Zones + } + if dhg.Location != nil { + objectMap["location"] = dhg.Location + } + if dhg.Tags != nil { + objectMap["tags"] = dhg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct. +func (dhg *DedicatedHostGroup) 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 dedicatedHostGroupProperties DedicatedHostGroupProperties + err = json.Unmarshal(*v, &dedicatedHostGroupProperties) + if err != nil { + return err + } + dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + dhg.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dhg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dhg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dhg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dhg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dhg.Tags = tags + } + } + } + + return nil +} + +// DedicatedHostGroupInstanceView ... +type DedicatedHostGroupInstanceView struct { + // Hosts - List of instance view of the dedicated hosts under the dedicated host group. + Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"` +} + +// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response. +type DedicatedHostGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of dedicated host groups + Value *[]DedicatedHostGroup `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups. + NextLink *string `json:"nextLink,omitempty"` +} + +// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values. +type DedicatedHostGroupListResultIterator struct { + i int + page DedicatedHostGroupListResultPage +} + +// 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 *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.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 *DedicatedHostGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DedicatedHostGroupListResultIterator) 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 DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult { + 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 DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup { + if !iter.page.NotDone() { + return DedicatedHostGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DedicatedHostGroupListResultIterator type. +func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator { + return DedicatedHostGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dhglr DedicatedHostGroupListResult) IsEmpty() bool { + return dhglr.Value == nil || len(*dhglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dhglr DedicatedHostGroupListResult) hasNextLink() bool { + return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0 +} + +// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dhglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dhglr.NextLink))) +} + +// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values. +type DedicatedHostGroupListResultPage struct { + fn func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error) + dhglr DedicatedHostGroupListResult +} + +// 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 *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dhglr) + if err != nil { + return err + } + page.dhglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DedicatedHostGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DedicatedHostGroupListResultPage) NotDone() bool { + return !page.dhglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult { + return page.dhglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup { + if page.dhglr.IsEmpty() { + return nil + } + return *page.dhglr.Value +} + +// Creates a new instance of the DedicatedHostGroupListResultPage type. +func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage { + return DedicatedHostGroupListResultPage{ + fn: getNextPage, + dhglr: cur, + } +} + +// DedicatedHostGroupProperties dedicated Host Group Properties. +type DedicatedHostGroupProperties struct { + // PlatformFaultDomainCount - Number of fault domains that the host group can span. + PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` + // Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group. + Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"` + // InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. + InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"` + // SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.

Minimum api-version: 2020-06-01. + SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"` +} + +// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties. +func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhgp.PlatformFaultDomainCount != nil { + objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount + } + if dhgp.SupportAutomaticPlacement != nil { + objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement + } + return json.Marshal(objectMap) +} + +// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host +// should be assigned to. Only tags may be updated. +type DedicatedHostGroupUpdate struct { + *DedicatedHostGroupProperties `json:"properties,omitempty"` + // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. + Zones *[]string `json:"zones,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate. +func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhgu.DedicatedHostGroupProperties != nil { + objectMap["properties"] = dhgu.DedicatedHostGroupProperties + } + if dhgu.Zones != nil { + objectMap["zones"] = dhgu.Zones + } + if dhgu.Tags != nil { + objectMap["tags"] = dhgu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct. +func (dhgu *DedicatedHostGroupUpdate) 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 dedicatedHostGroupProperties DedicatedHostGroupProperties + err = json.Unmarshal(*v, &dedicatedHostGroupProperties) + if err != nil { + return err + } + dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + dhgu.Zones = &zones + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dhgu.Tags = tags + } + } + } + + return nil +} + +// DedicatedHostInstanceView the instance view of a dedicated host. +type DedicatedHostInstanceView struct { + // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. + AssetID *string `json:"assetId,omitempty"` + // AvailableCapacity - Unutilized capacity of the dedicated host. + AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for DedicatedHostInstanceView. +func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhiv.AvailableCapacity != nil { + objectMap["availableCapacity"] = dhiv.AvailableCapacity + } + if dhiv.Statuses != nil { + objectMap["statuses"] = dhiv.Statuses + } + return json.Marshal(objectMap) +} + +// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the +// dedicated host. It is used for the response to the instance view of a dedicated host group. +type DedicatedHostInstanceViewWithName struct { + // Name - READ-ONLY; The name of the dedicated host. + Name *string `json:"name,omitempty"` + // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. + AssetID *string `json:"assetId,omitempty"` + // AvailableCapacity - Unutilized capacity of the dedicated host. + AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName. +func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhivwn.AvailableCapacity != nil { + objectMap["availableCapacity"] = dhivwn.AvailableCapacity + } + if dhivwn.Statuses != nil { + objectMap["statuses"] = dhivwn.Statuses + } + return json.Marshal(objectMap) +} + +// DedicatedHostListResult the list dedicated host operation response. +type DedicatedHostListResult struct { + autorest.Response `json:"-"` + // Value - The list of dedicated hosts + Value *[]DedicatedHost `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts. + NextLink *string `json:"nextLink,omitempty"` +} + +// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values. +type DedicatedHostListResultIterator struct { + i int + page DedicatedHostListResultPage +} + +// 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 *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.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 *DedicatedHostListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DedicatedHostListResultIterator) 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 DedicatedHostListResultIterator) Response() DedicatedHostListResult { + 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 DedicatedHostListResultIterator) Value() DedicatedHost { + if !iter.page.NotDone() { + return DedicatedHost{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DedicatedHostListResultIterator type. +func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator { + return DedicatedHostListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dhlr DedicatedHostListResult) IsEmpty() bool { + return dhlr.Value == nil || len(*dhlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dhlr DedicatedHostListResult) hasNextLink() bool { + return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0 +} + +// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dhlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dhlr.NextLink))) +} + +// DedicatedHostListResultPage contains a page of DedicatedHost values. +type DedicatedHostListResultPage struct { + fn func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error) + dhlr DedicatedHostListResult +} + +// 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 *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dhlr) + if err != nil { + return err + } + page.dhlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DedicatedHostListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DedicatedHostListResultPage) NotDone() bool { + return !page.dhlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DedicatedHostListResultPage) Response() DedicatedHostListResult { + return page.dhlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DedicatedHostListResultPage) Values() []DedicatedHost { + if page.dhlr.IsEmpty() { + return nil + } + return *page.dhlr.Value +} + +// Creates a new instance of the DedicatedHostListResultPage type. +func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage { + return DedicatedHostListResultPage{ + fn: getNextPage, + dhlr: cur, + } +} + +// DedicatedHostProperties properties of the dedicated host. +type DedicatedHostProperties struct { + // PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group. + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. + AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"` + // HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform.

Does not change throughout the lifetime of the host. + HostID *string `json:"hostId,omitempty"` + // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host. + VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"` + // LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

Possible values are:

**None**

**Windows_Server_Hybrid**

**Windows_Server_Perpetual**

Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual' + LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"` + // ProvisioningTime - READ-ONLY; The date when the host was first provisioned. + ProvisioningTime *date.Time `json:"provisioningTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The dedicated host instance view. + InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for DedicatedHostProperties. +func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhp.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain + } + if dhp.AutoReplaceOnFailure != nil { + objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure + } + if dhp.LicenseType != "" { + objectMap["licenseType"] = dhp.LicenseType + } + return json.Marshal(objectMap) +} + +// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DedicatedHostsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DedicatedHostsClient) (DedicatedHost, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result. +func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + dh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent { + dh, err = client.CreateOrUpdateResponder(dh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request") + } + } + return +} + +// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DedicatedHostsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DedicatedHostsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DedicatedHostsDeleteFuture.Result. +func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DedicatedHostsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DedicatedHostsClient) (DedicatedHost, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DedicatedHostsUpdateFuture.Result. +func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + dh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent { + dh, err = client.UpdateResponder(dh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request") + } + } + return +} + +// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and +// licenseType may be updated. +type DedicatedHostUpdate struct { + *DedicatedHostProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DedicatedHostUpdate. +func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhu.DedicatedHostProperties != nil { + objectMap["properties"] = dhu.DedicatedHostProperties + } + if dhu.Tags != nil { + objectMap["tags"] = dhu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct. +func (dhu *DedicatedHostUpdate) 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 dedicatedHostProperties DedicatedHostProperties + err = json.Unmarshal(*v, &dedicatedHostProperties) + if err != nil { + return err + } + dhu.DedicatedHostProperties = &dedicatedHostProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dhu.Tags = tags + } + } + } + + return nil +} + +// DiagnosticsProfile specifies the boot diagnostic settings state.

Minimum api-version: +// 2015-06-15. +type DiagnosticsProfile struct { + // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. + BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"` +} + +// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating +// system disk.

NOTE: The ephemeral disk settings can only be specified for managed disk. +type DiffDiskSettings struct { + // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'DiffDiskOptionsLocal' + Option DiffDiskOptions `json:"option,omitempty"` + // Placement - Specifies the ephemeral disk placement for operating system disk.

Possible values are:

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'DiffDiskPlacementCacheDisk', 'DiffDiskPlacementResourceDisk' + Placement DiffDiskPlacement `json:"placement,omitempty"` +} + +// Disallowed describes the disallowed disk types. +type Disallowed struct { + // DiskTypes - A list of disk types. + DiskTypes *[]string `json:"diskTypes,omitempty"` +} + +// DisallowedConfiguration specifies the disallowed configuration for a virtual machine image. +type DisallowedConfiguration struct { + // VMDiskType - VM disk types which are disallowed. Possible values include: 'VMDiskTypesNone', 'VMDiskTypesUnmanaged' + VMDiskType VMDiskTypes `json:"vmDiskType,omitempty"` +} + +// Disk disk resource. +type Disk struct { + autorest.Response `json:"-"` + // ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. + ManagedBy *string `json:"managedBy,omitempty"` + // ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + ManagedByExtended *[]string `json:"managedByExtended,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` + // Zones - The Logical zone list for Disk. + Zones *[]string `json:"zones,omitempty"` + // ExtendedLocation - The extended location where the disk will be created. Extended location cannot be changed. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + *DiskProperties `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 Disk. +func (d Disk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if d.Sku != nil { + objectMap["sku"] = d.Sku + } + if d.Zones != nil { + objectMap["zones"] = d.Zones + } + if d.ExtendedLocation != nil { + objectMap["extendedLocation"] = d.ExtendedLocation + } + if d.DiskProperties != nil { + objectMap["properties"] = d.DiskProperties + } + if d.Location != nil { + objectMap["location"] = d.Location + } + if d.Tags != nil { + objectMap["tags"] = d.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Disk struct. +func (d *Disk) 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 "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + d.ManagedBy = &managedBy + } + case "managedByExtended": + if v != nil { + var managedByExtended []string + err = json.Unmarshal(*v, &managedByExtended) + if err != nil { + return err + } + d.ManagedByExtended = &managedByExtended + } + case "sku": + if v != nil { + var sku DiskSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + d.Sku = &sku + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + d.Zones = &zones + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + d.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var diskProperties DiskProperties + err = json.Unmarshal(*v, &diskProperties) + if err != nil { + return err + } + d.DiskProperties = &diskProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + d.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + d.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + d.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + d.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + d.Tags = tags + } + } + } + + return nil +} + +// DiskAccess disk access resource. +type DiskAccess struct { + autorest.Response `json:"-"` + *DiskAccessProperties `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 DiskAccess. +func (da DiskAccess) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if da.DiskAccessProperties != nil { + objectMap["properties"] = da.DiskAccessProperties + } + if da.Location != nil { + objectMap["location"] = da.Location + } + if da.Tags != nil { + objectMap["tags"] = da.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DiskAccess struct. +func (da *DiskAccess) 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 diskAccessProperties DiskAccessProperties + err = json.Unmarshal(*v, &diskAccessProperties) + if err != nil { + return err + } + da.DiskAccessProperties = &diskAccessProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + da.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + da.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + da.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + da.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + da.Tags = tags + } + } + } + + return nil +} + +// DiskAccessesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskAccessesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskAccessesClient) (DiskAccess, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskAccessesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskAccessesCreateOrUpdateFuture.Result. +func (future *DiskAccessesCreateOrUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + da.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent { + da, err = client.CreateOrUpdateResponder(da.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskAccessesDeleteAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type DiskAccessesDeleteAPrivateEndpointConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskAccessesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskAccessesDeleteAPrivateEndpointConnectionFuture.Result. +func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture") + return + } + ar.Response = future.Response() + return +} + +// DiskAccessesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DiskAccessesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskAccessesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskAccessesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskAccessesDeleteFuture.Result. +func (future *DiskAccessesDeleteFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DiskAccessesUpdateAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type DiskAccessesUpdateAPrivateEndpointConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskAccessesClient) (PrivateEndpointConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskAccessesUpdateAPrivateEndpointConnectionFuture.Result. +func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pec.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent { + pec, err = client.UpdateAPrivateEndpointConnectionResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", pec.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskAccessesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DiskAccessesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskAccessesClient) (DiskAccess, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskAccessesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskAccessesUpdateFuture.Result. +func (future *DiskAccessesUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + da.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent { + da, err = client.UpdateResponder(da.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", da.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskAccessList the List disk access operation response. +type DiskAccessList struct { + autorest.Response `json:"-"` + // Value - A list of disk access resources. + Value *[]DiskAccess `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// DiskAccessListIterator provides access to a complete listing of DiskAccess values. +type DiskAccessListIterator struct { + i int + page DiskAccessListPage +} + +// 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 *DiskAccessListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListIterator.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 *DiskAccessListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DiskAccessListIterator) 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 DiskAccessListIterator) Response() DiskAccessList { + 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 DiskAccessListIterator) Value() DiskAccess { + if !iter.page.NotDone() { + return DiskAccess{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DiskAccessListIterator type. +func NewDiskAccessListIterator(page DiskAccessListPage) DiskAccessListIterator { + return DiskAccessListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dal DiskAccessList) IsEmpty() bool { + return dal.Value == nil || len(*dal.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dal DiskAccessList) hasNextLink() bool { + return dal.NextLink != nil && len(*dal.NextLink) != 0 +} + +// diskAccessListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) { + if !dal.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dal.NextLink))) +} + +// DiskAccessListPage contains a page of DiskAccess values. +type DiskAccessListPage struct { + fn func(context.Context, DiskAccessList) (DiskAccessList, error) + dal DiskAccessList +} + +// 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 *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dal) + if err != nil { + return err + } + page.dal = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DiskAccessListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DiskAccessListPage) NotDone() bool { + return !page.dal.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DiskAccessListPage) Response() DiskAccessList { + return page.dal +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DiskAccessListPage) Values() []DiskAccess { + if page.dal.IsEmpty() { + return nil + } + return *page.dal.Value +} + +// Creates a new instance of the DiskAccessListPage type. +func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage { + return DiskAccessListPage{ + fn: getNextPage, + dal: cur, + } +} + +// DiskAccessProperties ... +type DiskAccessProperties struct { + // PrivateEndpointConnections - READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported. + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // ProvisioningState - READ-ONLY; The disk access resource provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + // TimeCreated - READ-ONLY; The time when the disk access was created. + TimeCreated *date.Time `json:"timeCreated,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskAccessProperties. +func (dap DiskAccessProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DiskAccessUpdate used for updating a disk access resource. +type DiskAccessUpdate struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DiskAccessUpdate. +func (dau DiskAccessUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dau.Tags != nil { + objectMap["tags"] = dau.Tags + } + return json.Marshal(objectMap) +} + +// DiskEncryptionSet disk encryption set resource. +type DiskEncryptionSet struct { + autorest.Response `json:"-"` + Identity *EncryptionSetIdentity `json:"identity,omitempty"` + *EncryptionSetProperties `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 DiskEncryptionSet. +func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if desVar.Identity != nil { + objectMap["identity"] = desVar.Identity + } + if desVar.EncryptionSetProperties != nil { + objectMap["properties"] = desVar.EncryptionSetProperties + } + if desVar.Location != nil { + objectMap["location"] = desVar.Location + } + if desVar.Tags != nil { + objectMap["tags"] = desVar.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct. +func (desVar *DiskEncryptionSet) 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 EncryptionSetIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + desVar.Identity = &identity + } + case "properties": + if v != nil { + var encryptionSetProperties EncryptionSetProperties + err = json.Unmarshal(*v, &encryptionSetProperties) + if err != nil { + return err + } + desVar.EncryptionSetProperties = &encryptionSetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + desVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + desVar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + desVar.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + desVar.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + desVar.Tags = tags + } + } + } + + return nil +} + +// DiskEncryptionSetList the List disk encryption set operation response. +type DiskEncryptionSetList struct { + autorest.Response `json:"-"` + // Value - A list of disk encryption sets. + Value *[]DiskEncryptionSet `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets. + NextLink *string `json:"nextLink,omitempty"` +} + +// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values. +type DiskEncryptionSetListIterator struct { + i int + page DiskEncryptionSetListPage +} + +// 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 *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.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 *DiskEncryptionSetListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DiskEncryptionSetListIterator) 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 DiskEncryptionSetListIterator) Response() DiskEncryptionSetList { + 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 DiskEncryptionSetListIterator) Value() DiskEncryptionSet { + if !iter.page.NotDone() { + return DiskEncryptionSet{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DiskEncryptionSetListIterator type. +func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator { + return DiskEncryptionSetListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (desl DiskEncryptionSetList) IsEmpty() bool { + return desl.Value == nil || len(*desl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (desl DiskEncryptionSetList) hasNextLink() bool { + return desl.NextLink != nil && len(*desl.NextLink) != 0 +} + +// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) { + if !desl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(desl.NextLink))) +} + +// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values. +type DiskEncryptionSetListPage struct { + fn func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error) + desl DiskEncryptionSetList +} + +// 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 *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.desl) + if err != nil { + return err + } + page.desl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DiskEncryptionSetListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DiskEncryptionSetListPage) NotDone() bool { + return !page.desl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList { + return page.desl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet { + if page.desl.IsEmpty() { + return nil + } + return *page.desl.Value +} + +// Creates a new instance of the DiskEncryptionSetListPage type. +func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage { + return DiskEncryptionSetListPage{ + fn: getNextPage, + desl: cur, + } +} + +// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id +// that can be specified for disk.

NOTE: The disk encryption set resource id can only be specified +// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. +type DiskEncryptionSetParameters struct { + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskEncryptionSetsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result. +func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + desVar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent { + desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskEncryptionSetsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskEncryptionSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result. +func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskEncryptionSetsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result. +func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + desVar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent { + desVar, err = client.UpdateResponder(desVar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskEncryptionSettings describes a Encryption Settings for a Disk +type DiskEncryptionSettings struct { + // DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret. + DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"` + // KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault. + KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` + // Enabled - Specifies whether disk encryption should be enabled on the virtual machine. + Enabled *bool `json:"enabled,omitempty"` +} + +// DiskEncryptionSetUpdate disk encryption set update resource. +type DiskEncryptionSetUpdate struct { + *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + Identity *EncryptionSetIdentity `json:"identity,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate. +func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if desu.DiskEncryptionSetUpdateProperties != nil { + objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties + } + if desu.Tags != nil { + objectMap["tags"] = desu.Tags + } + if desu.Identity != nil { + objectMap["identity"] = desu.Identity + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct. +func (desu *DiskEncryptionSetUpdate) 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 diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties + err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties) + if err != nil { + return err + } + desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + desu.Tags = tags + } + case "identity": + if v != nil { + var identity EncryptionSetIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + desu.Identity = &identity + } + } + } + + return nil +} + +// DiskEncryptionSetUpdateProperties disk encryption set resource update properties. +type DiskEncryptionSetUpdateProperties struct { + // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys' + EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"` + ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"` + // RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` +} + +// DiskImageEncryption this is the disk image encryption base class. +type DiskImageEncryption struct { + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + +// DiskInstanceView the instance view of the disk. +type DiskInstanceView struct { + // Name - The disk name. + Name *string `json:"name,omitempty"` + // EncryptionSettings - Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 + EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// DiskList the List Disks operation response. +type DiskList struct { + autorest.Response `json:"-"` + // Value - A list of disks. + Value *[]Disk `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks. + NextLink *string `json:"nextLink,omitempty"` +} + +// DiskListIterator provides access to a complete listing of Disk values. +type DiskListIterator struct { + i int + page DiskListPage +} + +// 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 *DiskListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.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 *DiskListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DiskListIterator) 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 DiskListIterator) Response() DiskList { + 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 DiskListIterator) Value() Disk { + if !iter.page.NotDone() { + return Disk{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DiskListIterator type. +func NewDiskListIterator(page DiskListPage) DiskListIterator { + return DiskListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dl DiskList) IsEmpty() bool { + return dl.Value == nil || len(*dl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dl DiskList) hasNextLink() bool { + return dl.NextLink != nil && len(*dl.NextLink) != 0 +} + +// diskListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) { + if !dl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dl.NextLink))) +} + +// DiskListPage contains a page of Disk values. +type DiskListPage struct { + fn func(context.Context, DiskList) (DiskList, error) + dl DiskList +} + +// 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 *DiskListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dl) + if err != nil { + return err + } + page.dl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DiskListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DiskListPage) NotDone() bool { + return !page.dl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DiskListPage) Response() DiskList { + return page.dl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DiskListPage) Values() []Disk { + if page.dl.IsEmpty() { + return nil + } + return *page.dl.Value +} + +// Creates a new instance of the DiskListPage type. +func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage { + return DiskListPage{ + fn: getNextPage, + dl: cur, + } +} + +// DiskProperties disk resource properties. +type DiskProperties struct { + // TimeCreated - READ-ONLY; The time when the disk was created. + TimeCreated *date.Time `json:"timeCreated,omitempty"` + // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2' + HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` + // PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} + PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. + CreationData *CreationData `json:"creationData,omitempty"` + // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only. + DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"` + // UniqueID - READ-ONLY; Unique Guid identifying the resource. + UniqueID *string `json:"uniqueId,omitempty"` + // EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` + // ProvisioningState - READ-ONLY; The disk provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` + // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` + // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` + // DiskState - The state of the disk. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateActiveSAS', 'DiskStateReadyToUpload', 'DiskStateActiveUpload' + DiskState DiskState `json:"diskState,omitempty"` + // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` + // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares *int32 `json:"maxShares,omitempty"` + // ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"` + // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll' + NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` + // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. + DiskAccessID *string `json:"diskAccessId,omitempty"` + // Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. + Tier *string `json:"tier,omitempty"` + // BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + BurstingEnabled *bool `json:"burstingEnabled,omitempty"` + // PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending. + PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"` + // SupportsHibernation - Indicates the OS on a disk supports hibernation. + SupportsHibernation *bool `json:"supportsHibernation,omitempty"` + // SecurityProfile - Contains the security related information for the resource. + SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskProperties. +func (dp DiskProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dp.OsType != "" { + objectMap["osType"] = dp.OsType + } + if dp.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = dp.HyperVGeneration + } + if dp.PurchasePlan != nil { + objectMap["purchasePlan"] = dp.PurchasePlan + } + if dp.CreationData != nil { + objectMap["creationData"] = dp.CreationData + } + if dp.DiskSizeGB != nil { + objectMap["diskSizeGB"] = dp.DiskSizeGB + } + if dp.EncryptionSettingsCollection != nil { + objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection + } + if dp.DiskIOPSReadWrite != nil { + objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite + } + if dp.DiskMBpsReadWrite != nil { + objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite + } + if dp.DiskIOPSReadOnly != nil { + objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly + } + if dp.DiskMBpsReadOnly != nil { + objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly + } + if dp.DiskState != "" { + objectMap["diskState"] = dp.DiskState + } + if dp.Encryption != nil { + objectMap["encryption"] = dp.Encryption + } + if dp.MaxShares != nil { + objectMap["maxShares"] = dp.MaxShares + } + if dp.NetworkAccessPolicy != "" { + objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy + } + if dp.DiskAccessID != nil { + objectMap["diskAccessId"] = dp.DiskAccessID + } + if dp.Tier != nil { + objectMap["tier"] = dp.Tier + } + if dp.BurstingEnabled != nil { + objectMap["burstingEnabled"] = dp.BurstingEnabled + } + if dp.SupportsHibernation != nil { + objectMap["supportsHibernation"] = dp.SupportsHibernation + } + if dp.SecurityProfile != nil { + objectMap["securityProfile"] = dp.SecurityProfile + } + return json.Marshal(objectMap) +} + +// DiskRestorePoint properties of disk restore point +type DiskRestorePoint struct { + autorest.Response `json:"-"` + *DiskRestorePointProperties `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 DiskRestorePoint. +func (drp DiskRestorePoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if drp.DiskRestorePointProperties != nil { + objectMap["properties"] = drp.DiskRestorePointProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DiskRestorePoint struct. +func (drp *DiskRestorePoint) 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 diskRestorePointProperties DiskRestorePointProperties + err = json.Unmarshal(*v, &diskRestorePointProperties) + if err != nil { + return err + } + drp.DiskRestorePointProperties = &diskRestorePointProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + drp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + drp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + drp.Type = &typeVar + } + } + } + + return nil +} + +// DiskRestorePointGrantAccessFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskRestorePointGrantAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskRestorePointClient) (AccessURI, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskRestorePointGrantAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskRestorePointGrantAccessFuture.Result. +func (future *DiskRestorePointGrantAccessFuture) result(client DiskRestorePointClient) (au AccessURI, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + au.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointGrantAccessFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { + au, err = client.GrantAccessResponder(au.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskRestorePointList the List Disk Restore Points operation response. +type DiskRestorePointList struct { + autorest.Response `json:"-"` + // Value - A list of disk restore points. + Value *[]DiskRestorePoint `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points. + NextLink *string `json:"nextLink,omitempty"` +} + +// DiskRestorePointListIterator provides access to a complete listing of DiskRestorePoint values. +type DiskRestorePointListIterator struct { + i int + page DiskRestorePointListPage +} + +// 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 *DiskRestorePointListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListIterator.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 *DiskRestorePointListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DiskRestorePointListIterator) 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 DiskRestorePointListIterator) Response() DiskRestorePointList { + 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 DiskRestorePointListIterator) Value() DiskRestorePoint { + if !iter.page.NotDone() { + return DiskRestorePoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DiskRestorePointListIterator type. +func NewDiskRestorePointListIterator(page DiskRestorePointListPage) DiskRestorePointListIterator { + return DiskRestorePointListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (drpl DiskRestorePointList) IsEmpty() bool { + return drpl.Value == nil || len(*drpl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (drpl DiskRestorePointList) hasNextLink() bool { + return drpl.NextLink != nil && len(*drpl.NextLink) != 0 +} + +// diskRestorePointListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (drpl DiskRestorePointList) diskRestorePointListPreparer(ctx context.Context) (*http.Request, error) { + if !drpl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(drpl.NextLink))) +} + +// DiskRestorePointListPage contains a page of DiskRestorePoint values. +type DiskRestorePointListPage struct { + fn func(context.Context, DiskRestorePointList) (DiskRestorePointList, error) + drpl DiskRestorePointList +} + +// 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 *DiskRestorePointListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.drpl) + if err != nil { + return err + } + page.drpl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DiskRestorePointListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DiskRestorePointListPage) NotDone() bool { + return !page.drpl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DiskRestorePointListPage) Response() DiskRestorePointList { + return page.drpl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DiskRestorePointListPage) Values() []DiskRestorePoint { + if page.drpl.IsEmpty() { + return nil + } + return *page.drpl.Value +} + +// Creates a new instance of the DiskRestorePointListPage type. +func NewDiskRestorePointListPage(cur DiskRestorePointList, getNextPage func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)) DiskRestorePointListPage { + return DiskRestorePointListPage{ + fn: getNextPage, + drpl: cur, + } +} + +// DiskRestorePointProperties properties of an incremental disk restore point +type DiskRestorePointProperties struct { + // TimeCreated - READ-ONLY; The timestamp of restorePoint creation + TimeCreated *date.Time `json:"timeCreated,omitempty"` + // SourceResourceID - READ-ONLY; arm id of source disk + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // OsType - READ-ONLY; The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2' + HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` + // PurchasePlan - Purchase plan information for the the image from which the OS disk was created. + PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // FamilyID - READ-ONLY; id of the backing snapshot's MIS family + FamilyID *string `json:"familyId,omitempty"` + // SourceUniqueID - READ-ONLY; unique incarnation id of the source disk + SourceUniqueID *string `json:"sourceUniqueId,omitempty"` + // Encryption - READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` + // SupportsHibernation - Indicates the OS on a disk supports hibernation. + SupportsHibernation *bool `json:"supportsHibernation,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskRestorePointProperties. +func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if drpp.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = drpp.HyperVGeneration + } + if drpp.PurchasePlan != nil { + objectMap["purchasePlan"] = drpp.PurchasePlan + } + if drpp.SupportsHibernation != nil { + objectMap["supportsHibernation"] = drpp.SupportsHibernation + } + return json.Marshal(objectMap) +} + +// DiskRestorePointRevokeAccessFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskRestorePointRevokeAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskRestorePointClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskRestorePointRevokeAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskRestorePointRevokeAccessFuture.Result. +func (future *DiskRestorePointRevokeAccessFuture) result(client DiskRestorePointClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointRevokeAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointRevokeAccessFuture") + return + } + ar.Response = future.Response() + return +} + +// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DisksCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DisksClient) (Disk, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DisksCreateOrUpdateFuture.Result. +func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + d.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { + d, err = client.CreateOrUpdateResponder(d.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request") + } + } + return +} + +// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type DisksDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DisksClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DisksDeleteFuture.Result. +func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DiskSecurityProfile contains the security related information for the resource. +type DiskSecurityProfile struct { + // SecurityType - Possible values include: 'DiskSecurityTypesTrustedLaunch' + SecurityType DiskSecurityTypes `json:"securityType,omitempty"` +} + +// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DisksGrantAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DisksClient) (AccessURI, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DisksGrantAccessFuture.Result. +func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + au.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { + au, err = client.GrantAccessResponder(au.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, +// Premium_ZRS, or StandardSSD_ZRS. +type DiskSku struct { + // Name - The sku name. Possible values include: 'DiskStorageAccountTypesStandardLRS', 'DiskStorageAccountTypesPremiumLRS', 'DiskStorageAccountTypesStandardSSDLRS', 'DiskStorageAccountTypesUltraSSDLRS', 'DiskStorageAccountTypesPremiumZRS', 'DiskStorageAccountTypesStandardSSDZRS' + Name DiskStorageAccountTypes `json:"name,omitempty"` + // Tier - READ-ONLY; The sku tier. + Tier *string `json:"tier,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskSku. +func (ds DiskSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ds.Name != "" { + objectMap["name"] = ds.Name + } + return json.Marshal(objectMap) +} + +// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DisksRevokeAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DisksClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DisksRevokeAccessFuture.Result. +func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture") + return + } + ar.Response = future.Response() + return +} + +// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type DisksUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DisksClient) (Disk, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DisksUpdateFuture.Result. +func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + d.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { + d, err = client.UpdateResponder(d.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request") + } + } + return +} + +// DiskUpdate disk update resource. +type DiskUpdate struct { + *DiskUpdateProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + Sku *DiskSku `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskUpdate. +func (du DiskUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if du.DiskUpdateProperties != nil { + objectMap["properties"] = du.DiskUpdateProperties + } + if du.Tags != nil { + objectMap["tags"] = du.Tags + } + if du.Sku != nil { + objectMap["sku"] = du.Sku + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct. +func (du *DiskUpdate) 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 diskUpdateProperties DiskUpdateProperties + err = json.Unmarshal(*v, &diskUpdateProperties) + if err != nil { + return err + } + du.DiskUpdateProperties = &diskUpdateProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + du.Tags = tags + } + case "sku": + if v != nil { + var sku DiskSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + du.Sku = &sku + } + } + } + + return nil +} + +// DiskUpdateProperties disk resource update properties. +type DiskUpdateProperties struct { + // OsType - the Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` + // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` + // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` + // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` + // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares *int32 `json:"maxShares,omitempty"` + // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` + // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll' + NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` + // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. + DiskAccessID *string `json:"diskAccessId,omitempty"` + // Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. + Tier *string `json:"tier,omitempty"` + // BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + BurstingEnabled *bool `json:"burstingEnabled,omitempty"` + // PurchasePlan - Purchase plan information to be added on the OS disk + PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending. + PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"` + // SupportsHibernation - Indicates the OS on a disk supports hibernation. + SupportsHibernation *bool `json:"supportsHibernation,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskUpdateProperties. +func (dup DiskUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dup.OsType != "" { + objectMap["osType"] = dup.OsType + } + if dup.DiskSizeGB != nil { + objectMap["diskSizeGB"] = dup.DiskSizeGB + } + if dup.EncryptionSettingsCollection != nil { + objectMap["encryptionSettingsCollection"] = dup.EncryptionSettingsCollection + } + if dup.DiskIOPSReadWrite != nil { + objectMap["diskIOPSReadWrite"] = dup.DiskIOPSReadWrite + } + if dup.DiskMBpsReadWrite != nil { + objectMap["diskMBpsReadWrite"] = dup.DiskMBpsReadWrite + } + if dup.DiskIOPSReadOnly != nil { + objectMap["diskIOPSReadOnly"] = dup.DiskIOPSReadOnly + } + if dup.DiskMBpsReadOnly != nil { + objectMap["diskMBpsReadOnly"] = dup.DiskMBpsReadOnly + } + if dup.MaxShares != nil { + objectMap["maxShares"] = dup.MaxShares + } + if dup.Encryption != nil { + objectMap["encryption"] = dup.Encryption + } + if dup.NetworkAccessPolicy != "" { + objectMap["networkAccessPolicy"] = dup.NetworkAccessPolicy + } + if dup.DiskAccessID != nil { + objectMap["diskAccessId"] = dup.DiskAccessID + } + if dup.Tier != nil { + objectMap["tier"] = dup.Tier + } + if dup.BurstingEnabled != nil { + objectMap["burstingEnabled"] = dup.BurstingEnabled + } + if dup.PurchasePlan != nil { + objectMap["purchasePlan"] = dup.PurchasePlan + } + if dup.SupportsHibernation != nil { + objectMap["supportsHibernation"] = dup.SupportsHibernation + } + return json.Marshal(objectMap) +} + +// Encryption encryption at rest settings for disk or snapshot +type Encryption struct { + // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` + // Type - Possible values include: 'EncryptionTypeEncryptionAtRestWithPlatformKey', 'EncryptionTypeEncryptionAtRestWithCustomerKey', 'EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys' + Type EncryptionType `json:"type,omitempty"` +} + +// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data +// disks in the gallery artifact. +type EncryptionImages struct { + OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"` + // DataDiskImages - A list of encryption specifications for data disk images. + DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"` +} + +// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on +// the key vault before it can be used to encrypt disks. +type EncryptionSetIdentity struct { + // Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. Possible values include: 'DiskEncryptionSetIdentityTypeSystemAssigned', 'DiskEncryptionSetIdentityTypeNone' + Type DiskEncryptionSetIdentityType `json:"type,omitempty"` + // PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity + TenantID *string `json:"tenantId,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionSetIdentity. +func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esi.Type != "" { + objectMap["type"] = esi.Type + } + return json.Marshal(objectMap) +} + +// EncryptionSetProperties ... +type EncryptionSetProperties struct { + // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys' + EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"` + // ActiveKey - The key vault key which is currently used by this disk encryption set. + ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"` + // PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation. + PreviousKeys *[]KeyForDiskEncryptionSet `json:"previousKeys,omitempty"` + // ProvisioningState - READ-ONLY; The disk encryption set provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + // RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` + // LastKeyRotationTimestamp - READ-ONLY; The time when the active key of this disk encryption set was updated. + LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionSetProperties. +func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esp.EncryptionType != "" { + objectMap["encryptionType"] = esp.EncryptionType + } + if esp.ActiveKey != nil { + objectMap["activeKey"] = esp.ActiveKey + } + if esp.RotationToLatestKeyVersionEnabled != nil { + objectMap["rotationToLatestKeyVersionEnabled"] = esp.RotationToLatestKeyVersionEnabled + } + return json.Marshal(objectMap) +} + +// EncryptionSettingsCollection encryption settings for disk or snapshot +type EncryptionSettingsCollection struct { + // Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. + Enabled *bool `json:"enabled,omitempty"` + // EncryptionSettings - A collection of encryption settings, one for each disk volume. + EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"` + // EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption. + EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"` +} + +// EncryptionSettingsElement encryption settings for one disk volume. +type EncryptionSettingsElement struct { + // DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key + DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"` + // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. + KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"` +} + +// ExtendedLocation the complex type of the extended location. +type ExtendedLocation struct { + // Name - The name of the extended location. + Name *string `json:"name,omitempty"` + // Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone' + Type ExtendedLocationTypes `json:"type,omitempty"` +} + +// Extension describes a cloud service Extension. +type Extension struct { + // Name - The name of the extension. + Name *string `json:"name,omitempty"` + Properties *CloudServiceExtensionProperties `json:"properties,omitempty"` +} + +// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleriesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleriesClient) (Gallery, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleriesCreateOrUpdateFuture.Result. +func (future *GalleriesCreateOrUpdateFuture) 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.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + g.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(g.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleriesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleriesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleriesDeleteFuture.Result. +func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleriesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleriesClient) (Gallery, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleriesUpdateFuture.Result. +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 { + g.Response.Response = future.Response() + 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:"-"` + *GalleryProperties `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 Gallery. +func (g Gallery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if g.GalleryProperties != nil { + objectMap["properties"] = g.GalleryProperties + } + if g.Location != nil { + objectMap["location"] = g.Location + } + if g.Tags != nil { + objectMap["tags"] = g.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Gallery struct. +func (g *Gallery) 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 + } + g.GalleryProperties = &galleryProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + g.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + g.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + g.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + g.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + g.Tags = tags + } + } + } + + return nil +} + +// GalleryApplication specifies information about the gallery Application Definition that you want to +// create or update. +type GalleryApplication struct { + autorest.Response `json:"-"` + *GalleryApplicationProperties `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 GalleryApplication. +func (ga GalleryApplication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ga.GalleryApplicationProperties != nil { + objectMap["properties"] = ga.GalleryApplicationProperties + } + if ga.Location != nil { + objectMap["location"] = ga.Location + } + if ga.Tags != nil { + objectMap["tags"] = ga.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct. +func (ga *GalleryApplication) 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 + } + ga.GalleryApplicationProperties = &galleryApplicationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ga.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ga.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ga.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ga.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ga.Tags = tags + } + } + } + + return nil +} + +// GalleryApplicationList the List Gallery Applications operation response. +type GalleryApplicationList struct { + autorest.Response `json:"-"` + // Value - A list of Gallery Applications. + Value *[]GalleryApplication `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions. + NextLink *string `json:"nextLink,omitempty"` +} + +// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values. +type GalleryApplicationListIterator struct { + i int + page GalleryApplicationListPage +} + +// 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 *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.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 *GalleryApplicationListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter GalleryApplicationListIterator) 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 GalleryApplicationListIterator) Response() GalleryApplicationList { + 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 GalleryApplicationListIterator) Value() GalleryApplication { + if !iter.page.NotDone() { + return GalleryApplication{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the GalleryApplicationListIterator type. +func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator { + return GalleryApplicationListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (gal GalleryApplicationList) IsEmpty() bool { + return gal.Value == nil || len(*gal.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (gal GalleryApplicationList) hasNextLink() bool { + return gal.NextLink != nil && len(*gal.NextLink) != 0 +} + +// galleryApplicationListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) { + if !gal.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(gal.NextLink))) +} + +// GalleryApplicationListPage contains a page of GalleryApplication values. +type GalleryApplicationListPage struct { + fn func(context.Context, GalleryApplicationList) (GalleryApplicationList, error) + gal GalleryApplicationList +} + +// 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 *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.gal) + if err != nil { + return err + } + page.gal = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *GalleryApplicationListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page GalleryApplicationListPage) NotDone() bool { + return !page.gal.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page GalleryApplicationListPage) Response() GalleryApplicationList { + return page.gal +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page GalleryApplicationListPage) Values() []GalleryApplication { + if page.gal.IsEmpty() { + return nil + } + return *page.gal.Value +} + +// Creates a new instance of the GalleryApplicationListPage type. +func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage { + return GalleryApplicationListPage{ + fn: getNextPage, + gal: cur, + } +} + +// GalleryApplicationProperties describes the properties of a gallery Application Definition. +type GalleryApplicationProperties struct { + // Description - The description of this gallery Application Definition resource. This property is updatable. + Description *string `json:"description,omitempty"` + // Eula - The Eula agreement for the gallery Application Definition. + Eula *string `json:"eula,omitempty"` + // PrivacyStatementURI - The privacy statement uri. + PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` + // ReleaseNoteURI - The release note uri. + ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` + // EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + // SupportedOSType - This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"` +} + +// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryApplicationsClient) (GalleryApplication, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result. +func (future *GalleryApplicationsCreateOrUpdateFuture) 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.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ga.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(ga.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryApplicationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryApplicationsDeleteFuture.Result. +func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryApplicationsClient) (GalleryApplication, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryApplicationsUpdateFuture.Result. +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 { + ga.Response.Response = future.Response() + 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"` + // 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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// 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 "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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gau.Tags = tags + } + } + } + + return nil +} + +// GalleryApplicationVersion specifies information about the gallery Application Version that you want to +// create or update. +type GalleryApplicationVersion struct { + autorest.Response `json:"-"` + *GalleryApplicationVersionProperties `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 GalleryApplicationVersion. +func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gav.GalleryApplicationVersionProperties != nil { + objectMap["properties"] = gav.GalleryApplicationVersionProperties + } + if gav.Location != nil { + objectMap["location"] = gav.Location + } + if gav.Tags != nil { + objectMap["tags"] = gav.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct. +func (gav *GalleryApplicationVersion) 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 + } + gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gav.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gav.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gav.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + gav.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gav.Tags = tags + } + } + } + + return nil +} + +// GalleryApplicationVersionList the List Gallery Application version operation response. +type GalleryApplicationVersionList struct { + autorest.Response `json:"-"` + // Value - A list of gallery Application Versions. + Value *[]GalleryApplicationVersion `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions. + NextLink *string `json:"nextLink,omitempty"` +} + +// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion +// values. +type GalleryApplicationVersionListIterator struct { + i int + page GalleryApplicationVersionListPage +} + +// 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 *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.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 *GalleryApplicationVersionListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter GalleryApplicationVersionListIterator) 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 GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList { + 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 GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion { + if !iter.page.NotDone() { + return GalleryApplicationVersion{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the GalleryApplicationVersionListIterator type. +func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator { + return GalleryApplicationVersionListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (gavl GalleryApplicationVersionList) IsEmpty() bool { + return gavl.Value == nil || len(*gavl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (gavl GalleryApplicationVersionList) hasNextLink() bool { + return gavl.NextLink != nil && len(*gavl.NextLink) != 0 +} + +// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) { + if !gavl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(gavl.NextLink))) +} + +// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values. +type GalleryApplicationVersionListPage struct { + fn func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error) + gavl GalleryApplicationVersionList +} + +// 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 *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.gavl) + if err != nil { + return err + } + page.gavl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *GalleryApplicationVersionListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page GalleryApplicationVersionListPage) NotDone() bool { + return !page.gavl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList { + return page.gavl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion { + if page.gavl.IsEmpty() { + return nil + } + return *page.gavl.Value +} + +// Creates a new instance of the GalleryApplicationVersionListPage type. +func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage { + return GalleryApplicationVersionListPage{ + fn: getNextPage, + gavl: cur, + } +} + +// GalleryApplicationVersionProperties describes the properties of a gallery image version. +type GalleryApplicationVersionProperties struct { + PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating' + ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"` + // ReplicationStatus - READ-ONLY + ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties. +func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gavp.PublishingProfile != nil { + objectMap["publishingProfile"] = gavp.PublishingProfile + } + return json.Marshal(objectMap) +} + +// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery image version. +type GalleryApplicationVersionPublishingProfile struct { + Source *UserArtifactSource `json:"source,omitempty"` + ManageActions *UserArtifactManage `json:"manageActions,omitempty"` + // EnableHealthCheck - Optional. Whether or not this application reports health. + EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"` + // 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', 'StorageAccountTypePremiumLRS' + StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow' + ReplicationMode ReplicationMode `json:"replicationMode,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile. +func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gavpp.Source != nil { + objectMap["source"] = gavpp.Source + } + if gavpp.ManageActions != nil { + objectMap["manageActions"] = gavpp.ManageActions + } + if gavpp.EnableHealthCheck != nil { + objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck + } + if gavpp.TargetRegions != nil { + objectMap["targetRegions"] = gavpp.TargetRegions + } + if gavpp.ReplicaCount != nil { + objectMap["replicaCount"] = gavpp.ReplicaCount + } + if gavpp.ExcludeFromLatest != nil { + objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest + } + if gavpp.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate + } + if gavpp.StorageAccountType != "" { + objectMap["storageAccountType"] = gavpp.StorageAccountType + } + if gavpp.ReplicationMode != "" { + objectMap["replicationMode"] = gavpp.ReplicationMode + } + return json.Marshal(objectMap) +} + +// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type GalleryApplicationVersionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result. +func (future *GalleryApplicationVersionsCreateOrUpdateFuture) 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.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + gav.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(gav.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationVersionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryApplicationVersionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result. +func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationVersionsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result. +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 { + gav.Response.Response = future.Response() + 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 +} + +// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you +// want to update. +type GalleryApplicationVersionUpdate struct { + *GalleryApplicationVersionProperties `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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// 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 "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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gavu.Tags = tags + } + } + } + + 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', 'StorageAccountTypePremiumLRS' + StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow' + ReplicationMode ReplicationMode `json:"replicationMode,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase. +func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gappb.TargetRegions != nil { + objectMap["targetRegions"] = gappb.TargetRegions + } + if gappb.ReplicaCount != nil { + objectMap["replicaCount"] = gappb.ReplicaCount + } + if gappb.ExcludeFromLatest != nil { + objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest + } + if gappb.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = gappb.EndOfLifeDate + } + if gappb.StorageAccountType != "" { + objectMap["storageAccountType"] = gappb.StorageAccountType + } + if gappb.ReplicationMode != "" { + objectMap["replicationMode"] = gappb.ReplicationMode + } + return json.Marshal(objectMap) +} + +// 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, user image or storage account resource. + ID *string `json:"id,omitempty"` + // URI - The uri of the gallery artifact version source. Currently used to specify vhd/blob source. + URI *string `json:"uri,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"` + Source *GalleryArtifactVersionSource `json:"source,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryDataDiskImage. +func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gddi.Lun != nil { + objectMap["lun"] = gddi.Lun + } + if gddi.HostCaching != "" { + objectMap["hostCaching"] = gddi.HostCaching + } + if gddi.Source != nil { + objectMap["source"] = gddi.Source + } + return json.Marshal(objectMap) +} + +// GalleryDiskImage this is the disk image base class. +type GalleryDiskImage 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"` +} + +// MarshalJSON is the custom marshaler for GalleryDiskImage. +func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gdi.HostCaching != "" { + objectMap["hostCaching"] = gdi.HostCaching + } + if gdi.Source != nil { + objectMap["source"] = gdi.Source + } + return json.Marshal(objectMap) +} + +// GalleryIdentifier describes the gallery unique name. +type GalleryIdentifier struct { + // UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure. + UniqueName *string `json:"uniqueName,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryIdentifier. +func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// GalleryImage specifies information about the gallery image definition that you want to create or update. +type GalleryImage struct { + autorest.Response `json:"-"` + *GalleryImageProperties `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 GalleryImage. +func (gi GalleryImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gi.GalleryImageProperties != nil { + objectMap["properties"] = gi.GalleryImageProperties + } + if gi.Location != nil { + objectMap["location"] = gi.Location + } + if gi.Tags != nil { + objectMap["tags"] = gi.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryImage struct. +func (gi *GalleryImage) 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 + } + gi.GalleryImageProperties = &galleryImageProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gi.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gi.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gi.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + gi.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gi.Tags = tags + } + } + } + + return nil +} + +// GalleryImageFeature a feature for gallery image. +type GalleryImageFeature struct { + // Name - The name of the gallery image feature. + Name *string `json:"name,omitempty"` + // Value - The value of the gallery image feature. + Value *string `json:"value,omitempty"` +} + +// GalleryImageIdentifier this is the gallery image definition identifier. +type GalleryImageIdentifier struct { + // Publisher - The name of the gallery image definition publisher. + Publisher *string `json:"publisher,omitempty"` + // Offer - The name of the gallery image definition offer. + Offer *string `json:"offer,omitempty"` + // Sku - The name of the gallery image definition SKU. + Sku *string `json:"sku,omitempty"` +} + +// GalleryImageList the List Gallery Images operation response. +type GalleryImageList struct { + autorest.Response `json:"-"` + // Value - A list of Shared Image Gallery images. + Value *[]GalleryImage `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery image definitions. + NextLink *string `json:"nextLink,omitempty"` +} + +// GalleryImageListIterator provides access to a complete listing of GalleryImage values. +type GalleryImageListIterator struct { + i int + page GalleryImageListPage +} + +// 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 *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.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 *GalleryImageListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter GalleryImageListIterator) 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 GalleryImageListIterator) Response() GalleryImageList { + 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 GalleryImageListIterator) Value() GalleryImage { + if !iter.page.NotDone() { + return GalleryImage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the GalleryImageListIterator type. +func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator { + return GalleryImageListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (gil GalleryImageList) IsEmpty() bool { + return gil.Value == nil || len(*gil.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (gil GalleryImageList) hasNextLink() bool { + return gil.NextLink != nil && len(*gil.NextLink) != 0 +} + +// galleryImageListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) { + if !gil.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(gil.NextLink))) +} + +// GalleryImageListPage contains a page of GalleryImage values. +type GalleryImageListPage struct { + fn func(context.Context, GalleryImageList) (GalleryImageList, error) + gil GalleryImageList +} + +// 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 *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.gil) + if err != nil { + return err + } + page.gil = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *GalleryImageListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page GalleryImageListPage) NotDone() bool { + return !page.gil.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page GalleryImageListPage) Response() GalleryImageList { + return page.gil +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page GalleryImageListPage) Values() []GalleryImage { + if page.gil.IsEmpty() { + return nil + } + return *page.gil.Value +} + +// Creates a new instance of the GalleryImageListPage type. +func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage { + return GalleryImageListPage{ + fn: getNextPage, + gil: cur, + } +} + +// GalleryImageProperties describes the properties of a gallery image definition. +type GalleryImageProperties struct { + // Description - The description of this gallery image definition resource. This property is updatable. + Description *string `json:"description,omitempty"` + // Eula - The Eula agreement for the gallery image definition. + Eula *string `json:"eula,omitempty"` + // PrivacyStatementURI - The privacy statement uri. + PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` + // ReleaseNoteURI - The release note uri. + ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` + // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized' + OsState OperatingSystemStateTypes `json:"osState,omitempty"` + // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2' + HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` + // EndOfLifeDate - The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` + Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` + Disallowed *Disallowed `json:"disallowed,omitempty"` + PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating' + ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"` + // Features - A list of gallery image features. + Features *[]GalleryImageFeature `json:"features,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryImageProperties. +func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gip.Description != nil { + objectMap["description"] = gip.Description + } + if gip.Eula != nil { + objectMap["eula"] = gip.Eula + } + if gip.PrivacyStatementURI != nil { + objectMap["privacyStatementUri"] = gip.PrivacyStatementURI + } + if gip.ReleaseNoteURI != nil { + objectMap["releaseNoteUri"] = gip.ReleaseNoteURI + } + if gip.OsType != "" { + objectMap["osType"] = gip.OsType + } + if gip.OsState != "" { + objectMap["osState"] = gip.OsState + } + if gip.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = gip.HyperVGeneration + } + if gip.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = gip.EndOfLifeDate + } + if gip.Identifier != nil { + objectMap["identifier"] = gip.Identifier + } + if gip.Recommended != nil { + objectMap["recommended"] = gip.Recommended + } + if gip.Disallowed != nil { + objectMap["disallowed"] = gip.Disallowed + } + if gip.PurchasePlan != nil { + objectMap["purchasePlan"] = gip.PurchasePlan + } + if gip.Features != nil { + objectMap["features"] = gip.Features + } + return json.Marshal(objectMap) +} + +// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryImagesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryImagesClient) (GalleryImage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result. +func (future *GalleryImagesCreateOrUpdateFuture) 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.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + gi.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(gi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleryImagesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryImagesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryImagesDeleteFuture.Result. +func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleryImagesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryImagesClient) (GalleryImage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryImagesUpdateFuture.Result. +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 { + gi.Response.Response = future.Response() + 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"` + // 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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// 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 "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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + giu.Tags = tags + } + } + } + + return nil +} + +// GalleryImageVersion specifies information about the gallery image version that you want to create or +// update. +type GalleryImageVersion struct { + autorest.Response `json:"-"` + *GalleryImageVersionProperties `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 GalleryImageVersion. +func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if giv.GalleryImageVersionProperties != nil { + objectMap["properties"] = giv.GalleryImageVersionProperties + } + if giv.Location != nil { + objectMap["location"] = giv.Location + } + if giv.Tags != nil { + objectMap["tags"] = giv.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct. +func (giv *GalleryImageVersion) 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 + } + giv.GalleryImageVersionProperties = &galleryImageVersionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + giv.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + giv.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + giv.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + giv.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + giv.Tags = tags + } + } + } + + return nil +} + +// GalleryImageVersionList the List Gallery Image version operation response. +type GalleryImageVersionList struct { + autorest.Response `json:"-"` + // Value - A list of gallery image versions. + Value *[]GalleryImageVersion `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image versions. + NextLink *string `json:"nextLink,omitempty"` +} + +// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values. +type GalleryImageVersionListIterator struct { + i int + page GalleryImageVersionListPage +} + +// 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 *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.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 *GalleryImageVersionListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter GalleryImageVersionListIterator) 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 GalleryImageVersionListIterator) Response() GalleryImageVersionList { + 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 GalleryImageVersionListIterator) Value() GalleryImageVersion { + if !iter.page.NotDone() { + return GalleryImageVersion{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the GalleryImageVersionListIterator type. +func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator { + return GalleryImageVersionListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (givl GalleryImageVersionList) IsEmpty() bool { + return givl.Value == nil || len(*givl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (givl GalleryImageVersionList) hasNextLink() bool { + return givl.NextLink != nil && len(*givl.NextLink) != 0 +} + +// galleryImageVersionListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) { + if !givl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(givl.NextLink))) +} + +// GalleryImageVersionListPage contains a page of GalleryImageVersion values. +type GalleryImageVersionListPage struct { + fn func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error) + givl GalleryImageVersionList +} + +// 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 *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.givl) + if err != nil { + return err + } + page.givl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *GalleryImageVersionListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page GalleryImageVersionListPage) NotDone() bool { + return !page.givl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page GalleryImageVersionListPage) Response() GalleryImageVersionList { + return page.givl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page GalleryImageVersionListPage) Values() []GalleryImageVersion { + if page.givl.IsEmpty() { + return nil + } + return *page.givl.Value +} + +// Creates a new instance of the GalleryImageVersionListPage type. +func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage { + return GalleryImageVersionListPage{ + fn: getNextPage, + givl: cur, + } +} + +// GalleryImageVersionProperties describes the properties of a gallery image version. +type GalleryImageVersionProperties struct { + PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating' + ProvisioningState ProvisioningState3 `json:"provisioningState,omitempty"` + StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"` + // ReplicationStatus - READ-ONLY + ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryImageVersionProperties. +func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if givp.PublishingProfile != nil { + objectMap["publishingProfile"] = givp.PublishingProfile + } + if givp.StorageProfile != nil { + objectMap["storageProfile"] = givp.StorageProfile + } + return json.Marshal(objectMap) +} + +// GalleryImageVersionPublishingProfile the publishing profile of a gallery image Version. +type GalleryImageVersionPublishingProfile 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', 'StorageAccountTypePremiumLRS' + StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow' + ReplicationMode ReplicationMode `json:"replicationMode,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile. +func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if givpp.TargetRegions != nil { + objectMap["targetRegions"] = givpp.TargetRegions + } + if givpp.ReplicaCount != nil { + objectMap["replicaCount"] = givpp.ReplicaCount + } + if givpp.ExcludeFromLatest != nil { + objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest + } + if givpp.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = givpp.EndOfLifeDate + } + if givpp.StorageAccountType != "" { + objectMap["storageAccountType"] = givpp.StorageAccountType + } + if givpp.ReplicationMode != "" { + objectMap["replicationMode"] = givpp.ReplicationMode + } + return json.Marshal(objectMap) +} + +// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryImageVersionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryImageVersionsClient) (GalleryImageVersion, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result. +func (future *GalleryImageVersionsCreateOrUpdateFuture) 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.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + giv.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(giv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryImageVersionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryImageVersionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryImageVersionsDeleteFuture.Result. +func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version. +type GalleryImageVersionStorageProfile struct { + Source *GalleryArtifactVersionSource `json:"source,omitempty"` + OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"` + // DataDiskImages - A list of data disk images. + DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"` +} + +// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryImageVersionsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GalleryImageVersionsClient) (GalleryImageVersion, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GalleryImageVersionsUpdateFuture.Result. +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 { + giv.Response.Response = future.Response() + 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"` + // 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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// 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 "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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + givu.Tags = tags + } + } + } + + return nil +} + +// GalleryList the List Galleries operation response. +type GalleryList struct { + autorest.Response `json:"-"` + // Value - A list of galleries. + Value *[]Gallery `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries. + NextLink *string `json:"nextLink,omitempty"` +} + +// GalleryListIterator provides access to a complete listing of Gallery values. +type GalleryListIterator struct { + i int + page GalleryListPage +} + +// 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 *GalleryListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.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 *GalleryListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter GalleryListIterator) 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 GalleryListIterator) Response() GalleryList { + 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 GalleryListIterator) Value() Gallery { + if !iter.page.NotDone() { + return Gallery{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the GalleryListIterator type. +func NewGalleryListIterator(page GalleryListPage) GalleryListIterator { + return GalleryListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (gl GalleryList) IsEmpty() bool { + return gl.Value == nil || len(*gl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (gl GalleryList) hasNextLink() bool { + return gl.NextLink != nil && len(*gl.NextLink) != 0 +} + +// galleryListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) { + if !gl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(gl.NextLink))) +} + +// GalleryListPage contains a page of Gallery values. +type GalleryListPage struct { + fn func(context.Context, GalleryList) (GalleryList, error) + gl GalleryList +} + +// 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 *GalleryListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.gl) + if err != nil { + return err + } + page.gl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *GalleryListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page GalleryListPage) NotDone() bool { + return !page.gl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page GalleryListPage) Response() GalleryList { + return page.gl +} + +// Values returns the slice of values for the current page or nil if there are no values. +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(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage { + return GalleryListPage{ + fn: getNextPage, + gl: cur, + } +} + +// 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"` +} + +// MarshalJSON is the custom marshaler for GalleryOSDiskImage. +func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if godi.HostCaching != "" { + objectMap["hostCaching"] = godi.HostCaching + } + if godi.Source != nil { + objectMap["source"] = godi.Source + } + return json.Marshal(objectMap) +} + +// 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"` + SharingProfile *SharingProfile `json:"sharingProfile,omitempty"` + SoftDeletePolicy *SoftDeletePolicy `json:"softDeletePolicy,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryProperties. +func (gp GalleryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gp.Description != nil { + objectMap["description"] = gp.Description + } + if gp.Identifier != nil { + objectMap["identifier"] = gp.Identifier + } + if gp.SharingProfile != nil { + objectMap["sharingProfile"] = gp.SharingProfile + } + if gp.SoftDeletePolicy != nil { + objectMap["softDeletePolicy"] = gp.SoftDeletePolicy + } + return json.Marshal(objectMap) +} + +// GallerySharingProfileUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GallerySharingProfileUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(GallerySharingProfileClient) (SharingUpdate, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GallerySharingProfileUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GallerySharingProfileUpdateFuture.Result. +func (future *GallerySharingProfileUpdateFuture) result(client GallerySharingProfileClient) (su SharingUpdate, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + su.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.GallerySharingProfileUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if su.Response.Response, err = future.GetResult(sender); err == nil && su.Response.Response.StatusCode != http.StatusNoContent { + su, err = client.UpdateResponder(su.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileUpdateFuture", "Result", su.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryUpdate specifies information about the Shared Image Gallery that you want to update. +type GalleryUpdate struct { + *GalleryProperties `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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// 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 "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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gu.Tags = tags + } + } + } + + return nil +} + +// GrantAccessData data used for requesting a SAS. +type GrantAccessData struct { + // Access - Possible values include: 'AccessLevelNone', 'AccessLevelRead', 'AccessLevelWrite' + Access AccessLevel `json:"access,omitempty"` + // DurationInSeconds - Time duration in seconds until the SAS access expires. + DurationInSeconds *int32 `json:"durationInSeconds,omitempty"` +} + +// HardwareProfile specifies the hardware settings for the virtual machine. +type HardwareProfile struct { + // VMSize - Specifies the size of the virtual machine.

The enum data type is currently deprecated and will be removed by December 23rd 2023.

Recommended way to get the list of available sizes is using these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

[List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24' + VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"` + // VMSizeProperties - Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01.

This feature is still in preview mode and is not supported for VirtualMachineScaleSet.

Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + VMSizeProperties *VMSizeProperties `json:"vmSizeProperties,omitempty"` +} + +// Image the source user image virtual hard disk. The virtual hard disk will be copied before being +// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not +// exist. +type Image struct { + autorest.Response `json:"-"` + *ImageProperties `json:"properties,omitempty"` + // ExtendedLocation - The extended location of the Image. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,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 Image. +func (i Image) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.ImageProperties != nil { + objectMap["properties"] = i.ImageProperties + } + if i.ExtendedLocation != nil { + objectMap["extendedLocation"] = i.ExtendedLocation + } + if i.Location != nil { + objectMap["location"] = i.Location + } + if i.Tags != nil { + objectMap["tags"] = i.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Image struct. +func (i *Image) 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 imageProperties ImageProperties + err = json.Unmarshal(*v, &imageProperties) + if err != nil { + return err + } + i.ImageProperties = &imageProperties + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + i.ExtendedLocation = &extendedLocation + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + i.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + i.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + i.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + i.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + i.Tags = tags + } + } + } + + return nil +} + +// ImageDataDisk describes a data disk. +type ImageDataDisk struct { + // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + Lun *int32 `json:"lun,omitempty"` + // Snapshot - The snapshot. + Snapshot *SubResource `json:"snapshot,omitempty"` + // ManagedDisk - The managedDisk. + ManagedDisk *SubResource `json:"managedDisk,omitempty"` + // BlobURI - The Virtual Hard Disk. + BlobURI *string `json:"blobUri,omitempty"` + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS' + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` + // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk. + DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` +} + +// ImageDisk describes a image disk. +type ImageDisk struct { + // Snapshot - The snapshot. + Snapshot *SubResource `json:"snapshot,omitempty"` + // ManagedDisk - The managedDisk. + ManagedDisk *SubResource `json:"managedDisk,omitempty"` + // BlobURI - The Virtual Hard Disk. + BlobURI *string `json:"blobUri,omitempty"` + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS' + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` + // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk. + DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` +} + +// ImageDiskReference the source image used for creating the disk. +type ImageDiskReference struct { + // ID - A relative uri containing either a Platform Image Repository or user image reference. + ID *string `json:"id,omitempty"` + // Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. + Lun *int32 `json:"lun,omitempty"` +} + +// ImageListResult the List Image operation response. +type ImageListResult struct { + autorest.Response `json:"-"` + // Value - The list of Images. + Value *[]Image `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images. + NextLink *string `json:"nextLink,omitempty"` +} + +// ImageListResultIterator provides access to a complete listing of Image values. +type ImageListResultIterator struct { + i int + page ImageListResultPage +} + +// 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 *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.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 *ImageListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ImageListResultIterator) 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 ImageListResultIterator) Response() ImageListResult { + 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 ImageListResultIterator) Value() Image { + if !iter.page.NotDone() { + return Image{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ImageListResultIterator type. +func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator { + return ImageListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ilr ImageListResult) IsEmpty() bool { + return ilr.Value == nil || len(*ilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ilr ImageListResult) hasNextLink() bool { + return ilr.NextLink != nil && len(*ilr.NextLink) != 0 +} + +// imageListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ilr.NextLink))) +} + +// ImageListResultPage contains a page of Image values. +type ImageListResultPage struct { + fn func(context.Context, ImageListResult) (ImageListResult, error) + ilr ImageListResult +} + +// 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 *ImageListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ilr) + if err != nil { + return err + } + page.ilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ImageListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ImageListResultPage) NotDone() bool { + return !page.ilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ImageListResultPage) Response() ImageListResult { + return page.ilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ImageListResultPage) Values() []Image { + if page.ilr.IsEmpty() { + return nil + } + return *page.ilr.Value +} + +// Creates a new instance of the ImageListResultPage type. +func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage { + return ImageListResultPage{ + fn: getNextPage, + ilr: cur, + } +} + +// ImageOSDisk describes an Operating System disk. +type ImageOSDisk struct { + // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.

Possible values are:

**Windows**

**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // OsState - The OS State. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized' + OsState OperatingSystemStateTypes `json:"osState,omitempty"` + // Snapshot - The snapshot. + Snapshot *SubResource `json:"snapshot,omitempty"` + // ManagedDisk - The managedDisk. + ManagedDisk *SubResource `json:"managedDisk,omitempty"` + // BlobURI - The Virtual Hard Disk. + BlobURI *string `json:"blobUri,omitempty"` + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS' + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` + // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk. + DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` +} + +// ImageProperties describes the properties of an Image. +type ImageProperties struct { + // SourceVirtualMachine - The source virtual machine from which Image is created. + SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"` + // StorageProfile - Specifies the storage settings for the virtual machine disks. + StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + // HyperVGeneration - Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2' + HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` +} + +// MarshalJSON is the custom marshaler for ImageProperties. +func (IP ImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if IP.SourceVirtualMachine != nil { + objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine + } + if IP.StorageProfile != nil { + objectMap["storageProfile"] = IP.StorageProfile + } + if IP.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = IP.HyperVGeneration + } + return json.Marshal(objectMap) +} + +// ImagePurchasePlan describes the gallery image definition purchase plan. This is used by marketplace +// images. +type ImagePurchasePlan struct { + // Name - The plan ID. + Name *string `json:"name,omitempty"` + // Publisher - The publisher ID. + Publisher *string `json:"publisher,omitempty"` + // Product - The product ID. + Product *string `json:"product,omitempty"` +} + +// ImageReference specifies information about the image to use. You can specify information about platform +// images, marketplace images, or virtual machine images. This element is required when you want to use a +// platform image, marketplace image, or virtual machine image, but is not used in other creation +// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. +type ImageReference struct { + // Publisher - The image publisher. + Publisher *string `json:"publisher,omitempty"` + // Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine. + Offer *string `json:"offer,omitempty"` + // Sku - The image SKU. + Sku *string `json:"sku,omitempty"` + // Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + Version *string `json:"version,omitempty"` + // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. + ExactVersion *string `json:"exactVersion,omitempty"` + // SharedGalleryImageID - Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. + SharedGalleryImageID *string `json:"sharedGalleryImageId,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ImageReference. +func (ir ImageReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ir.Publisher != nil { + objectMap["publisher"] = ir.Publisher + } + if ir.Offer != nil { + objectMap["offer"] = ir.Offer + } + if ir.Sku != nil { + objectMap["sku"] = ir.Sku + } + if ir.Version != nil { + objectMap["version"] = ir.Version + } + if ir.SharedGalleryImageID != nil { + objectMap["sharedGalleryImageId"] = ir.SharedGalleryImageID + } + if ir.ID != nil { + objectMap["id"] = ir.ID + } + return json.Marshal(objectMap) +} + +// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ImagesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ImagesClient) (Image, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ImagesCreateOrUpdateFuture.Result. +func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + i.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.CreateOrUpdateResponder(i.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") + } + } + return +} + +// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type ImagesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ImagesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ImagesDeleteFuture.Result. +func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ImageStorageProfile describes a storage profile. +type ImageStorageProfile struct { + // OsDisk - Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + OsDisk *ImageOSDisk `json:"osDisk,omitempty"` + // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"` + // ZoneResilient - Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). + ZoneResilient *bool `json:"zoneResilient,omitempty"` +} + +// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type ImagesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ImagesClient) (Image, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ImagesUpdateFuture.Result. +func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + i.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.UpdateResponder(i.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request") + } + } + return +} + +// ImageUpdate the source user image virtual hard disk. Only tags may be updated. +type ImageUpdate struct { + *ImageProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ImageUpdate. +func (iu ImageUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iu.ImageProperties != nil { + objectMap["properties"] = iu.ImageProperties + } + if iu.Tags != nil { + objectMap["tags"] = iu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct. +func (iu *ImageUpdate) 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 imageProperties ImageProperties + err = json.Unmarshal(*v, &imageProperties) + if err != nil { + return err + } + iu.ImageProperties = &imageProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + iu.Tags = tags + } + } + } + + return nil +} + +// InnerError inner error details. +type InnerError struct { + // Exceptiontype - The exception type. + Exceptiontype *string `json:"exceptiontype,omitempty"` + // Errordetail - The internal error message or exception dump. + Errordetail *string `json:"errordetail,omitempty"` +} + +// InstanceSku ... +type InstanceSku struct { + // Name - READ-ONLY; The sku name. + Name *string `json:"name,omitempty"` + // Tier - READ-ONLY; The tier of the cloud service role instance. + Tier *string `json:"tier,omitempty"` +} + +// MarshalJSON is the custom marshaler for InstanceSku. +func (is InstanceSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// InstanceViewStatus instance view status. +type InstanceViewStatus struct { + // Code - The status code. + Code *string `json:"code,omitempty"` + // Level - The level code. Possible values include: 'StatusLevelTypesInfo', 'StatusLevelTypesWarning', 'StatusLevelTypesError' + Level StatusLevelTypes `json:"level,omitempty"` + // DisplayStatus - The short localizable label for the status. + DisplayStatus *string `json:"displayStatus,omitempty"` + // Message - The detailed status message, including for alerts and error messages. + Message *string `json:"message,omitempty"` + // Time - The time of the status. + Time *date.Time `json:"time,omitempty"` +} + +// InstanceViewStatusesSummary instance view statuses. +type InstanceViewStatusesSummary struct { + // StatusesSummary - READ-ONLY + StatusesSummary *[]StatusCodeCount `json:"statusesSummary,omitempty"` +} + +// MarshalJSON is the custom marshaler for InstanceViewStatusesSummary. +func (ivss InstanceViewStatusesSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// KeyForDiskEncryptionSet key Vault Key Url to be used for server side encryption of Managed Disks and +// Snapshots +type KeyForDiskEncryptionSet struct { + // SourceVault - Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription. + SourceVault *SourceVault `json:"sourceVault,omitempty"` + // KeyURL - Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value. + KeyURL *string `json:"keyUrl,omitempty"` +} + +// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used +// to unwrap the encryptionKey +type KeyVaultAndKeyReference struct { + // SourceVault - Resource id of the KeyVault containing the key or secret + SourceVault *SourceVault `json:"sourceVault,omitempty"` + // KeyURL - Url pointing to a key or secret in KeyVault + KeyURL *string `json:"keyUrl,omitempty"` +} + +// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key +type KeyVaultAndSecretReference struct { + // SourceVault - Resource id of the KeyVault containing the key or secret + SourceVault *SourceVault `json:"sourceVault,omitempty"` + // SecretURL - Url pointing to a key or secret in KeyVault + SecretURL *string `json:"secretUrl,omitempty"` +} + +// KeyVaultKeyReference describes a reference to Key Vault Key +type KeyVaultKeyReference struct { + // KeyURL - The URL referencing a key encryption key in Key Vault. + KeyURL *string `json:"keyUrl,omitempty"` + // SourceVault - The relative URL of the Key Vault containing the key. + SourceVault *SubResource `json:"sourceVault,omitempty"` +} + +// KeyVaultSecretReference describes a reference to Key Vault Secret +type KeyVaultSecretReference struct { + // SecretURL - The URL referencing a secret in a Key Vault. + SecretURL *string `json:"secretUrl,omitempty"` + // SourceVault - The relative URL of the Key Vault containing the secret. + SourceVault *SubResource `json:"sourceVault,omitempty"` +} + +// LastPatchInstallationSummary describes the properties of the last installed patch summary. +type LastPatchInstallationSummary struct { + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + InstallationActivityID *string `json:"installationActivityId,omitempty"` + // MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions + MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"` + // NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. + NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"` + // ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match. + ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"` + // PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation. + PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"` + // InstalledPatchCount - READ-ONLY; The count of patches that successfully installed. + InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"` + // FailedPatchCount - READ-ONLY; The count of patches that failed installation. + FailedPatchCount *int32 `json:"failedPatchCount,omitempty"` + // StartTime - READ-ONLY; The UTC timestamp when the operation began. + StartTime *date.Time `json:"startTime,omitempty"` + // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for LastPatchInstallationSummary. +func (lpis LastPatchInstallationSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// LinuxConfiguration specifies the Linux operating system settings on the virtual machine.

For a +// list of supported Linux distributions, see [Linux on Azure-Endorsed +// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). +type LinuxConfiguration struct { + // DisablePasswordAuthentication - Specifies whether password authentication should be disabled. + DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` + // SSH - Specifies the ssh key configuration for a Linux OS. + SSH *SSHConfiguration `json:"ssh,omitempty"` + // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + // PatchSettings - [Preview Feature] Specifies settings related to VM Guest Patching on Linux. + PatchSettings *LinuxPatchSettings `json:"patchSettings,omitempty"` +} + +// LinuxParameters input for InstallPatches on a Linux VM, as directly received by the API +type LinuxParameters struct { + // ClassificationsToInclude - The update classifications to select when installing patches for Linux. + ClassificationsToInclude *[]VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"` + // PackageNameMasksToInclude - packages to include in the patch operation. Format: packageName_packageVersion + PackageNameMasksToInclude *[]string `json:"packageNameMasksToInclude,omitempty"` + // PackageNameMasksToExclude - packages to exclude in the patch operation. Format: packageName_packageVersion + PackageNameMasksToExclude *[]string `json:"packageNameMasksToExclude,omitempty"` + // MaintenanceRunID - This is used as a maintenance run identifier for Auto VM Guest Patching in Linux. + MaintenanceRunID *string `json:"maintenanceRunId,omitempty"` +} + +// LinuxPatchSettings specifies settings related to VM Guest Patching on Linux. +type LinuxPatchSettings struct { + // PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**ImageDefault** - The virtual machine's default patching configuration is used.

**AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Possible values include: 'LinuxVMGuestPatchModeImageDefault', 'LinuxVMGuestPatchModeAutomaticByPlatform' + PatchMode LinuxVMGuestPatchMode `json:"patchMode,omitempty"` + // AssessmentMode - Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Possible values include: 'LinuxPatchAssessmentModeImageDefault', 'LinuxPatchAssessmentModeAutomaticByPlatform' + AssessmentMode LinuxPatchAssessmentMode `json:"assessmentMode,omitempty"` +} + +// ListUsagesResult the List Usages operation response. +type ListUsagesResult struct { + autorest.Response `json:"-"` + // Value - The list of compute resource usages. + Value *[]Usage `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListUsagesResultIterator provides access to a complete listing of Usage values. +type ListUsagesResultIterator struct { + i int + page ListUsagesResultPage +} + +// 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 *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.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 *ListUsagesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListUsagesResultIterator) 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 ListUsagesResultIterator) Response() ListUsagesResult { + 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 ListUsagesResultIterator) Value() Usage { + if !iter.page.NotDone() { + return Usage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListUsagesResultIterator type. +func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator { + return ListUsagesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lur ListUsagesResult) IsEmpty() bool { + return lur.Value == nil || len(*lur.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lur ListUsagesResult) hasNextLink() bool { + return lur.NextLink != nil && len(*lur.NextLink) != 0 +} + +// listUsagesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) { + if !lur.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lur.NextLink))) +} + +// ListUsagesResultPage contains a page of Usage values. +type ListUsagesResultPage struct { + fn func(context.Context, ListUsagesResult) (ListUsagesResult, error) + lur ListUsagesResult +} + +// 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 *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lur) + if err != nil { + return err + } + page.lur = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListUsagesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListUsagesResultPage) NotDone() bool { + return !page.lur.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListUsagesResultPage) Response() ListUsagesResult { + return page.lur +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListUsagesResultPage) Values() []Usage { + if page.lur.IsEmpty() { + return nil + } + return *page.lur.Value +} + +// Creates a new instance of the ListUsagesResultPage type. +func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage { + return ListUsagesResultPage{ + fn: getNextPage, + lur: cur, + } +} + +// ListVirtualMachineExtensionImage ... +type ListVirtualMachineExtensionImage struct { + autorest.Response `json:"-"` + Value *[]VirtualMachineExtensionImage `json:"value,omitempty"` +} + +// ListVirtualMachineImageResource ... +type ListVirtualMachineImageResource struct { + autorest.Response `json:"-"` + Value *[]VirtualMachineImageResource `json:"value,omitempty"` +} + +// LoadBalancerConfiguration describes the load balancer configuration. +type LoadBalancerConfiguration struct { + // ID - Resource Id + ID *string `json:"id,omitempty"` + // Name - The name of the Load balancer + Name *string `json:"name,omitempty"` + // Properties - Properties of the load balancer configuration. + Properties *LoadBalancerConfigurationProperties `json:"properties,omitempty"` +} + +// LoadBalancerConfigurationProperties ... +type LoadBalancerConfigurationProperties struct { + // FrontendIPConfigurations - Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. + FrontendIPConfigurations *[]LoadBalancerFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` +} + +// LoadBalancerFrontendIPConfiguration ... +type LoadBalancerFrontendIPConfiguration struct { + // Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Properties - Properties of load balancer frontend ip configuration. + Properties *LoadBalancerFrontendIPConfigurationProperties `json:"properties,omitempty"` +} + +// LoadBalancerFrontendIPConfigurationProperties describes a cloud service IP Configuration +type LoadBalancerFrontendIPConfigurationProperties struct { + // PublicIPAddress - The reference to the public ip address resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // Subnet - The reference to the virtual network subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // PrivateIPAddress - The virtual network private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` +} + +// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type LogAnalyticsExportRequestRateByIntervalFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result. +func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + laor.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent { + laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request") + } + } + return +} + +// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LogAnalyticsExportThrottledRequestsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result. +func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + laor.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent { + laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request") + } + } + return +} + +// LogAnalyticsInputBase api input base class for LogAnalytics Api. +type LogAnalyticsInputBase struct { + // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. + BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` + // FromTime - From time of the query + FromTime *date.Time `json:"fromTime,omitempty"` + // ToTime - To time of the query + ToTime *date.Time `json:"toTime,omitempty"` + // GroupByThrottlePolicy - Group query result by Throttle Policy applied. + GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` + // GroupByOperationName - Group query result by Operation Name. + GroupByOperationName *bool `json:"groupByOperationName,omitempty"` + // GroupByResourceName - Group query result by Resource Name. + GroupByResourceName *bool `json:"groupByResourceName,omitempty"` + // GroupByClientApplicationID - Group query result by Client Application ID. + GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"` + // GroupByUserAgent - Group query result by User Agent. + GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"` +} + +// LogAnalyticsOperationResult logAnalytics operation status response +type LogAnalyticsOperationResult struct { + autorest.Response `json:"-"` + // Properties - READ-ONLY; LogAnalyticsOutput + Properties *LogAnalyticsOutput `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult. +func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// LogAnalyticsOutput logAnalytics output properties +type LogAnalyticsOutput struct { + // Output - READ-ONLY; Output file Uri path to blob container. + Output *string `json:"output,omitempty"` +} + +// MarshalJSON is the custom marshaler for LogAnalyticsOutput. +func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// MaintenanceRedeployStatus maintenance Operation Status. +type MaintenanceRedeployStatus struct { + // IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance. + IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"` + // PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window. + PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"` + // PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window. + PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"` + // MaintenanceWindowStartTime - Start Time for the Maintenance Window. + MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"` + // MaintenanceWindowEndTime - End Time for the Maintenance Window. + MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"` + // LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted' + LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"` + // LastOperationMessage - Message returned for the last Maintenance Operation. + LastOperationMessage *string `json:"lastOperationMessage,omitempty"` +} + +// ManagedArtifact the managed artifact. +type ManagedArtifact struct { + // ID - The managed artifact id. + ID *string `json:"id,omitempty"` +} + +// ManagedDiskParameters the parameters of a managed disk. +type ManagedDiskParameters struct { + // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS' + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` + // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk. + DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// NetworkInterfaceReference describes a network interface reference. +type NetworkInterfaceReference struct { + *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for NetworkInterfaceReference. +func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if nir.NetworkInterfaceReferenceProperties != nil { + objectMap["properties"] = nir.NetworkInterfaceReferenceProperties + } + if nir.ID != nil { + objectMap["id"] = nir.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct. +func (nir *NetworkInterfaceReference) 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 networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties + err = json.Unmarshal(*v, &networkInterfaceReferenceProperties) + if err != nil { + return err + } + nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + nir.ID = &ID + } + } + } + + return nil +} + +// NetworkInterfaceReferenceProperties describes a network interface reference properties. +type NetworkInterfaceReferenceProperties struct { + // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. + Primary *bool `json:"primary,omitempty"` + // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` +} + +// NetworkProfile specifies the network interfaces or the networking configuration of the virtual machine. +type NetworkProfile struct { + // NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine. + NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"` + // NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations. Possible values include: 'NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne' + NetworkAPIVersion NetworkAPIVersion `json:"networkApiVersion,omitempty"` + // NetworkInterfaceConfigurations - Specifies the networking configurations that will be used to create the virtual machine networking resources. + NetworkInterfaceConfigurations *[]VirtualMachineNetworkInterfaceConfiguration `json:"networkInterfaceConfigurations,omitempty"` +} + +// OperationListResult the List Compute Operation operation response. +type OperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of compute operations + Value *[]OperationValue `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationListResult. +func (olr OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OperationValue describes the properties of a Compute Operation value. +type OperationValue struct { + // Origin - READ-ONLY; The origin of the compute operation. + Origin *string `json:"origin,omitempty"` + // Name - READ-ONLY; The name of the compute operation. + Name *string `json:"name,omitempty"` + *OperationValueDisplay `json:"display,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationValue. +func (ov OperationValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ov.OperationValueDisplay != nil { + objectMap["display"] = ov.OperationValueDisplay + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OperationValue struct. +func (ov *OperationValue) 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 "origin": + if v != nil { + var origin string + err = json.Unmarshal(*v, &origin) + if err != nil { + return err + } + ov.Origin = &origin + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ov.Name = &name + } + case "display": + if v != nil { + var operationValueDisplay OperationValueDisplay + err = json.Unmarshal(*v, &operationValueDisplay) + if err != nil { + return err + } + ov.OperationValueDisplay = &operationValueDisplay + } + } + } + + return nil +} + +// OperationValueDisplay describes the properties of a Compute Operation Value Display. +type OperationValueDisplay struct { + // Operation - READ-ONLY; The display name of the compute operation. + Operation *string `json:"operation,omitempty"` + // Resource - READ-ONLY; The display name of the resource the operation applies to. + Resource *string `json:"resource,omitempty"` + // Description - READ-ONLY; The description of the operation. + Description *string `json:"description,omitempty"` + // Provider - READ-ONLY; The resource provider for the operation. + Provider *string `json:"provider,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationValueDisplay. +func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OrchestrationServiceStateInput the input for OrchestrationServiceState +type OrchestrationServiceStateInput struct { + // ServiceName - The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` + // Action - The action to be performed. Possible values include: 'OrchestrationServiceStateActionResume', 'OrchestrationServiceStateActionSuspend' + Action OrchestrationServiceStateAction `json:"action,omitempty"` +} + +// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set. +type OrchestrationServiceSummary struct { + // ServiceName - READ-ONLY; The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs', 'OrchestrationServiceNamesDummyOrchestrationServiceName' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` + // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'OrchestrationServiceStateNotRunning', 'OrchestrationServiceStateRunning', 'OrchestrationServiceStateSuspended' + ServiceState OrchestrationServiceState `json:"serviceState,omitempty"` +} + +// MarshalJSON is the custom marshaler for OrchestrationServiceSummary. +func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OSDisk specifies information about the operating system disk used by the virtual machine.

For +// more information about disks, see [About disks and VHDs for Azure virtual +// machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). +type OSDisk struct { + // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // EncryptionSettings - Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 + EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` + // Name - The disk name. + Name *string `json:"name,omitempty"` + // Vhd - The virtual hard disk. + Vhd *VirtualHardDisk `json:"vhd,omitempty"` + // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + Image *VirtualHardDisk `json:"image,omitempty"` + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None** for Standard storage. **ReadOnly** for Premium storage. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` + // DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. + DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` + // CreateOption - Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' + CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` + // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // ManagedDisk - The managed disk parameters. + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + // DeleteOption - Specifies whether OS Disk should be deleted or detached upon VM deletion.

Possible values:

**Delete** If this value is used, the OS disk is deleted when VM is deleted.

**Detach** If this value is used, the os disk is retained after VM is deleted.

The default value is set to **detach**. For an ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for ephemeral OS Disk. Possible values include: 'DiskDeleteOptionTypesDelete', 'DiskDeleteOptionTypesDetach' + DeleteOption DiskDeleteOptionTypes `json:"deleteOption,omitempty"` +} + +// OSDiskImage contains the os disk image information. +type OSDiskImage struct { + // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"` +} + +// OSDiskImageEncryption contains encryption settings for an OS disk image. +type OSDiskImageEncryption struct { + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + +// OSFamily describes a cloud service OS family. +type OSFamily struct { + autorest.Response `json:"-"` + // 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; Resource location. + Location *string `json:"location,omitempty"` + Properties *OSFamilyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for OSFamily. +func (of OSFamily) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if of.Properties != nil { + objectMap["properties"] = of.Properties + } + return json.Marshal(objectMap) +} + +// OSFamilyListResult ... +type OSFamilyListResult struct { + autorest.Response `json:"-"` + Value *[]OSFamily `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OSFamilyListResultIterator provides access to a complete listing of OSFamily values. +type OSFamilyListResultIterator struct { + i int + page OSFamilyListResultPage +} + +// 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 *OSFamilyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OSFamilyListResultIterator.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 *OSFamilyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OSFamilyListResultIterator) 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 OSFamilyListResultIterator) Response() OSFamilyListResult { + 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 OSFamilyListResultIterator) Value() OSFamily { + if !iter.page.NotDone() { + return OSFamily{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OSFamilyListResultIterator type. +func NewOSFamilyListResultIterator(page OSFamilyListResultPage) OSFamilyListResultIterator { + return OSFamilyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (oflr OSFamilyListResult) IsEmpty() bool { + return oflr.Value == nil || len(*oflr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (oflr OSFamilyListResult) hasNextLink() bool { + return oflr.NextLink != nil && len(*oflr.NextLink) != 0 +} + +// oSFamilyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (oflr OSFamilyListResult) oSFamilyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !oflr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(oflr.NextLink))) +} + +// OSFamilyListResultPage contains a page of OSFamily values. +type OSFamilyListResultPage struct { + fn func(context.Context, OSFamilyListResult) (OSFamilyListResult, error) + oflr OSFamilyListResult +} + +// 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 *OSFamilyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OSFamilyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.oflr) + if err != nil { + return err + } + page.oflr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *OSFamilyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OSFamilyListResultPage) NotDone() bool { + return !page.oflr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OSFamilyListResultPage) Response() OSFamilyListResult { + return page.oflr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OSFamilyListResultPage) Values() []OSFamily { + if page.oflr.IsEmpty() { + return nil + } + return *page.oflr.Value +} + +// Creates a new instance of the OSFamilyListResultPage type. +func NewOSFamilyListResultPage(cur OSFamilyListResult, getNextPage func(context.Context, OSFamilyListResult) (OSFamilyListResult, error)) OSFamilyListResultPage { + return OSFamilyListResultPage{ + fn: getNextPage, + oflr: cur, + } +} + +// OSFamilyProperties OS family properties. +type OSFamilyProperties struct { + // Name - READ-ONLY; The OS family name. + Name *string `json:"name,omitempty"` + // Label - READ-ONLY; The OS family label. + Label *string `json:"label,omitempty"` + // Versions - READ-ONLY; List of OS versions belonging to this family. + Versions *[]OSVersionPropertiesBase `json:"versions,omitempty"` +} + +// MarshalJSON is the custom marshaler for OSFamilyProperties. +func (ofp OSFamilyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot +// be changed once VM is provisioned. +type OSProfile struct { + // ComputerName - Specifies the host OS name of the virtual machine.

This name cannot be updated after the VM is created.

**Max-length (Windows):** 15 characters

**Max-length (Linux):** 64 characters.

For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + ComputerName *string `json:"computerName,omitempty"` + // AdminUsername - Specifies the name of the administrator account.

This property cannot be updated after the VM is created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 characters. + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + AdminPassword *string `json:"adminPassword,omitempty"` + // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

**Note: Do not pass any secrets or passwords in customData property**

This property cannot be updated after the VM is created.

customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) + CustomData *string `json:"customData,omitempty"` + // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. + WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` + // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` + // Secrets - Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` + // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.

This may only be set to False when no extensions are present on the virtual machine. + AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` + // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine. **Note: This property is for private testing only, and all customers must not set the property to false.** + RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"` +} + +// OSVersion describes a cloud service OS version. +type OSVersion struct { + autorest.Response `json:"-"` + // 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; Resource location. + Location *string `json:"location,omitempty"` + Properties *OSVersionProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for OSVersion. +func (ov OSVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ov.Properties != nil { + objectMap["properties"] = ov.Properties + } + return json.Marshal(objectMap) +} + +// OSVersionListResult ... +type OSVersionListResult struct { + autorest.Response `json:"-"` + Value *[]OSVersion `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OSVersionListResultIterator provides access to a complete listing of OSVersion values. +type OSVersionListResultIterator struct { + i int + page OSVersionListResultPage +} + +// 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 *OSVersionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OSVersionListResultIterator.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 *OSVersionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OSVersionListResultIterator) 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 OSVersionListResultIterator) Response() OSVersionListResult { + 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 OSVersionListResultIterator) Value() OSVersion { + if !iter.page.NotDone() { + return OSVersion{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OSVersionListResultIterator type. +func NewOSVersionListResultIterator(page OSVersionListResultPage) OSVersionListResultIterator { + return OSVersionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ovlr OSVersionListResult) IsEmpty() bool { + return ovlr.Value == nil || len(*ovlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ovlr OSVersionListResult) hasNextLink() bool { + return ovlr.NextLink != nil && len(*ovlr.NextLink) != 0 +} + +// oSVersionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ovlr OSVersionListResult) oSVersionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ovlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ovlr.NextLink))) +} + +// OSVersionListResultPage contains a page of OSVersion values. +type OSVersionListResultPage struct { + fn func(context.Context, OSVersionListResult) (OSVersionListResult, error) + ovlr OSVersionListResult +} + +// 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 *OSVersionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OSVersionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ovlr) + if err != nil { + return err + } + page.ovlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *OSVersionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OSVersionListResultPage) NotDone() bool { + return !page.ovlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OSVersionListResultPage) Response() OSVersionListResult { + return page.ovlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OSVersionListResultPage) Values() []OSVersion { + if page.ovlr.IsEmpty() { + return nil + } + return *page.ovlr.Value +} + +// Creates a new instance of the OSVersionListResultPage type. +func NewOSVersionListResultPage(cur OSVersionListResult, getNextPage func(context.Context, OSVersionListResult) (OSVersionListResult, error)) OSVersionListResultPage { + return OSVersionListResultPage{ + fn: getNextPage, + ovlr: cur, + } +} + +// OSVersionProperties OS version properties. +type OSVersionProperties struct { + // Family - READ-ONLY; The family of this OS version. + Family *string `json:"family,omitempty"` + // FamilyLabel - READ-ONLY; The family label of this OS version. + FamilyLabel *string `json:"familyLabel,omitempty"` + // Version - READ-ONLY; The OS version. + Version *string `json:"version,omitempty"` + // Label - READ-ONLY; The OS version label. + Label *string `json:"label,omitempty"` + // IsDefault - READ-ONLY; Specifies whether this is the default OS version for its family. + IsDefault *bool `json:"isDefault,omitempty"` + // IsActive - READ-ONLY; Specifies whether this OS version is active. + IsActive *bool `json:"isActive,omitempty"` +} + +// MarshalJSON is the custom marshaler for OSVersionProperties. +func (ovp OSVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OSVersionPropertiesBase configuration view of an OS version. +type OSVersionPropertiesBase struct { + // Version - READ-ONLY; The OS version. + Version *string `json:"version,omitempty"` + // Label - READ-ONLY; The OS version label. + Label *string `json:"label,omitempty"` + // IsDefault - READ-ONLY; Specifies whether this is the default OS version for its family. + IsDefault *bool `json:"isDefault,omitempty"` + // IsActive - READ-ONLY; Specifies whether this OS version is active. + IsActive *bool `json:"isActive,omitempty"` +} + +// MarshalJSON is the custom marshaler for OSVersionPropertiesBase. +func (ovpb OSVersionPropertiesBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PatchInstallationDetail information about a specific patch that was encountered during an installation +// action. +type PatchInstallationDetail struct { + // PatchID - READ-ONLY; A unique identifier for the patch. + PatchID *string `json:"patchId,omitempty"` + // Name - READ-ONLY; The friendly name of the patch. + Name *string `json:"name,omitempty"` + // Version - READ-ONLY; The version string of the package. It may conform to Semantic Versioning. Only applies to Linux. + Version *string `json:"version,omitempty"` + // KbID - READ-ONLY; The KBID of the patch. Only applies to Windows patches. + KbID *string `json:"kbId,omitempty"` + // Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher. + Classifications *[]string `json:"classifications,omitempty"` + // InstallationState - READ-ONLY; The state of the patch after the installation operation completed. Possible values include: 'PatchInstallationStateUnknown', 'PatchInstallationStateInstalled', 'PatchInstallationStateFailed', 'PatchInstallationStateExcluded', 'PatchInstallationStateNotSelected', 'PatchInstallationStatePending' + InstallationState PatchInstallationState `json:"installationState,omitempty"` +} + +// MarshalJSON is the custom marshaler for PatchInstallationDetail. +func (pid PatchInstallationDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PatchSettings specifies settings related to VM Guest Patching on Windows. +type PatchSettings struct { + // PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'WindowsVMGuestPatchModeManual', 'WindowsVMGuestPatchModeAutomaticByOS', 'WindowsVMGuestPatchModeAutomaticByPlatform' + PatchMode WindowsVMGuestPatchMode `json:"patchMode,omitempty"` + // EnableHotpatching - Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'. + EnableHotpatching *bool `json:"enableHotpatching,omitempty"` + // AssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Possible values include: 'WindowsPatchAssessmentModeImageDefault', 'WindowsPatchAssessmentModeAutomaticByPlatform' + AssessmentMode WindowsPatchAssessmentMode `json:"assessmentMode,omitempty"` +} + +// PirResource the Resource model definition. +type PirResource struct { + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for PirResource. +func (pr PirResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PirSharedGalleryResource base information about the shared gallery resource in pir. +type PirSharedGalleryResource struct { + *SharedGalleryIdentifier `json:"identifier,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for PirSharedGalleryResource. +func (psgr PirSharedGalleryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if psgr.SharedGalleryIdentifier != nil { + objectMap["identifier"] = psgr.SharedGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PirSharedGalleryResource struct. +func (psgr *PirSharedGalleryResource) 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 "identifier": + if v != nil { + var sharedGalleryIdentifier SharedGalleryIdentifier + err = json.Unmarshal(*v, &sharedGalleryIdentifier) + if err != nil { + return err + } + psgr.SharedGalleryIdentifier = &sharedGalleryIdentifier + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + psgr.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + psgr.Location = &location + } + } + } + + return nil +} + +// Plan specifies information about the marketplace image used to create the virtual machine. This element +// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable +// the image for programmatic use. In the Azure portal, find the marketplace image that you want to use +// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and +// then click **Save**. +type Plan struct { + // Name - The plan ID. + Name *string `json:"name,omitempty"` + // Publisher - The publisher ID. + Publisher *string `json:"publisher,omitempty"` + // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + Product *string `json:"product,omitempty"` + // PromotionCode - The promotion code. + PromotionCode *string `json:"promotionCode,omitempty"` +} + +// PrivateEndpoint the Private Endpoint resource. +type PrivateEndpoint struct { + // ID - READ-ONLY; The ARM identifier for Private Endpoint + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpoint. +func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateEndpointConnection the Private Endpoint Connection resource. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Resource properties. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; private endpoint connection Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; private endpoint connection name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; private endpoint connection type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. +func (pec *PrivateEndpointConnection) 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 privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pec.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pec.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pec.Type = &typeVar + } + } + } + + return nil +} + +// PrivateEndpointConnectionListResult a list of private link resources +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - Array of private endpoint connections + Value *[]PrivateEndpointConnection `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. + NextLink *string `json:"nextLink,omitempty"` +} + +// PrivateEndpointConnectionListResultIterator provides access to a complete listing of +// PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultIterator struct { + i int + page PrivateEndpointConnectionListResultPage +} + +// 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 *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.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 *PrivateEndpointConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointConnectionListResultIterator) 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 PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult { + 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 PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection { + if !iter.page.NotDone() { + return PrivateEndpointConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointConnectionListResultIterator type. +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return PrivateEndpointConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { + return peclr.Value == nil || len(*peclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool { + return peclr.NextLink != nil && len(*peclr.NextLink) != 0 +} + +// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !peclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(peclr.NextLink))) +} + +// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultPage struct { + fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error) + peclr PrivateEndpointConnectionListResult +} + +// 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 *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateEndpointConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointConnectionListResultPage) NotDone() bool { + return !page.peclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult { + return page.peclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection { + if page.peclr.IsEmpty() { + return nil + } + return *page.peclr.Value +} + +// Creates a new instance of the PrivateEndpointConnectionListResultPage type. +func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{ + fn: getNextPage, + peclr: cur, + } +} + +// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - READ-ONLY; The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between DiskAccess and Virtual Network. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed' + ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. +func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState + } + if pecp.ProvisioningState != "" { + objectMap["provisioningState"] = pecp.ProvisioningState + } + return json.Marshal(objectMap) +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + // PrivateLinkResourceProperties - Resource properties. + *PrivateLinkResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; private link resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; private link resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; private link resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkResource. +func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plr.PrivateLinkResourceProperties != nil { + objectMap["properties"] = plr.PrivateLinkResourceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct. +func (plr *PrivateLinkResource) 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 privateLinkResourceProperties PrivateLinkResourceProperties + err = json.Unmarshal(*v, &privateLinkResourceProperties) + if err != nil { + return err + } + plr.PrivateLinkResourceProperties = &privateLinkResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + plr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + plr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + plr.Type = &typeVar + } + } + } + + return nil +} + +// PrivateLinkResourceListResult a list of private link resources +type PrivateLinkResourceListResult struct { + autorest.Response `json:"-"` + // Value - Array of private link resources + Value *[]PrivateLinkResource `json:"value,omitempty"` +} + +// PrivateLinkResourceProperties properties of a private link resource. +type PrivateLinkResourceProperties struct { + // GroupID - READ-ONLY; The private link resource group id. + GroupID *string `json:"groupId,omitempty"` + // RequiredMembers - READ-ONLY; The private link resource required member names. + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + // RequiredZoneNames - The private link resource DNS zone name. + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties. +func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plrp.RequiredZoneNames != nil { + objectMap["requiredZoneNames"] = plrp.RequiredZoneNames + } + return json.Marshal(objectMap) +} + +// PrivateLinkServiceConnectionState a collection of information about the state of the connection between +// service consumer and provider. +type PrivateLinkServiceConnectionState struct { + // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'PrivateEndpointServiceConnectionStatusPending', 'PrivateEndpointServiceConnectionStatusApproved', 'PrivateEndpointServiceConnectionStatusRejected' + Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` + // Description - The reason for approval/rejection of the connection. + Description *string `json:"description,omitempty"` + // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string `json:"actionsRequired,omitempty"` +} + +// PropertyUpdatesInProgress properties of the disk for which update is pending. +type PropertyUpdatesInProgress struct { + // TargetTier - The target performance tier of the disk if a tier change operation is in progress. + TargetTier *string `json:"targetTier,omitempty"` +} + +// ProximityPlacementGroup specifies information about the proximity placement group. +type ProximityPlacementGroup struct { + autorest.Response `json:"-"` + // ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group. + *ProximityPlacementGroupProperties `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 ProximityPlacementGroup. +func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppg.ProximityPlacementGroupProperties != nil { + objectMap["properties"] = ppg.ProximityPlacementGroupProperties + } + if ppg.Location != nil { + objectMap["location"] = ppg.Location + } + if ppg.Tags != nil { + objectMap["tags"] = ppg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct. +func (ppg *ProximityPlacementGroup) 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 proximityPlacementGroupProperties ProximityPlacementGroupProperties + err = json.Unmarshal(*v, &proximityPlacementGroupProperties) + if err != nil { + return err + } + ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ppg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ppg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ppg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ppg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ppg.Tags = tags + } + } + } + + return nil +} + +// ProximityPlacementGroupListResult the List Proximity Placement Group operation response. +type ProximityPlacementGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of proximity placement groups + Value *[]ProximityPlacementGroup `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of proximity placement groups. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProximityPlacementGroupListResultIterator provides access to a complete listing of +// ProximityPlacementGroup values. +type ProximityPlacementGroupListResultIterator struct { + i int + page ProximityPlacementGroupListResultPage +} + +// 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 *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.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 *ProximityPlacementGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProximityPlacementGroupListResultIterator) 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 ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult { + 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 ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup { + if !iter.page.NotDone() { + return ProximityPlacementGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProximityPlacementGroupListResultIterator type. +func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator { + return ProximityPlacementGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool { + return ppglr.Value == nil || len(*ppglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool { + return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0 +} + +// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ppglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ppglr.NextLink))) +} + +// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values. +type ProximityPlacementGroupListResultPage struct { + fn func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error) + ppglr ProximityPlacementGroupListResult +} + +// 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 *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ppglr) + if err != nil { + return err + } + page.ppglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ProximityPlacementGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProximityPlacementGroupListResultPage) NotDone() bool { + return !page.ppglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult { + return page.ppglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup { + if page.ppglr.IsEmpty() { + return nil + } + return *page.ppglr.Value +} + +// Creates a new instance of the ProximityPlacementGroupListResultPage type. +func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage { + return ProximityPlacementGroupListResultPage{ + fn: getNextPage, + ppglr: cur, + } +} + +// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group. +type ProximityPlacementGroupProperties struct { + // ProximityPlacementGroupType - Specifies the type of the proximity placement group.

Possible values are:

**Standard** : Co-locate resources within an Azure region or Availability Zone.

**Ultra** : For future use. Possible values include: 'ProximityPlacementGroupTypeStandard', 'ProximityPlacementGroupTypeUltra' + ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"` + // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group. + VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"` + // VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group. + VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"` + // AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group. + AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"` + // ColocationStatus - Describes colocation status of the Proximity Placement Group. + ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties. +func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppgp.ProximityPlacementGroupType != "" { + objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType + } + if ppgp.ColocationStatus != nil { + objectMap["colocationStatus"] = ppgp.ColocationStatus + } + return json.Marshal(objectMap) +} + +// ProximityPlacementGroupUpdate specifies information about the proximity placement group. +type ProximityPlacementGroupUpdate struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate. +func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppgu.Tags != nil { + objectMap["tags"] = ppgu.Tags + } + return json.Marshal(objectMap) +} + +// ProxyOnlyResource the ProxyOnly Resource model definition. +type ProxyOnlyResource 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"` +} + +// MarshalJSON is the custom marshaler for ProxyOnlyResource. +func (por ProxyOnlyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ProxyResource the resource model definition for an Azure Resource Manager proxy resource. It will not +// have tags and a location +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"` +} + +// MarshalJSON is the custom marshaler for ProxyResource. +func (pr ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PublicIPAddressSku describes the public IP Sku +type PublicIPAddressSku struct { + // Name - Specify public IP sku name. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' + Name PublicIPAddressSkuName `json:"name,omitempty"` + // Tier - Specify public IP sku tier. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal' + Tier PublicIPAddressSkuTier `json:"tier,omitempty"` +} + +// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. +type PurchasePlan struct { + // Publisher - The publisher ID. + Publisher *string `json:"publisher,omitempty"` + // Name - The plan ID. + Name *string `json:"name,omitempty"` + // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + Product *string `json:"product,omitempty"` + // PromotionCode - The Offer Promotion Code. + PromotionCode *string `json:"promotionCode,omitempty"` +} + +// ReadCloser ... +type ReadCloser struct { + autorest.Response `json:"-"` + Value *io.ReadCloser `json:"value,omitempty"` +} + +// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this +// Image Definition. These properties are updatable. +type RecommendedMachineConfiguration struct { + VCPUs *ResourceRange `json:"vCPUs,omitempty"` + Memory *ResourceRange `json:"memory,omitempty"` +} + +// RecoveryWalkResponse response after calling a manual recovery walk +type RecoveryWalkResponse struct { + autorest.Response `json:"-"` + // WalkPerformed - READ-ONLY; Whether the recovery walk was performed + WalkPerformed *bool `json:"walkPerformed,omitempty"` + // NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed + NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryWalkResponse. +func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RegionalReplicationStatus this is the regional replication status. +type RegionalReplicationStatus struct { + // Region - READ-ONLY; The region to which the gallery image version is being replicated to. + Region *string `json:"region,omitempty"` + // State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed' + State ReplicationState `json:"state,omitempty"` + // Details - READ-ONLY; The details of the replication status. + Details *string `json:"details,omitempty"` + // Progress - READ-ONLY; It indicates progress of the replication job. + Progress *int32 `json:"progress,omitempty"` +} + +// MarshalJSON is the custom marshaler for RegionalReplicationStatus. +func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ReplicationStatus this is the replication status of the gallery image version. +type ReplicationStatus struct { + // AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'AggregatedReplicationStateUnknown', 'AggregatedReplicationStateInProgress', 'AggregatedReplicationStateCompleted', 'AggregatedReplicationStateFailed' + AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"` + // Summary - READ-ONLY; This is a summary of replication status for each region. + Summary *[]RegionalReplicationStatus `json:"summary,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicationStatus. +func (rs ReplicationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api. +type RequestRateByIntervalInput struct { + // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'IntervalInMinsThreeMins', 'IntervalInMinsFiveMins', 'IntervalInMinsThirtyMins', 'IntervalInMinsSixtyMins' + IntervalLength IntervalInMins `json:"intervalLength,omitempty"` + // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. + BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` + // FromTime - From time of the query + FromTime *date.Time `json:"fromTime,omitempty"` + // ToTime - To time of the query + ToTime *date.Time `json:"toTime,omitempty"` + // GroupByThrottlePolicy - Group query result by Throttle Policy applied. + GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` + // GroupByOperationName - Group query result by Operation Name. + GroupByOperationName *bool `json:"groupByOperationName,omitempty"` + // GroupByResourceName - Group query result by Resource Name. + GroupByResourceName *bool `json:"groupByResourceName,omitempty"` + // GroupByClientApplicationID - Group query result by Client Application ID. + GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"` + // GroupByUserAgent - Group query result by User Agent. + GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"` +} + +// Resource the Resource model definition. +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) +} + +// ResourceInstanceViewStatus instance view status. +type ResourceInstanceViewStatus struct { + // Code - READ-ONLY; The status code. + Code *string `json:"code,omitempty"` + // DisplayStatus - READ-ONLY; The short localizable label for the status. + DisplayStatus *string `json:"displayStatus,omitempty"` + // Message - READ-ONLY; The detailed status message, including for alerts and error messages. + Message *string `json:"message,omitempty"` + // Time - READ-ONLY; The time of the status. + Time *date.Time `json:"time,omitempty"` + // Level - The level code. Possible values include: 'StatusLevelTypesInfo', 'StatusLevelTypesWarning', 'StatusLevelTypesError' + Level StatusLevelTypes `json:"level,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceInstanceViewStatus. +func (rivs ResourceInstanceViewStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rivs.Level != "" { + objectMap["level"] = rivs.Level + } + return json.Marshal(objectMap) +} + +// ResourceRange describes the resource range. +type ResourceRange struct { + // Min - The minimum number of the resource. + Min *int32 `json:"min,omitempty"` + // Max - The maximum number of the resource. + Max *int32 `json:"max,omitempty"` +} + +// ResourceSku describes an available Compute SKU. +type ResourceSku struct { + // ResourceType - READ-ONLY; The type of resource the SKU applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Name - READ-ONLY; The name of SKU. + Name *string `json:"name,omitempty"` + // Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + Tier *string `json:"tier,omitempty"` + // Size - READ-ONLY; The Size of the SKU. + Size *string `json:"size,omitempty"` + // Family - READ-ONLY; The Family of this particular SKU. + Family *string `json:"family,omitempty"` + // Kind - READ-ONLY; The Kind of resources that are supported in this SKU. + Kind *string `json:"kind,omitempty"` + // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set. + Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` + // Locations - READ-ONLY; The set of locations that the SKU is available. + Locations *[]string `json:"locations,omitempty"` + // LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available. + LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"` + // APIVersions - READ-ONLY; The api versions that support this SKU. + APIVersions *[]string `json:"apiVersions,omitempty"` + // Costs - READ-ONLY; Metadata for retrieving price info. + Costs *[]ResourceSkuCosts `json:"costs,omitempty"` + // Capabilities - READ-ONLY; A name value pair to describe the capability. + Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` + // Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSku. +func (rs ResourceSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkuCapabilities describes The SKU capabilities object. +type ResourceSkuCapabilities struct { + // Name - READ-ONLY; An invariant to describe the feature. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; An invariant if the feature is measured by quantity. + Value *string `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuCapabilities. +func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkuCapacity describes scaling information of a SKU. +type ResourceSkuCapacity struct { + // Minimum - READ-ONLY; The minimum capacity. + Minimum *int64 `json:"minimum,omitempty"` + // Maximum - READ-ONLY; The maximum capacity that can be set. + Maximum *int64 `json:"maximum,omitempty"` + // Default - READ-ONLY; The default capacity. + Default *int64 `json:"default,omitempty"` + // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone' + ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuCapacity. +func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkuCosts describes metadata for retrieving price info. +type ResourceSkuCosts struct { + // MeterID - READ-ONLY; Used for querying price from commerce. + MeterID *string `json:"meterID,omitempty"` + // Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost. + Quantity *int64 `json:"quantity,omitempty"` + // ExtendedUnit - READ-ONLY; An invariant to show the extended unit. + ExtendedUnit *string `json:"extendedUnit,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuCosts. +func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkuLocationInfo describes an available Compute SKU Location Information. +type ResourceSkuLocationInfo struct { + // Location - READ-ONLY; Location of the SKU + Location *string `json:"location,omitempty"` + // Zones - READ-ONLY; List of availability zones where the SKU is supported. + Zones *[]string `json:"zones,omitempty"` + // ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones. + ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"` + // ExtendedLocations - READ-ONLY; The names of extended locations. + ExtendedLocations *[]string `json:"extendedLocations,omitempty"` + // Type - READ-ONLY; The type of the extended location. Possible values include: 'ExtendedLocationTypeEdgeZone' + Type ExtendedLocationType `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo. +func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkuRestrictionInfo describes an available Compute SKU Restriction Information. +type ResourceSkuRestrictionInfo struct { + // Locations - READ-ONLY; Locations where the SKU is restricted + Locations *[]string `json:"locations,omitempty"` + // Zones - READ-ONLY; List of availability zones where the SKU is restricted. + Zones *[]string `json:"zones,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo. +func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkuRestrictions describes scaling information of a SKU. +type ResourceSkuRestrictions struct { + // Type - READ-ONLY; The type of restrictions. Possible values include: 'ResourceSkuRestrictionsTypeLocation', 'ResourceSkuRestrictionsTypeZone' + Type ResourceSkuRestrictionsType `json:"type,omitempty"` + // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + Values *[]string `json:"values,omitempty"` + // RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used. + RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"` + // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'ResourceSkuRestrictionsReasonCodeQuotaID', 'ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription' + ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuRestrictions. +func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceSkusResult the List Resource Skus operation response. +type ResourceSkusResult struct { + autorest.Response `json:"-"` + // Value - The list of skus available for the subscription. + Value *[]ResourceSku `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values. +type ResourceSkusResultIterator struct { + i int + page ResourceSkusResultPage +} + +// 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 *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.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 *ResourceSkusResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceSkusResultIterator) 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 ResourceSkusResultIterator) Response() ResourceSkusResult { + 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 ResourceSkusResultIterator) Value() ResourceSku { + if !iter.page.NotDone() { + return ResourceSku{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceSkusResultIterator type. +func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator { + return ResourceSkusResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rsr ResourceSkusResult) IsEmpty() bool { + return rsr.Value == nil || len(*rsr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rsr ResourceSkusResult) hasNextLink() bool { + return rsr.NextLink != nil && len(*rsr.NextLink) != 0 +} + +// resourceSkusResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) { + if !rsr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rsr.NextLink))) +} + +// ResourceSkusResultPage contains a page of ResourceSku values. +type ResourceSkusResultPage struct { + fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error) + rsr ResourceSkusResult +} + +// 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 *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rsr) + if err != nil { + return err + } + page.rsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ResourceSkusResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceSkusResultPage) NotDone() bool { + return !page.rsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceSkusResultPage) Response() ResourceSkusResult { + return page.rsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceSkusResultPage) Values() []ResourceSku { + if page.rsr.IsEmpty() { + return nil + } + return *page.rsr.Value +} + +// Creates a new instance of the ResourceSkusResultPage type. +func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage { + return ResourceSkusResultPage{ + fn: getNextPage, + rsr: cur, + } +} + +// ResourceSkuZoneDetails describes The zonal capabilities of a SKU. +type ResourceSkuZoneDetails struct { + // Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. + Name *[]string `json:"name,omitempty"` + // Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. + Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails. +func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceURIList the List resources which are encrypted with the disk encryption set. +type ResourceURIList struct { + autorest.Response `json:"-"` + // Value - A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set. + Value *[]string `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceURIListIterator provides access to a complete listing of string values. +type ResourceURIListIterator struct { + i int + page ResourceURIListPage +} + +// 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 *ResourceURIListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListIterator.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 *ResourceURIListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceURIListIterator) 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 ResourceURIListIterator) Response() ResourceURIList { + 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 ResourceURIListIterator) Value() string { + if !iter.page.NotDone() { + return "" + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceURIListIterator type. +func NewResourceURIListIterator(page ResourceURIListPage) ResourceURIListIterator { + return ResourceURIListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rul ResourceURIList) IsEmpty() bool { + return rul.Value == nil || len(*rul.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rul ResourceURIList) hasNextLink() bool { + return rul.NextLink != nil && len(*rul.NextLink) != 0 +} + +// resourceURIListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rul ResourceURIList) resourceURIListPreparer(ctx context.Context) (*http.Request, error) { + if !rul.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rul.NextLink))) +} + +// ResourceURIListPage contains a page of string values. +type ResourceURIListPage struct { + fn func(context.Context, ResourceURIList) (ResourceURIList, error) + rul ResourceURIList +} + +// 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 *ResourceURIListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rul) + if err != nil { + return err + } + page.rul = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ResourceURIListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceURIListPage) NotDone() bool { + return !page.rul.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceURIListPage) Response() ResourceURIList { + return page.rul +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceURIListPage) Values() []string { + if page.rul.IsEmpty() { + return nil + } + return *page.rul.Value +} + +// Creates a new instance of the ResourceURIListPage type. +func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Context, ResourceURIList) (ResourceURIList, error)) ResourceURIListPage { + return ResourceURIListPage{ + fn: getNextPage, + rul: cur, + } +} + +// RestorePoint restore Point details. +type RestorePoint struct { + autorest.Response `json:"-"` + *RestorePointProperties `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 RestorePoint. +func (rp RestorePoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rp.RestorePointProperties != nil { + objectMap["properties"] = rp.RestorePointProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestorePoint struct. +func (rp *RestorePoint) 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 restorePointProperties RestorePointProperties + err = json.Unmarshal(*v, &restorePointProperties) + if err != nil { + return err + } + rp.RestorePointProperties = &restorePointProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rp.Type = &typeVar + } + } + } + + return nil +} + +// RestorePointCollection create or update Restore Point collection parameters. +type RestorePointCollection struct { + autorest.Response `json:"-"` + *RestorePointCollectionProperties `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 RestorePointCollection. +func (RPCVar RestorePointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if RPCVar.RestorePointCollectionProperties != nil { + objectMap["properties"] = RPCVar.RestorePointCollectionProperties + } + if RPCVar.Location != nil { + objectMap["location"] = RPCVar.Location + } + if RPCVar.Tags != nil { + objectMap["tags"] = RPCVar.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestorePointCollection struct. +func (RPCVar *RestorePointCollection) 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 restorePointCollectionProperties RestorePointCollectionProperties + err = json.Unmarshal(*v, &restorePointCollectionProperties) + if err != nil { + return err + } + RPCVar.RestorePointCollectionProperties = &restorePointCollectionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + RPCVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + RPCVar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + RPCVar.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + RPCVar.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + RPCVar.Tags = tags + } + } + } + + return nil +} + +// RestorePointCollectionListResult the List restore point collection operation response. +type RestorePointCollectionListResult struct { + autorest.Response `json:"-"` + // Value - Gets the list of restore point collections. + Value *[]RestorePointCollection `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch the next page of RestorePointCollections + NextLink *string `json:"nextLink,omitempty"` +} + +// RestorePointCollectionListResultIterator provides access to a complete listing of RestorePointCollection +// values. +type RestorePointCollectionListResultIterator struct { + i int + page RestorePointCollectionListResultPage +} + +// 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 *RestorePointCollectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionListResultIterator.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 *RestorePointCollectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RestorePointCollectionListResultIterator) 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 RestorePointCollectionListResultIterator) Response() RestorePointCollectionListResult { + 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 RestorePointCollectionListResultIterator) Value() RestorePointCollection { + if !iter.page.NotDone() { + return RestorePointCollection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RestorePointCollectionListResultIterator type. +func NewRestorePointCollectionListResultIterator(page RestorePointCollectionListResultPage) RestorePointCollectionListResultIterator { + return RestorePointCollectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rpclr RestorePointCollectionListResult) IsEmpty() bool { + return rpclr.Value == nil || len(*rpclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rpclr RestorePointCollectionListResult) hasNextLink() bool { + return rpclr.NextLink != nil && len(*rpclr.NextLink) != 0 +} + +// restorePointCollectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rpclr RestorePointCollectionListResult) restorePointCollectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rpclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rpclr.NextLink))) +} + +// RestorePointCollectionListResultPage contains a page of RestorePointCollection values. +type RestorePointCollectionListResultPage struct { + fn func(context.Context, RestorePointCollectionListResult) (RestorePointCollectionListResult, error) + rpclr RestorePointCollectionListResult +} + +// 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 *RestorePointCollectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rpclr) + if err != nil { + return err + } + page.rpclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RestorePointCollectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RestorePointCollectionListResultPage) NotDone() bool { + return !page.rpclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RestorePointCollectionListResultPage) Response() RestorePointCollectionListResult { + return page.rpclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RestorePointCollectionListResultPage) Values() []RestorePointCollection { + if page.rpclr.IsEmpty() { + return nil + } + return *page.rpclr.Value +} + +// Creates a new instance of the RestorePointCollectionListResultPage type. +func NewRestorePointCollectionListResultPage(cur RestorePointCollectionListResult, getNextPage func(context.Context, RestorePointCollectionListResult) (RestorePointCollectionListResult, error)) RestorePointCollectionListResultPage { + return RestorePointCollectionListResultPage{ + fn: getNextPage, + rpclr: cur, + } +} + +// RestorePointCollectionProperties the restore point collection properties. +type RestorePointCollectionProperties struct { + Source *RestorePointCollectionSourceProperties `json:"source,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the restore point collection. + ProvisioningState *string `json:"provisioningState,omitempty"` + // RestorePointCollectionID - READ-ONLY; The unique id of the restore point collection. + RestorePointCollectionID *string `json:"restorePointCollectionId,omitempty"` + // RestorePoints - READ-ONLY; A list containing all restore points created under this restore point collection. + RestorePoints *[]RestorePoint `json:"restorePoints,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePointCollectionProperties. +func (rpcp RestorePointCollectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpcp.Source != nil { + objectMap["source"] = rpcp.Source + } + return json.Marshal(objectMap) +} + +// RestorePointCollectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RestorePointCollectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RestorePointCollectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RestorePointCollectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RestorePointCollectionsDeleteFuture.Result. +func (future *RestorePointCollectionsDeleteFuture) result(client RestorePointCollectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.RestorePointCollectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RestorePointCollectionSourceProperties the properties of the source resource that this restore point +// collection is created from. +type RestorePointCollectionSourceProperties struct { + // Location - READ-ONLY; Location of the source resource used to create this restore point collection. + Location *string `json:"location,omitempty"` + // ID - Resource Id of the source resource used to create this restore point collection + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePointCollectionSourceProperties. +func (rpcsp RestorePointCollectionSourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpcsp.ID != nil { + objectMap["id"] = rpcsp.ID + } + return json.Marshal(objectMap) +} + +// RestorePointCollectionUpdate update Restore Point collection parameters. +type RestorePointCollectionUpdate struct { + *RestorePointCollectionProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for RestorePointCollectionUpdate. +func (rpcu RestorePointCollectionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpcu.RestorePointCollectionProperties != nil { + objectMap["properties"] = rpcu.RestorePointCollectionProperties + } + if rpcu.Tags != nil { + objectMap["tags"] = rpcu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestorePointCollectionUpdate struct. +func (rpcu *RestorePointCollectionUpdate) 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 restorePointCollectionProperties RestorePointCollectionProperties + err = json.Unmarshal(*v, &restorePointCollectionProperties) + if err != nil { + return err + } + rpcu.RestorePointCollectionProperties = &restorePointCollectionProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rpcu.Tags = tags + } + } + } + + return nil +} + +// RestorePointProperties the restore point properties. +type RestorePointProperties struct { + // ExcludeDisks - List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. + ExcludeDisks *[]APIEntityReference `json:"excludeDisks,omitempty"` + // SourceMetadata - READ-ONLY; Gets the details of the VM captured at the time of the restore point creation. + SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty"` + // ProvisioningState - READ-ONLY; Gets the provisioning state of the restore point. + ProvisioningState *string `json:"provisioningState,omitempty"` + // ConsistencyMode - READ-ONLY; Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints for more details. Possible values include: 'ConsistencyModeTypesCrashConsistent', 'ConsistencyModeTypesFileSystemConsistent', 'ConsistencyModeTypesApplicationConsistent' + ConsistencyMode ConsistencyModeTypes `json:"consistencyMode,omitempty"` + // ProvisioningDetails - READ-ONLY; Gets the provisioning details set by the server during Create restore point operation. + ProvisioningDetails *RestorePointProvisioningDetails `json:"provisioningDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePointProperties. +func (rpp RestorePointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpp.ExcludeDisks != nil { + objectMap["excludeDisks"] = rpp.ExcludeDisks + } + return json.Marshal(objectMap) +} + +// RestorePointProvisioningDetails restore Point Provisioning details. +type RestorePointProvisioningDetails struct { + // CreationTime - Gets the creation time of the restore point. + CreationTime *date.Time `json:"creationTime,omitempty"` + // TotalUsedSizeInBytes - Gets the total size of the data in all the disks which are part of the restore point. + TotalUsedSizeInBytes *int64 `json:"totalUsedSizeInBytes,omitempty"` + // StatusCode - Gets the status of the Create restore point operation. + StatusCode *int32 `json:"statusCode,omitempty"` + // StatusMessage - Gets the status message of the Create restore point operation. + StatusMessage *string `json:"statusMessage,omitempty"` +} + +// RestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RestorePointsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RestorePointsClient) (RestorePoint, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RestorePointsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RestorePointsCreateFuture.Result. +func (future *RestorePointsCreateFuture) result(client RestorePointsClient) (rp RestorePoint, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.RestorePointsCreateFuture") + 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, "compute.RestorePointsCreateFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// RestorePointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RestorePointsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RestorePointsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RestorePointsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RestorePointsDeleteFuture.Result. +func (future *RestorePointsDeleteFuture) result(client RestorePointsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.RestorePointsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RestorePointSourceMetadata describes the properties of the Virtual Machine for which the restore point +// was created. The properties provided are a subset and the snapshot of the overall Virtual Machine +// properties captured at the time of the restore point creation. +type RestorePointSourceMetadata struct { + // HardwareProfile - Gets the hardware profile. + HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` + // StorageProfile - Gets the storage profile. + StorageProfile *RestorePointSourceVMStorageProfile `json:"storageProfile,omitempty"` + // OsProfile - Gets the OS profile. + OsProfile *OSProfile `json:"osProfile,omitempty"` + // DiagnosticsProfile - Gets the diagnostics profile. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + // LicenseType - Gets the license type, which is for bring your own license scenario. + LicenseType *string `json:"licenseType,omitempty"` + // VMID - Gets the virtual machine unique id. + VMID *string `json:"vmId,omitempty"` + // SecurityProfile - Gets the security profile. + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // Location - Location of the VM from which the restore point was created. + Location *string `json:"location,omitempty"` +} + +// RestorePointSourceVMDataDisk describes a data disk. +type RestorePointSourceVMDataDisk struct { + // Lun - Gets the logical unit number. + Lun *int32 `json:"lun,omitempty"` + // Name - Gets the disk name. + Name *string `json:"name,omitempty"` + // Caching - Gets the caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // DiskSizeGB - Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // ManagedDisk - Gets the managed disk details + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + // DiskRestorePoint - Gets the disk restore point Id. + DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"` +} + +// RestorePointSourceVMOSDisk describes an Operating System disk. +type RestorePointSourceVMOSDisk struct { + // OsType - Gets the Operating System type. Possible values include: 'OperatingSystemTypeWindows', 'OperatingSystemTypeLinux' + OsType OperatingSystemType `json:"osType,omitempty"` + // EncryptionSettings - Gets the disk encryption settings. + EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` + // Name - Gets the disk name. + Name *string `json:"name,omitempty"` + // Caching - Gets the caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // DiskSizeGB - Gets the disk size in GB. + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // ManagedDisk - Gets the managed disk details + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + // DiskRestorePoint - Gets the disk restore point Id. + DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"` +} + +// RestorePointSourceVMStorageProfile describes the storage profile. +type RestorePointSourceVMStorageProfile struct { + // OsDisk - Gets the OS disk of the VM captured at the time of the restore point creation. + OsDisk *RestorePointSourceVMOSDisk `json:"osDisk,omitempty"` + // DataDisks - Gets the data disks of the VM captured at the time of the restore point creation. + DataDisks *[]RestorePointSourceVMDataDisk `json:"dataDisks,omitempty"` +} + +// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs. +type RetrieveBootDiagnosticsDataResult struct { + autorest.Response `json:"-"` + // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI + ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` + // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI. + SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` +} + +// MarshalJSON is the custom marshaler for RetrieveBootDiagnosticsDataResult. +func (rbddr RetrieveBootDiagnosticsDataResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RoleInstance ... +type RoleInstance struct { + autorest.Response `json:"-"` + // 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; Resource Location. + Location *string `json:"location,omitempty"` + // Tags - READ-ONLY; Resource tags. + Tags map[string]*string `json:"tags"` + Sku *InstanceSku `json:"sku,omitempty"` + Properties *RoleInstanceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for RoleInstance. +func (ri RoleInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ri.Sku != nil { + objectMap["sku"] = ri.Sku + } + if ri.Properties != nil { + objectMap["properties"] = ri.Properties + } + return json.Marshal(objectMap) +} + +// RoleInstanceInstanceView the instance view of the role instance. +type RoleInstanceInstanceView struct { + autorest.Response `json:"-"` + // PlatformUpdateDomain - READ-ONLY; The Update Domain. + PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` + // PlatformFaultDomain - READ-ONLY; The Fault Domain. + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // PrivateID - READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance.

NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. + PrivateID *string `json:"privateId,omitempty"` + // Statuses - READ-ONLY + Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for RoleInstanceInstanceView. +func (riiv RoleInstanceInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RoleInstanceListResult ... +type RoleInstanceListResult struct { + autorest.Response `json:"-"` + Value *[]RoleInstance `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// RoleInstanceListResultIterator provides access to a complete listing of RoleInstance values. +type RoleInstanceListResultIterator struct { + i int + page RoleInstanceListResultPage +} + +// 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 *RoleInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultIterator.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 *RoleInstanceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RoleInstanceListResultIterator) 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 RoleInstanceListResultIterator) Response() RoleInstanceListResult { + 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 RoleInstanceListResultIterator) Value() RoleInstance { + if !iter.page.NotDone() { + return RoleInstance{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RoleInstanceListResultIterator type. +func NewRoleInstanceListResultIterator(page RoleInstanceListResultPage) RoleInstanceListResultIterator { + return RoleInstanceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rilr RoleInstanceListResult) IsEmpty() bool { + return rilr.Value == nil || len(*rilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rilr RoleInstanceListResult) hasNextLink() bool { + return rilr.NextLink != nil && len(*rilr.NextLink) != 0 +} + +// roleInstanceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rilr RoleInstanceListResult) roleInstanceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rilr.NextLink))) +} + +// RoleInstanceListResultPage contains a page of RoleInstance values. +type RoleInstanceListResultPage struct { + fn func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error) + rilr RoleInstanceListResult +} + +// 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 *RoleInstanceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rilr) + if err != nil { + return err + } + page.rilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RoleInstanceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RoleInstanceListResultPage) NotDone() bool { + return !page.rilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RoleInstanceListResultPage) Response() RoleInstanceListResult { + return page.rilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RoleInstanceListResultPage) Values() []RoleInstance { + if page.rilr.IsEmpty() { + return nil + } + return *page.rilr.Value +} + +// Creates a new instance of the RoleInstanceListResultPage type. +func NewRoleInstanceListResultPage(cur RoleInstanceListResult, getNextPage func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)) RoleInstanceListResultPage { + return RoleInstanceListResultPage{ + fn: getNextPage, + rilr: cur, + } +} + +// RoleInstanceNetworkProfile describes the network profile for the role instance. +type RoleInstanceNetworkProfile struct { + // NetworkInterfaces - READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance. + NetworkInterfaces *[]SubResource `json:"networkInterfaces,omitempty"` +} + +// MarshalJSON is the custom marshaler for RoleInstanceNetworkProfile. +func (rinp RoleInstanceNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RoleInstanceProperties ... +type RoleInstanceProperties struct { + NetworkProfile *RoleInstanceNetworkProfile `json:"networkProfile,omitempty"` + InstanceView *RoleInstanceInstanceView `json:"instanceView,omitempty"` +} + +// RoleInstances specifies a list of role instances from the cloud service. +type RoleInstances struct { + // RoleInstances - List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service. + RoleInstances *[]string `json:"roleInstances,omitempty"` +} + +// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation. +type RollbackStatusInfo struct { + // SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back. + SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"` + // FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback. + FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"` + // RollbackError - READ-ONLY; Error details if OS rollback failed. + RollbackError *APIError `json:"rollbackError,omitempty"` +} + +// MarshalJSON is the custom marshaler for RollbackStatusInfo. +func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade. +type RollingUpgradePolicy struct { + // MaxBatchInstancePercent - The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. + MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"` + // MaxUnhealthyInstancePercent - The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. + MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"` + // MaxUnhealthyUpgradedInstancePercent - The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. + MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"` + // PauseTimeBetweenBatches - The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). + PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"` + // EnableCrossZoneUpgrade - Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. + EnableCrossZoneUpgrade *bool `json:"enableCrossZoneUpgrade,omitempty"` + // PrioritizeUnhealthyInstances - Upgrade all unhealthy instances in a scale set before any healthy instances. + PrioritizeUnhealthyInstances *bool `json:"prioritizeUnhealthyInstances,omitempty"` +} + +// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade +// state. +type RollingUpgradeProgressInfo struct { + // SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded. + SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"` + // FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully. + FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"` + // InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded. + InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"` + // PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded. + PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"` +} + +// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo. +func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RollingUpgradeRunningStatus information about the current running state of the overall upgrade. +type RollingUpgradeRunningStatus struct { + // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted' + Code RollingUpgradeStatusCode `json:"code,omitempty"` + // StartTime - READ-ONLY; Start time of the upgrade. + StartTime *date.Time `json:"startTime,omitempty"` + // LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'RollingUpgradeActionTypeStart', 'RollingUpgradeActionTypeCancel' + LastAction RollingUpgradeActionType `json:"lastAction,omitempty"` + // LastActionTime - READ-ONLY; Last action time of the upgrade. + LastActionTime *date.Time `json:"lastActionTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus. +func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade. +type RollingUpgradeStatusInfo struct { + autorest.Response `json:"-"` + *RollingUpgradeStatusInfoProperties `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 RollingUpgradeStatusInfo. +func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rusi.RollingUpgradeStatusInfoProperties != nil { + objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties + } + if rusi.Location != nil { + objectMap["location"] = rusi.Location + } + if rusi.Tags != nil { + objectMap["tags"] = rusi.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct. +func (rusi *RollingUpgradeStatusInfo) 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 rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties + err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties) + if err != nil { + return err + } + rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rusi.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rusi.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rusi.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rusi.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rusi.Tags = tags + } + } + } + + return nil +} + +// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade. +type RollingUpgradeStatusInfoProperties struct { + // Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade. + Policy *RollingUpgradePolicy `json:"policy,omitempty"` + // RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade. + RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"` + // Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state. + Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` + // Error - READ-ONLY; Error details for this upgrade, if there are any. + Error *APIError `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties. +func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RunCommandDocument describes the properties of a Run Command. +type RunCommandDocument struct { + autorest.Response `json:"-"` + // Script - The script to be executed. + Script *[]string `json:"script,omitempty"` + // Parameters - The parameters used by the script. + Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"` + // Schema - The VM run command schema. + Schema *string `json:"$schema,omitempty"` + // ID - The VM run command id. + ID *string `json:"id,omitempty"` + // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // Label - The VM run command label. + Label *string `json:"label,omitempty"` + // Description - The VM run command description. + Description *string `json:"description,omitempty"` +} + +// RunCommandDocumentBase describes the properties of a Run Command metadata. +type RunCommandDocumentBase struct { + // Schema - The VM run command schema. + Schema *string `json:"$schema,omitempty"` + // ID - The VM run command id. + ID *string `json:"id,omitempty"` + // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // Label - The VM run command label. + Label *string `json:"label,omitempty"` + // Description - The VM run command description. + Description *string `json:"description,omitempty"` +} + +// RunCommandInput capture Virtual Machine parameters. +type RunCommandInput struct { + // CommandID - The run command id. + CommandID *string `json:"commandId,omitempty"` + // Script - Optional. The script to be executed. When this value is given, the given script will override the default script of the command. + Script *[]string `json:"script,omitempty"` + // Parameters - The run command parameters. + Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"` +} + +// RunCommandInputParameter describes the properties of a run command parameter. +type RunCommandInputParameter struct { + // Name - The run command parameter name. + Name *string `json:"name,omitempty"` + // Value - The run command parameter value. + Value *string `json:"value,omitempty"` +} + +// RunCommandListResult the List Virtual Machine operation response. +type RunCommandListResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machine run commands. + Value *[]RunCommandDocumentBase `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. + NextLink *string `json:"nextLink,omitempty"` +} + +// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values. +type RunCommandListResultIterator struct { + i int + page RunCommandListResultPage +} + +// 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 *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.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 *RunCommandListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RunCommandListResultIterator) 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 RunCommandListResultIterator) Response() RunCommandListResult { + 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 RunCommandListResultIterator) Value() RunCommandDocumentBase { + if !iter.page.NotDone() { + return RunCommandDocumentBase{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RunCommandListResultIterator type. +func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator { + return RunCommandListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rclr RunCommandListResult) IsEmpty() bool { + return rclr.Value == nil || len(*rclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rclr RunCommandListResult) hasNextLink() bool { + return rclr.NextLink != nil && len(*rclr.NextLink) != 0 +} + +// runCommandListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rclr.NextLink))) +} + +// RunCommandListResultPage contains a page of RunCommandDocumentBase values. +type RunCommandListResultPage struct { + fn func(context.Context, RunCommandListResult) (RunCommandListResult, error) + rclr RunCommandListResult +} + +// 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 *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rclr) + if err != nil { + return err + } + page.rclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RunCommandListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RunCommandListResultPage) NotDone() bool { + return !page.rclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RunCommandListResultPage) Response() RunCommandListResult { + return page.rclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RunCommandListResultPage) Values() []RunCommandDocumentBase { + if page.rclr.IsEmpty() { + return nil + } + return *page.rclr.Value +} + +// Creates a new instance of the RunCommandListResultPage type. +func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage { + return RunCommandListResultPage{ + fn: getNextPage, + rclr: cur, + } +} + +// RunCommandParameterDefinition describes the properties of a run command parameter. +type RunCommandParameterDefinition struct { + // Name - The run command parameter name. + Name *string `json:"name,omitempty"` + // Type - The run command parameter type. + Type *string `json:"type,omitempty"` + // DefaultValue - The run command parameter default value. + DefaultValue *string `json:"defaultValue,omitempty"` + // Required - The run command parameter required. + Required *bool `json:"required,omitempty"` +} + +// RunCommandResult ... +type RunCommandResult struct { + autorest.Response `json:"-"` + // Value - Run command operation response. + Value *[]InstanceViewStatus `json:"value,omitempty"` +} + +// ScaleInPolicy describes a scale-in policy for a virtual machine scale set. +type ScaleInPolicy struct { + // Rules - The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

+ Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"` + // ForceDeletion - This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview) + ForceDeletion *bool `json:"forceDeletion,omitempty"` +} + +// ScheduledEventsProfile ... +type ScheduledEventsProfile struct { + // TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations. + TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` +} + +// SecurityProfile specifies the Security profile settings for the virtual machine or virtual machine scale +// set. +type SecurityProfile struct { + // UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine.

Minimum api-version: 2020-12-01 + UefiSettings *UefiSettings `json:"uefiSettings,omitempty"` + // EncryptionAtHost - This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself.

Default: The Encryption at host will be disabled unless this property is set to true for the resource. + EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"` + // SecurityType - Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings.

Default: UefiSettings will not be enabled unless this property is set as TrustedLaunch. Possible values include: 'SecurityTypesTrustedLaunch' + SecurityType SecurityTypes `json:"securityType,omitempty"` +} + +// SharedGallery specifies information about the Shared Gallery that you want to create or update. +type SharedGallery struct { + autorest.Response `json:"-"` + *SharedGalleryIdentifier `json:"identifier,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for SharedGallery. +func (sg SharedGallery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sg.SharedGalleryIdentifier != nil { + objectMap["identifier"] = sg.SharedGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SharedGallery struct. +func (sg *SharedGallery) 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 "identifier": + if v != nil { + var sharedGalleryIdentifier SharedGalleryIdentifier + err = json.Unmarshal(*v, &sharedGalleryIdentifier) + if err != nil { + return err + } + sg.SharedGalleryIdentifier = &sharedGalleryIdentifier + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sg.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sg.Location = &location + } + } + } + + return nil +} + +// SharedGalleryIdentifier the identifier information of shared gallery. +type SharedGalleryIdentifier struct { + // UniqueID - The unique id of this shared gallery. + UniqueID *string `json:"uniqueId,omitempty"` +} + +// SharedGalleryImage specifies information about the gallery image definition that you want to create or +// update. +type SharedGalleryImage struct { + autorest.Response `json:"-"` + *SharedGalleryImageProperties `json:"properties,omitempty"` + *SharedGalleryIdentifier `json:"identifier,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for SharedGalleryImage. +func (sgi SharedGalleryImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sgi.SharedGalleryImageProperties != nil { + objectMap["properties"] = sgi.SharedGalleryImageProperties + } + if sgi.SharedGalleryIdentifier != nil { + objectMap["identifier"] = sgi.SharedGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SharedGalleryImage struct. +func (sgi *SharedGalleryImage) 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 sharedGalleryImageProperties SharedGalleryImageProperties + err = json.Unmarshal(*v, &sharedGalleryImageProperties) + if err != nil { + return err + } + sgi.SharedGalleryImageProperties = &sharedGalleryImageProperties + } + case "identifier": + if v != nil { + var sharedGalleryIdentifier SharedGalleryIdentifier + err = json.Unmarshal(*v, &sharedGalleryIdentifier) + if err != nil { + return err + } + sgi.SharedGalleryIdentifier = &sharedGalleryIdentifier + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sgi.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sgi.Location = &location + } + } + } + + return nil +} + +// SharedGalleryImageList the List Shared Gallery Images operation response. +type SharedGalleryImageList struct { + autorest.Response `json:"-"` + // Value - A list of shared gallery images. + Value *[]SharedGalleryImage `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch the next page of shared gallery images. + NextLink *string `json:"nextLink,omitempty"` +} + +// SharedGalleryImageListIterator provides access to a complete listing of SharedGalleryImage values. +type SharedGalleryImageListIterator struct { + i int + page SharedGalleryImageListPage +} + +// 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 *SharedGalleryImageListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageListIterator.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 *SharedGalleryImageListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SharedGalleryImageListIterator) 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 SharedGalleryImageListIterator) Response() SharedGalleryImageList { + 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 SharedGalleryImageListIterator) Value() SharedGalleryImage { + if !iter.page.NotDone() { + return SharedGalleryImage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SharedGalleryImageListIterator type. +func NewSharedGalleryImageListIterator(page SharedGalleryImageListPage) SharedGalleryImageListIterator { + return SharedGalleryImageListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sgil SharedGalleryImageList) IsEmpty() bool { + return sgil.Value == nil || len(*sgil.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sgil SharedGalleryImageList) hasNextLink() bool { + return sgil.NextLink != nil && len(*sgil.NextLink) != 0 +} + +// sharedGalleryImageListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sgil SharedGalleryImageList) sharedGalleryImageListPreparer(ctx context.Context) (*http.Request, error) { + if !sgil.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sgil.NextLink))) +} + +// SharedGalleryImageListPage contains a page of SharedGalleryImage values. +type SharedGalleryImageListPage struct { + fn func(context.Context, SharedGalleryImageList) (SharedGalleryImageList, error) + sgil SharedGalleryImageList +} + +// 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 *SharedGalleryImageListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sgil) + if err != nil { + return err + } + page.sgil = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SharedGalleryImageListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SharedGalleryImageListPage) NotDone() bool { + return !page.sgil.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SharedGalleryImageListPage) Response() SharedGalleryImageList { + return page.sgil +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SharedGalleryImageListPage) Values() []SharedGalleryImage { + if page.sgil.IsEmpty() { + return nil + } + return *page.sgil.Value +} + +// Creates a new instance of the SharedGalleryImageListPage type. +func NewSharedGalleryImageListPage(cur SharedGalleryImageList, getNextPage func(context.Context, SharedGalleryImageList) (SharedGalleryImageList, error)) SharedGalleryImageListPage { + return SharedGalleryImageListPage{ + fn: getNextPage, + sgil: cur, + } +} + +// SharedGalleryImageProperties describes the properties of a gallery image definition. +type SharedGalleryImageProperties struct { + // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized' + OsState OperatingSystemStateTypes `json:"osState,omitempty"` + // EndOfLifeDate - The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` + Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` + Disallowed *Disallowed `json:"disallowed,omitempty"` + // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2' + HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` + // Features - A list of gallery image features. + Features *[]GalleryImageFeature `json:"features,omitempty"` + PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` +} + +// SharedGalleryImageVersion specifies information about the gallery image version that you want to create +// or update. +type SharedGalleryImageVersion struct { + autorest.Response `json:"-"` + *SharedGalleryImageVersionProperties `json:"properties,omitempty"` + *SharedGalleryIdentifier `json:"identifier,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for SharedGalleryImageVersion. +func (sgiv SharedGalleryImageVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sgiv.SharedGalleryImageVersionProperties != nil { + objectMap["properties"] = sgiv.SharedGalleryImageVersionProperties + } + if sgiv.SharedGalleryIdentifier != nil { + objectMap["identifier"] = sgiv.SharedGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SharedGalleryImageVersion struct. +func (sgiv *SharedGalleryImageVersion) 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 sharedGalleryImageVersionProperties SharedGalleryImageVersionProperties + err = json.Unmarshal(*v, &sharedGalleryImageVersionProperties) + if err != nil { + return err + } + sgiv.SharedGalleryImageVersionProperties = &sharedGalleryImageVersionProperties + } + case "identifier": + if v != nil { + var sharedGalleryIdentifier SharedGalleryIdentifier + err = json.Unmarshal(*v, &sharedGalleryIdentifier) + if err != nil { + return err + } + sgiv.SharedGalleryIdentifier = &sharedGalleryIdentifier + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sgiv.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sgiv.Location = &location + } + } + } + + return nil +} + +// SharedGalleryImageVersionList the List Shared Gallery Image versions operation response. +type SharedGalleryImageVersionList struct { + autorest.Response `json:"-"` + // Value - A list of shared gallery images versions. + Value *[]SharedGalleryImageVersion `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to fetch the next page of shared gallery image versions. + NextLink *string `json:"nextLink,omitempty"` +} + +// SharedGalleryImageVersionListIterator provides access to a complete listing of SharedGalleryImageVersion +// values. +type SharedGalleryImageVersionListIterator struct { + i int + page SharedGalleryImageVersionListPage +} + +// 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 *SharedGalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionListIterator.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 *SharedGalleryImageVersionListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SharedGalleryImageVersionListIterator) 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 SharedGalleryImageVersionListIterator) Response() SharedGalleryImageVersionList { + 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 SharedGalleryImageVersionListIterator) Value() SharedGalleryImageVersion { + if !iter.page.NotDone() { + return SharedGalleryImageVersion{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SharedGalleryImageVersionListIterator type. +func NewSharedGalleryImageVersionListIterator(page SharedGalleryImageVersionListPage) SharedGalleryImageVersionListIterator { + return SharedGalleryImageVersionListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sgivl SharedGalleryImageVersionList) IsEmpty() bool { + return sgivl.Value == nil || len(*sgivl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sgivl SharedGalleryImageVersionList) hasNextLink() bool { + return sgivl.NextLink != nil && len(*sgivl.NextLink) != 0 +} + +// sharedGalleryImageVersionListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sgivl SharedGalleryImageVersionList) sharedGalleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) { + if !sgivl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sgivl.NextLink))) +} + +// SharedGalleryImageVersionListPage contains a page of SharedGalleryImageVersion values. +type SharedGalleryImageVersionListPage struct { + fn func(context.Context, SharedGalleryImageVersionList) (SharedGalleryImageVersionList, error) + sgivl SharedGalleryImageVersionList +} + +// 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 *SharedGalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sgivl) + if err != nil { + return err + } + page.sgivl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SharedGalleryImageVersionListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SharedGalleryImageVersionListPage) NotDone() bool { + return !page.sgivl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SharedGalleryImageVersionListPage) Response() SharedGalleryImageVersionList { + return page.sgivl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SharedGalleryImageVersionListPage) Values() []SharedGalleryImageVersion { + if page.sgivl.IsEmpty() { + return nil + } + return *page.sgivl.Value +} + +// Creates a new instance of the SharedGalleryImageVersionListPage type. +func NewSharedGalleryImageVersionListPage(cur SharedGalleryImageVersionList, getNextPage func(context.Context, SharedGalleryImageVersionList) (SharedGalleryImageVersionList, error)) SharedGalleryImageVersionListPage { + return SharedGalleryImageVersionListPage{ + fn: getNextPage, + sgivl: cur, + } +} + +// SharedGalleryImageVersionProperties describes the properties of a gallery image version. +type SharedGalleryImageVersionProperties struct { + // PublishedDate - The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + PublishedDate *date.Time `json:"publishedDate,omitempty"` + // EndOfLifeDate - The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` +} + +// SharedGalleryList the List Shared Galleries operation response. +type SharedGalleryList struct { + autorest.Response `json:"-"` + // Value - A list of shared galleries. + Value *[]SharedGallery `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the next page of shared galleries. + NextLink *string `json:"nextLink,omitempty"` +} + +// SharedGalleryListIterator provides access to a complete listing of SharedGallery values. +type SharedGalleryListIterator struct { + i int + page SharedGalleryListPage +} + +// 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 *SharedGalleryListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryListIterator.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 *SharedGalleryListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SharedGalleryListIterator) 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 SharedGalleryListIterator) Response() SharedGalleryList { + 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 SharedGalleryListIterator) Value() SharedGallery { + if !iter.page.NotDone() { + return SharedGallery{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SharedGalleryListIterator type. +func NewSharedGalleryListIterator(page SharedGalleryListPage) SharedGalleryListIterator { + return SharedGalleryListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sgl SharedGalleryList) IsEmpty() bool { + return sgl.Value == nil || len(*sgl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sgl SharedGalleryList) hasNextLink() bool { + return sgl.NextLink != nil && len(*sgl.NextLink) != 0 +} + +// sharedGalleryListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sgl SharedGalleryList) sharedGalleryListPreparer(ctx context.Context) (*http.Request, error) { + if !sgl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sgl.NextLink))) +} + +// SharedGalleryListPage contains a page of SharedGallery values. +type SharedGalleryListPage struct { + fn func(context.Context, SharedGalleryList) (SharedGalleryList, error) + sgl SharedGalleryList +} + +// 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 *SharedGalleryListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sgl) + if err != nil { + return err + } + page.sgl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SharedGalleryListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SharedGalleryListPage) NotDone() bool { + return !page.sgl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SharedGalleryListPage) Response() SharedGalleryList { + return page.sgl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SharedGalleryListPage) Values() []SharedGallery { + if page.sgl.IsEmpty() { + return nil + } + return *page.sgl.Value +} + +// Creates a new instance of the SharedGalleryListPage type. +func NewSharedGalleryListPage(cur SharedGalleryList, getNextPage func(context.Context, SharedGalleryList) (SharedGalleryList, error)) SharedGalleryListPage { + return SharedGalleryListPage{ + fn: getNextPage, + sgl: cur, + } +} + +// ShareInfoElement ... +type ShareInfoElement struct { + // VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. + VMURI *string `json:"vmUri,omitempty"` +} + +// MarshalJSON is the custom marshaler for ShareInfoElement. +func (sie ShareInfoElement) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SharingProfile profile for gallery sharing to subscription or tenant +type SharingProfile struct { + // Permissions - This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**. Possible values include: 'GallerySharingPermissionTypesPrivate', 'GallerySharingPermissionTypesGroups' + Permissions GallerySharingPermissionTypes `json:"permissions,omitempty"` + // Groups - READ-ONLY; A list of sharing profile groups. + Groups *[]SharingProfileGroup `json:"groups,omitempty"` +} + +// MarshalJSON is the custom marshaler for SharingProfile. +func (sp SharingProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.Permissions != "" { + objectMap["permissions"] = sp.Permissions + } + return json.Marshal(objectMap) +} + +// SharingProfileGroup group of the gallery sharing profile +type SharingProfileGroup struct { + // Type - This property allows you to specify the type of sharing group.

Possible values are:

**Subscriptions**

**AADTenants**. Possible values include: 'SharingProfileGroupTypesSubscriptions', 'SharingProfileGroupTypesAADTenants' + Type SharingProfileGroupTypes `json:"type,omitempty"` + // Ids - A list of subscription/tenant ids the gallery is aimed to be shared to. + Ids *[]string `json:"ids,omitempty"` +} + +// SharingUpdate specifies information about the gallery sharing profile update. +type SharingUpdate struct { + autorest.Response `json:"-"` + // OperationType - This property allows you to specify the operation type of gallery sharing update.

Possible values are:

**Add**

**Remove**

**Reset**. Possible values include: 'SharingUpdateOperationTypesAdd', 'SharingUpdateOperationTypesRemove', 'SharingUpdateOperationTypesReset' + OperationType SharingUpdateOperationTypes `json:"operationType,omitempty"` + // Groups - A list of sharing profile groups. + Groups *[]SharingProfileGroup `json:"groups,omitempty"` +} + +// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware +// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU +// name. +type Sku struct { + // Name - The sku name. + Name *string `json:"name,omitempty"` + // Tier - Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + Tier *string `json:"tier,omitempty"` + // Capacity - Specifies the number of virtual machines in the scale set. + Capacity *int64 `json:"capacity,omitempty"` +} + +// Snapshot snapshot resource. +type Snapshot struct { + autorest.Response `json:"-"` + // ManagedBy - READ-ONLY; Unused. Always Null. + ManagedBy *string `json:"managedBy,omitempty"` + Sku *SnapshotSku `json:"sku,omitempty"` + // ExtendedLocation - The extended location where the snapshot will be created. Extended location cannot be changed. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + *SnapshotProperties `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 Snapshot. +func (s Snapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Sku != nil { + objectMap["sku"] = s.Sku + } + if s.ExtendedLocation != nil { + objectMap["extendedLocation"] = s.ExtendedLocation + } + if s.SnapshotProperties != nil { + objectMap["properties"] = s.SnapshotProperties + } + if s.Location != nil { + objectMap["location"] = s.Location + } + if s.Tags != nil { + objectMap["tags"] = s.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Snapshot struct. +func (s *Snapshot) 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 "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + s.ManagedBy = &managedBy + } + case "sku": + if v != nil { + var sku SnapshotSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + s.Sku = &sku + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + s.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var snapshotProperties SnapshotProperties + err = json.Unmarshal(*v, &snapshotProperties) + if err != nil { + return err + } + s.SnapshotProperties = &snapshotProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + s.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + s.Tags = tags + } + } + } + + return nil +} + +// SnapshotList the List Snapshots operation response. +type SnapshotList struct { + autorest.Response `json:"-"` + // Value - A list of snapshots. + Value *[]Snapshot `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. + NextLink *string `json:"nextLink,omitempty"` +} + +// SnapshotListIterator provides access to a complete listing of Snapshot values. +type SnapshotListIterator struct { + i int + page SnapshotListPage +} + +// 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 *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.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 *SnapshotListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SnapshotListIterator) 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 SnapshotListIterator) Response() SnapshotList { + 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 SnapshotListIterator) Value() Snapshot { + if !iter.page.NotDone() { + return Snapshot{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SnapshotListIterator type. +func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator { + return SnapshotListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sl SnapshotList) IsEmpty() bool { + return sl.Value == nil || len(*sl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sl SnapshotList) hasNextLink() bool { + return sl.NextLink != nil && len(*sl.NextLink) != 0 +} + +// snapshotListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) { + if !sl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sl.NextLink))) +} + +// SnapshotListPage contains a page of Snapshot values. +type SnapshotListPage struct { + fn func(context.Context, SnapshotList) (SnapshotList, error) + sl SnapshotList +} + +// 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 *SnapshotListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sl) + if err != nil { + return err + } + page.sl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SnapshotListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SnapshotListPage) NotDone() bool { + return !page.sl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SnapshotListPage) Response() SnapshotList { + return page.sl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SnapshotListPage) Values() []Snapshot { + if page.sl.IsEmpty() { + return nil + } + return *page.sl.Value +} + +// Creates a new instance of the SnapshotListPage type. +func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage { + return SnapshotListPage{ + fn: getNextPage, + sl: cur, + } +} + +// SnapshotProperties snapshot resource properties. +type SnapshotProperties struct { + // TimeCreated - READ-ONLY; The time when the snapshot was created. + TimeCreated *date.Time `json:"timeCreated,omitempty"` + // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2' + HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` + // PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created. + PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. + CreationData *CreationData `json:"creationData,omitempty"` + // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only. + DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"` + // DiskState - The state of the snapshot. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateActiveSAS', 'DiskStateReadyToUpload', 'DiskStateActiveUpload' + DiskState DiskState `json:"diskState,omitempty"` + // UniqueID - READ-ONLY; Unique Guid identifying the resource. + UniqueID *string `json:"uniqueId,omitempty"` + // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` + // ProvisioningState - READ-ONLY; The disk provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. + Incremental *bool `json:"incremental,omitempty"` + // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` + // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll' + NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` + // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. + DiskAccessID *string `json:"diskAccessId,omitempty"` + // SupportsHibernation - Indicates the OS on a snapshot supports hibernation. + SupportsHibernation *bool `json:"supportsHibernation,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotProperties. +func (sp SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.OsType != "" { + objectMap["osType"] = sp.OsType + } + if sp.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = sp.HyperVGeneration + } + if sp.PurchasePlan != nil { + objectMap["purchasePlan"] = sp.PurchasePlan + } + if sp.CreationData != nil { + objectMap["creationData"] = sp.CreationData + } + if sp.DiskSizeGB != nil { + objectMap["diskSizeGB"] = sp.DiskSizeGB + } + if sp.DiskState != "" { + objectMap["diskState"] = sp.DiskState + } + if sp.EncryptionSettingsCollection != nil { + objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection + } + if sp.Incremental != nil { + objectMap["incremental"] = sp.Incremental + } + if sp.Encryption != nil { + objectMap["encryption"] = sp.Encryption + } + if sp.NetworkAccessPolicy != "" { + objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy + } + if sp.DiskAccessID != nil { + objectMap["diskAccessId"] = sp.DiskAccessID + } + if sp.SupportsHibernation != nil { + objectMap["supportsHibernation"] = sp.SupportsHibernation + } + return json.Marshal(objectMap) +} + +// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (Snapshot, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result. +func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsDeleteFuture.Result. +func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsGrantAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (AccessURI, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsGrantAccessFuture.Result. +func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + au.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { + au, err = client.GrantAccessResponder(au.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") + } + } + return +} + +// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an +// optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same +// sku as the previous snapshot +type SnapshotSku struct { + // Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS' + Name SnapshotStorageAccountTypes `json:"name,omitempty"` + // Tier - READ-ONLY; The sku tier. + Tier *string `json:"tier,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotSku. +func (ss SnapshotSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ss.Name != "" { + objectMap["name"] = ss.Name + } + return json.Marshal(objectMap) +} + +// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsRevokeAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsRevokeAccessFuture.Result. +func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture") + return + } + ar.Response = future.Response() + return +} + +// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (Snapshot, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsUpdateFuture.Result. +func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.UpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SnapshotUpdate snapshot update resource. +type SnapshotUpdate struct { + *SnapshotUpdateProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + Sku *SnapshotSku `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotUpdate. +func (su SnapshotUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if su.SnapshotUpdateProperties != nil { + objectMap["properties"] = su.SnapshotUpdateProperties + } + if su.Tags != nil { + objectMap["tags"] = su.Tags + } + if su.Sku != nil { + objectMap["sku"] = su.Sku + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct. +func (su *SnapshotUpdate) 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 snapshotUpdateProperties SnapshotUpdateProperties + err = json.Unmarshal(*v, &snapshotUpdateProperties) + if err != nil { + return err + } + su.SnapshotUpdateProperties = &snapshotUpdateProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + su.Tags = tags + } + case "sku": + if v != nil { + var sku SnapshotSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + su.Sku = &sku + } + } + } + + return nil +} + +// SnapshotUpdateProperties snapshot resource update properties. +type SnapshotUpdateProperties struct { + // OsType - the Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` + // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` + // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll' + NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` + // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. + DiskAccessID *string `json:"diskAccessId,omitempty"` + // SupportsHibernation - Indicates the OS on a snapshot supports hibernation. + SupportsHibernation *bool `json:"supportsHibernation,omitempty"` +} + +// SoftDeletePolicy contains information about the soft deletion policy of the gallery. +type SoftDeletePolicy struct { + // IsSoftDeleteEnabled - Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. + IsSoftDeleteEnabled *bool `json:"isSoftDeleteEnabled,omitempty"` +} + +// SourceVault the vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault struct { + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// SpotRestorePolicy specifies the Spot-Try-Restore properties for the virtual machine scale set.

+// With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM +// instances opportunistically based on capacity availability and pricing constraint. +type SpotRestorePolicy struct { + // Enabled - Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints + Enabled *bool `json:"enabled,omitempty"` + // RestoreTimeout - Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances + RestoreTimeout *string `json:"restoreTimeout,omitempty"` +} + +// SSHConfiguration SSH configuration for Linux based VMs running on Azure +type SSHConfiguration struct { + // PublicKeys - The list of SSH public keys used to authenticate with linux based VMs. + PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` +} + +// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where +// the public key is placed. +type SSHPublicKey struct { + // Path - Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys + Path *string `json:"path,omitempty"` + // KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + KeyData *string `json:"keyData,omitempty"` +} + +// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair. +type SSHPublicKeyGenerateKeyPairResult struct { + autorest.Response `json:"-"` + // PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret. + PrivateKey *string `json:"privateKey,omitempty"` + // PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. + PublicKey *string `json:"publicKey,omitempty"` + // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} + ID *string `json:"id,omitempty"` +} + +// SSHPublicKeyResource specifies information about the SSH public key. +type SSHPublicKeyResource struct { + autorest.Response `json:"-"` + // SSHPublicKeyResourceProperties - Properties of the SSH public key. + *SSHPublicKeyResourceProperties `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 SSHPublicKeyResource. +func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spkr.SSHPublicKeyResourceProperties != nil { + objectMap["properties"] = spkr.SSHPublicKeyResourceProperties + } + if spkr.Location != nil { + objectMap["location"] = spkr.Location + } + if spkr.Tags != nil { + objectMap["tags"] = spkr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct. +func (spkr *SSHPublicKeyResource) 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 SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties + err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) + if err != nil { + return err + } + spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spkr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spkr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spkr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spkr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spkr.Tags = tags + } + } + } + + return nil +} + +// SSHPublicKeyResourceProperties properties of the SSH public key. +type SSHPublicKeyResourceProperties struct { + // PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. + PublicKey *string `json:"publicKey,omitempty"` +} + +// SSHPublicKeysGroupListResult the list SSH public keys operation response. +type SSHPublicKeysGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of SSH public keys + Value *[]SSHPublicKeyResource `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys. + NextLink *string `json:"nextLink,omitempty"` +} + +// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource +// values. +type SSHPublicKeysGroupListResultIterator struct { + i int + page SSHPublicKeysGroupListResultPage +} + +// 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 *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.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 *SSHPublicKeysGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SSHPublicKeysGroupListResultIterator) 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 SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult { + 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 SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource { + if !iter.page.NotDone() { + return SSHPublicKeyResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SSHPublicKeysGroupListResultIterator type. +func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator { + return SSHPublicKeysGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool { + return spkglr.Value == nil || len(*spkglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool { + return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0 +} + +// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spkglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spkglr.NextLink))) +} + +// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values. +type SSHPublicKeysGroupListResultPage struct { + fn func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error) + spkglr SSHPublicKeysGroupListResult +} + +// 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 *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spkglr) + if err != nil { + return err + } + page.spkglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SSHPublicKeysGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SSHPublicKeysGroupListResultPage) NotDone() bool { + return !page.spkglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult { + return page.spkglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource { + if page.spkglr.IsEmpty() { + return nil + } + return *page.spkglr.Value +} + +// Creates a new instance of the SSHPublicKeysGroupListResultPage type. +func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage { + return SSHPublicKeysGroupListResultPage{ + fn: getNextPage, + spkglr: cur, + } +} + +// SSHPublicKeyUpdateResource specifies information about the SSH public key. +type SSHPublicKeyUpdateResource struct { + // SSHPublicKeyResourceProperties - Properties of the SSH public key. + *SSHPublicKeyResourceProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource. +func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spkur.SSHPublicKeyResourceProperties != nil { + objectMap["properties"] = spkur.SSHPublicKeyResourceProperties + } + if spkur.Tags != nil { + objectMap["tags"] = spkur.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct. +func (spkur *SSHPublicKeyUpdateResource) 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 SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties + err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) + if err != nil { + return err + } + spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spkur.Tags = tags + } + } + } + + return nil +} + +// StatusCodeCount ... +type StatusCodeCount struct { + // Code - READ-ONLY; The instance view status code + Code *string `json:"code,omitempty"` + // Count - READ-ONLY; Number of instances having this status code + Count *int32 `json:"count,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatusCodeCount. +func (scc StatusCodeCount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// StorageProfile specifies the storage settings for the virtual machine disks. +type StorageProfile struct { + // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. + ImageReference *ImageReference `json:"imageReference,omitempty"` + // OsDisk - Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + OsDisk *OSDisk `json:"osDisk,omitempty"` + // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + DataDisks *[]DataDisk `json:"dataDisks,omitempty"` +} + +// SubResource ... +type SubResource struct { + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// SubResourceReadOnly ... +type SubResourceReadOnly struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for SubResourceReadOnly. +func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SubResourceWithColocationStatus ... +type SubResourceWithColocationStatus struct { + // ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group. + ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// TargetRegion describes the target region information. +type TargetRegion struct { + // Name - The name of the region. + Name *string `json:"name,omitempty"` + // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable. + RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"` + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' + StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + Encryption *EncryptionImages `json:"encryption,omitempty"` +} + +// TerminateNotificationProfile ... +type TerminateNotificationProfile struct { + // NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M) + NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"` + // Enable - Specifies whether the Terminate Scheduled event is enabled or disabled. + Enable *bool `json:"enable,omitempty"` +} + +// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api. +type ThrottledRequestsInput struct { + // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. + BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` + // FromTime - From time of the query + FromTime *date.Time `json:"fromTime,omitempty"` + // ToTime - To time of the query + ToTime *date.Time `json:"toTime,omitempty"` + // GroupByThrottlePolicy - Group query result by Throttle Policy applied. + GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` + // GroupByOperationName - Group query result by Operation Name. + GroupByOperationName *bool `json:"groupByOperationName,omitempty"` + // GroupByResourceName - Group query result by Resource Name. + GroupByResourceName *bool `json:"groupByResourceName,omitempty"` + // GroupByClientApplicationID - Group query result by Client Application ID. + GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"` + // GroupByUserAgent - Group query result by User Agent. + GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"` +} + +// UefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual +// machine.

Minimum api-version: 2020-12-01 +type UefiSettings struct { + // SecureBootEnabled - Specifies whether secure boot should be enabled on the virtual machine.

Minimum api-version: 2020-12-01 + SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"` + // VTpmEnabled - Specifies whether vTPM should be enabled on the virtual machine.

Minimum api-version: 2020-12-01 + VTpmEnabled *bool `json:"vTpmEnabled,omitempty"` +} + +// UpdateDomain defines an update domain for the cloud service. +type UpdateDomain struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateDomain. +func (ud UpdateDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UpdateDomainListResult ... +type UpdateDomainListResult struct { + autorest.Response `json:"-"` + Value *[]UpdateDomain `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// UpdateDomainListResultIterator provides access to a complete listing of UpdateDomain values. +type UpdateDomainListResultIterator struct { + i int + page UpdateDomainListResultPage +} + +// 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 *UpdateDomainListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultIterator.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 *UpdateDomainListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter UpdateDomainListResultIterator) 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 UpdateDomainListResultIterator) Response() UpdateDomainListResult { + 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 UpdateDomainListResultIterator) Value() UpdateDomain { + if !iter.page.NotDone() { + return UpdateDomain{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the UpdateDomainListResultIterator type. +func NewUpdateDomainListResultIterator(page UpdateDomainListResultPage) UpdateDomainListResultIterator { + return UpdateDomainListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (udlr UpdateDomainListResult) IsEmpty() bool { + return udlr.Value == nil || len(*udlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (udlr UpdateDomainListResult) hasNextLink() bool { + return udlr.NextLink != nil && len(*udlr.NextLink) != 0 +} + +// updateDomainListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (udlr UpdateDomainListResult) updateDomainListResultPreparer(ctx context.Context) (*http.Request, error) { + if !udlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(udlr.NextLink))) +} + +// UpdateDomainListResultPage contains a page of UpdateDomain values. +type UpdateDomainListResultPage struct { + fn func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error) + udlr UpdateDomainListResult +} + +// 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 *UpdateDomainListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.udlr) + if err != nil { + return err + } + page.udlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *UpdateDomainListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page UpdateDomainListResultPage) NotDone() bool { + return !page.udlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page UpdateDomainListResultPage) Response() UpdateDomainListResult { + return page.udlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page UpdateDomainListResultPage) Values() []UpdateDomain { + if page.udlr.IsEmpty() { + return nil + } + return *page.udlr.Value +} + +// Creates a new instance of the UpdateDomainListResultPage type. +func NewUpdateDomainListResultPage(cur UpdateDomainListResult, getNextPage func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)) UpdateDomainListResultPage { + return UpdateDomainListResultPage{ + fn: getNextPage, + udlr: cur, + } +} + +// UpdateResource the Update Resource model definition. +type UpdateResource struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for UpdateResource. +func (ur UpdateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ur.Tags != nil { + objectMap["tags"] = ur.Tags + } + return json.Marshal(objectMap) +} + +// UpdateResourceDefinition the Update Resource model definition. +type UpdateResourceDefinition 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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for UpdateResourceDefinition. +func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if urd.Tags != nil { + objectMap["tags"] = urd.Tags + } + return json.Marshal(objectMap) +} + +// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response. +type UpgradeOperationHistoricalStatusInfo struct { + // Properties - READ-ONLY; Information about the properties of the upgrade operation. + Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo. +func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale +// Set. +type UpgradeOperationHistoricalStatusInfoProperties struct { + // RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation. + RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"` + // Progress - READ-ONLY; Counts of the VMs in each state. + Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` + // Error - READ-ONLY; Error Details for this upgrade if there are any. + Error *APIError `json:"error,omitempty"` + // StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform' + StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"` + // TargetImageReference - READ-ONLY; Image Reference details + TargetImageReference *ImageReference `json:"targetImageReference,omitempty"` + // RollbackInfo - READ-ONLY; Information about OS rollback if performed + RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties. +func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade. +type UpgradeOperationHistoryStatus struct { + // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted' + Code UpgradeState `json:"code,omitempty"` + // StartTime - READ-ONLY; Start time of the upgrade. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; End time of the upgrade. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus. +func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling. +type UpgradePolicy struct { + // Mode - Specifies the mode of an upgrade to virtual machines in the scale set.

Possible values are:

**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

**Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'UpgradeModeAutomatic', 'UpgradeModeManual', 'UpgradeModeRolling' + Mode UpgradeMode `json:"mode,omitempty"` + // RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade. + RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"` + // AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade. + AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"` +} + +// Usage describes Compute Resource Usage. +type Usage struct { + // Unit - An enum describing the unit of usage measurement. + Unit *string `json:"unit,omitempty"` + // CurrentValue - The current usage of the resource. + CurrentValue *int32 `json:"currentValue,omitempty"` + // Limit - The maximum permitted usage of the resource. + Limit *int64 `json:"limit,omitempty"` + // Name - The name of the type of usage. + Name *UsageName `json:"name,omitempty"` +} + +// UsageName the Usage Names. +type UsageName struct { + // Value - The name of the resource. + Value *string `json:"value,omitempty"` + // LocalizedValue - The localized name of the resource. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// UserArtifactManage ... +type UserArtifactManage struct { + // Install - Required. The path and arguments to install the gallery application. This is limited to 4096 characters. + Install *string `json:"install,omitempty"` + // Remove - Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. + Remove *string `json:"remove,omitempty"` + // Update - Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. + Update *string `json:"update,omitempty"` +} + +// UserArtifactSource the source image from which the Image Version is going to be created. +type UserArtifactSource struct { + // MediaLink - Required. The mediaLink of the artifact, must be a readable storage page blob. + MediaLink *string `json:"mediaLink,omitempty"` + // DefaultConfigurationLink - Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. + DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"` +} + +// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate +// should reside on the VM. +type VaultCertificate struct { + // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + CertificateURL *string `json:"certificateUrl,omitempty"` + // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + CertificateStore *string `json:"certificateStore,omitempty"` +} + +// VaultSecretGroup describes a set of certificates which are all in the same Key Vault. +type VaultSecretGroup struct { + // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates. + SourceVault *SubResource `json:"sourceVault,omitempty"` + // VaultCertificates - The list of key vault references in SourceVault which contain certificates. + VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"` +} + +// VirtualHardDisk describes the uri of a disk. +type VirtualHardDisk struct { + // URI - Specifies the virtual hard disk's uri. + URI *string `json:"uri,omitempty"` +} + +// VirtualMachine describes a Virtual Machine. +type VirtualMachine struct { + autorest.Response `json:"-"` + // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + Plan *Plan `json:"plan,omitempty"` + *VirtualMachineProperties `json:"properties,omitempty"` + // Resources - READ-ONLY; The virtual machine child extension resources. + Resources *[]VirtualMachineExtension `json:"resources,omitempty"` + // Identity - The identity of the virtual machine, if configured. + Identity *VirtualMachineIdentity `json:"identity,omitempty"` + // Zones - The virtual machine zones. + Zones *[]string `json:"zones,omitempty"` + // ExtendedLocation - The extended location of the Virtual Machine. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,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 VirtualMachine. +func (VM VirtualMachine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if VM.Plan != nil { + objectMap["plan"] = VM.Plan + } + if VM.VirtualMachineProperties != nil { + objectMap["properties"] = VM.VirtualMachineProperties + } + if VM.Identity != nil { + objectMap["identity"] = VM.Identity + } + if VM.Zones != nil { + objectMap["zones"] = VM.Zones + } + if VM.ExtendedLocation != nil { + objectMap["extendedLocation"] = VM.ExtendedLocation + } + if VM.Location != nil { + objectMap["location"] = VM.Location + } + if VM.Tags != nil { + objectMap["tags"] = VM.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct. +func (VM *VirtualMachine) 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 "plan": + if v != nil { + var plan Plan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + VM.Plan = &plan + } + case "properties": + if v != nil { + var virtualMachineProperties VirtualMachineProperties + err = json.Unmarshal(*v, &virtualMachineProperties) + if err != nil { + return err + } + VM.VirtualMachineProperties = &virtualMachineProperties + } + case "resources": + if v != nil { + var resources []VirtualMachineExtension + err = json.Unmarshal(*v, &resources) + if err != nil { + return err + } + VM.Resources = &resources + } + case "identity": + if v != nil { + var identity VirtualMachineIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + VM.Identity = &identity + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + VM.Zones = &zones + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + VM.ExtendedLocation = &extendedLocation + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + VM.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + VM.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + VM.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + VM.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + VM.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine. +type VirtualMachineAgentInstanceView struct { + // VMAgentVersion - The VM Agent full version. + VMAgentVersion *string `json:"vmAgentVersion,omitempty"` + // ExtensionHandlers - The virtual machine extension handler instance view. + ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// VirtualMachineAssessPatchesResult describes the properties of an AssessPatches result. +type VirtualMachineAssessPatchesResult struct { + autorest.Response `json:"-"` + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + AssessmentActivityID *string `json:"assessmentActivityId,omitempty"` + // RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + RebootPending *bool `json:"rebootPending,omitempty"` + // CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed. + CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"` + // OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security. + OtherPatchCount *int32 `json:"otherPatchCount,omitempty"` + // StartDateTime - READ-ONLY; The UTC timestamp when the operation began. + StartDateTime *date.Time `json:"startDateTime,omitempty"` + // AvailablePatches - READ-ONLY; The list of patches that have been detected as available for installation. + AvailablePatches *[]VirtualMachineSoftwarePatchProperties `json:"availablePatches,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineAssessPatchesResult. +func (vmapr VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineCaptureParameters capture Virtual Machine parameters. +type VirtualMachineCaptureParameters struct { + // VhdPrefix - The captured virtual hard disk's name prefix. + VhdPrefix *string `json:"vhdPrefix,omitempty"` + // DestinationContainerName - The destination container name. + DestinationContainerName *string `json:"destinationContainerName,omitempty"` + // OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict. + OverwriteVhds *bool `json:"overwriteVhds,omitempty"` +} + +// VirtualMachineCaptureResult output of virtual machine capture operation. +type VirtualMachineCaptureResult struct { + autorest.Response `json:"-"` + // Schema - READ-ONLY; the schema of the captured virtual machine + Schema *string `json:"$schema,omitempty"` + // ContentVersion - READ-ONLY; the version of the content + ContentVersion *string `json:"contentVersion,omitempty"` + // Parameters - READ-ONLY; parameters of the captured virtual machine + Parameters interface{} `json:"parameters,omitempty"` + // Resources - READ-ONLY; a list of resource items of the captured virtual machine + Resources *[]interface{} `json:"resources,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult. +func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmcr.ID != nil { + objectMap["id"] = vmcr.ID + } + return json.Marshal(objectMap) +} + +// VirtualMachineExtension describes a Virtual Machine Extension. +type VirtualMachineExtension struct { + autorest.Response `json:"-"` + *VirtualMachineExtensionProperties `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 VirtualMachineExtension. +func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vme.VirtualMachineExtensionProperties != nil { + objectMap["properties"] = vme.VirtualMachineExtensionProperties + } + if vme.Location != nil { + objectMap["location"] = vme.Location + } + if vme.Tags != nil { + objectMap["tags"] = vme.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct. +func (vme *VirtualMachineExtension) 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 virtualMachineExtensionProperties VirtualMachineExtensionProperties + err = json.Unmarshal(*v, &virtualMachineExtensionProperties) + if err != nil { + return err + } + vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vme.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vme.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vme.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vme.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vme.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler. +type VirtualMachineExtensionHandlerInstanceView struct { + // Type - Specifies the type of the extension; an example is "CustomScriptExtension". + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the script handler. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // Status - The extension handler status. + Status *InstanceViewStatus `json:"status,omitempty"` +} + +// VirtualMachineExtensionImage describes a Virtual Machine Extension Image. +type VirtualMachineExtensionImage struct { + autorest.Response `json:"-"` + *VirtualMachineExtensionImageProperties `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 VirtualMachineExtensionImage. +func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmei.VirtualMachineExtensionImageProperties != nil { + objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties + } + if vmei.Location != nil { + objectMap["location"] = vmei.Location + } + if vmei.Tags != nil { + objectMap["tags"] = vmei.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct. +func (vmei *VirtualMachineExtensionImage) 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 virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties + err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties) + if err != nil { + return err + } + vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmei.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmei.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmei.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vmei.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmei.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image. +type VirtualMachineExtensionImageProperties struct { + // OperatingSystem - The operating system this extension supports. + OperatingSystem *string `json:"operatingSystem,omitempty"` + // ComputeRole - The type of role (IaaS or PaaS) this extension supports. + ComputeRole *string `json:"computeRole,omitempty"` + // HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema. + HandlerSchema *string `json:"handlerSchema,omitempty"` + // VMScaleSetEnabled - Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. + VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"` + // SupportsMultipleExtensions - Whether the handler can support multiple extensions. + SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"` +} + +// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension. +type VirtualMachineExtensionInstanceView struct { + // Name - The virtual machine extension name. + Name *string `json:"name,omitempty"` + // Type - Specifies the type of the extension; an example is "CustomScriptExtension". + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the script handler. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // Substatuses - The resource status information. + Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension. +type VirtualMachineExtensionProperties struct { + // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed. + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + // Publisher - The name of the extension handler publisher. + Publisher *string `json:"publisher,omitempty"` + // Type - Specifies the type of the extension; an example is "CustomScriptExtension". + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the script handler. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + // Settings - Json formatted public settings for the extension. + Settings interface{} `json:"settings,omitempty"` + // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + ProtectedSettings interface{} `json:"protectedSettings,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - The virtual machine extension instance view. + InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"` + // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + SuppressFailures *bool `json:"suppressFailures,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties. +func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmep.ForceUpdateTag != nil { + objectMap["forceUpdateTag"] = vmep.ForceUpdateTag + } + if vmep.Publisher != nil { + objectMap["publisher"] = vmep.Publisher + } + if vmep.Type != nil { + objectMap["type"] = vmep.Type + } + if vmep.TypeHandlerVersion != nil { + objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion + } + if vmep.AutoUpgradeMinorVersion != nil { + objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion + } + if vmep.EnableAutomaticUpgrade != nil { + objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade + } + if vmep.Settings != nil { + objectMap["settings"] = vmep.Settings + } + if vmep.ProtectedSettings != nil { + objectMap["protectedSettings"] = vmep.ProtectedSettings + } + if vmep.InstanceView != nil { + objectMap["instanceView"] = vmep.InstanceView + } + if vmep.SuppressFailures != nil { + objectMap["suppressFailures"] = vmep.SuppressFailures + } + return json.Marshal(objectMap) +} + +// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineExtensionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result. +func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vme.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { + vme, err = client.CreateOrUpdateResponder(vme.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineExtensionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineExtensionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result. +func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineExtensionsListResult the List Extension operation response +type VirtualMachineExtensionsListResult struct { + autorest.Response `json:"-"` + // Value - The list of extensions + Value *[]VirtualMachineExtension `json:"value,omitempty"` +} + +// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineExtensionsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result. +func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vme.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { + vme, err = client.UpdateResponder(vme.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineExtensionUpdate describes a Virtual Machine Extension. +type VirtualMachineExtensionUpdate struct { + *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate. +func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmeu.VirtualMachineExtensionUpdateProperties != nil { + objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties + } + if vmeu.Tags != nil { + objectMap["tags"] = vmeu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct. +func (vmeu *VirtualMachineExtensionUpdate) 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 virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties + err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties) + if err != nil { + return err + } + vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmeu.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension. +type VirtualMachineExtensionUpdateProperties struct { + // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed. + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + // Publisher - The name of the extension handler publisher. + Publisher *string `json:"publisher,omitempty"` + // Type - Specifies the type of the extension; an example is "CustomScriptExtension". + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the script handler. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + // Settings - Json formatted public settings for the extension. + Settings interface{} `json:"settings,omitempty"` + // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + ProtectedSettings interface{} `json:"protectedSettings,omitempty"` + // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + SuppressFailures *bool `json:"suppressFailures,omitempty"` +} + +// VirtualMachineHealthStatus the health status of the VM. +type VirtualMachineHealthStatus struct { + // Status - READ-ONLY; The health status information for the VM. + Status *InstanceViewStatus `json:"status,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus. +func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineIdentity identity for the virtual machine. +type VirtualMachineIdentity struct { + // PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineIdentity. +func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmi.Type != "" { + objectMap["type"] = vmi.Type + } + if vmi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// VirtualMachineIdentityUserAssignedIdentitiesValue ... +type VirtualMachineIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - READ-ONLY; The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue. +func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineImage describes a Virtual Machine Image. +type VirtualMachineImage struct { + autorest.Response `json:"-"` + *VirtualMachineImageProperties `json:"properties,omitempty"` + // Name - The name of the resource. + Name *string `json:"name,omitempty"` + // Location - The supported Azure location of the resource. + Location *string `json:"location,omitempty"` + // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + Tags map[string]*string `json:"tags"` + // ExtendedLocation - The extended location of the Virtual Machine. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineImage. +func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmi.VirtualMachineImageProperties != nil { + objectMap["properties"] = vmi.VirtualMachineImageProperties + } + if vmi.Name != nil { + objectMap["name"] = vmi.Name + } + if vmi.Location != nil { + objectMap["location"] = vmi.Location + } + if vmi.Tags != nil { + objectMap["tags"] = vmi.Tags + } + if vmi.ExtendedLocation != nil { + objectMap["extendedLocation"] = vmi.ExtendedLocation + } + if vmi.ID != nil { + objectMap["id"] = vmi.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct. +func (vmi *VirtualMachineImage) 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 virtualMachineImageProperties VirtualMachineImageProperties + err = json.Unmarshal(*v, &virtualMachineImageProperties) + if err != nil { + return err + } + vmi.VirtualMachineImageProperties = &virtualMachineImageProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmi.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vmi.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmi.Tags = tags + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + vmi.ExtendedLocation = &extendedLocation + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmi.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineImageFeature specifies additional capabilities supported by the image +type VirtualMachineImageFeature struct { + // Name - The name of the feature. + Name *string `json:"name,omitempty"` + // Value - The corresponding value for the feature. + Value *string `json:"value,omitempty"` +} + +// VirtualMachineImageProperties describes the properties of a Virtual Machine Image. +type VirtualMachineImageProperties struct { + Plan *PurchasePlan `json:"plan,omitempty"` + OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"` + DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"` + AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"` + // HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2' + HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` + // Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image + Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"` + Features *[]VirtualMachineImageFeature `json:"features,omitempty"` +} + +// VirtualMachineImageResource virtual machine image resource information. +type VirtualMachineImageResource struct { + // Name - The name of the resource. + Name *string `json:"name,omitempty"` + // Location - The supported Azure location of the resource. + Location *string `json:"location,omitempty"` + // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + Tags map[string]*string `json:"tags"` + // ExtendedLocation - The extended location of the Virtual Machine. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineImageResource. +func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmir.Name != nil { + objectMap["name"] = vmir.Name + } + if vmir.Location != nil { + objectMap["location"] = vmir.Location + } + if vmir.Tags != nil { + objectMap["tags"] = vmir.Tags + } + if vmir.ExtendedLocation != nil { + objectMap["extendedLocation"] = vmir.ExtendedLocation + } + if vmir.ID != nil { + objectMap["id"] = vmir.ID + } + return json.Marshal(objectMap) +} + +// VirtualMachineInstallPatchesParameters input for InstallPatches as directly received by the API +type VirtualMachineInstallPatchesParameters struct { + // MaximumDuration - Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) + MaximumDuration *string `json:"maximumDuration,omitempty"` + // RebootSetting - Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: 'VMGuestPatchRebootSettingIfRequired', 'VMGuestPatchRebootSettingNever', 'VMGuestPatchRebootSettingAlways' + RebootSetting VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"` + // WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API + WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"` + // LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API + LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"` +} + +// VirtualMachineInstallPatchesResult the result summary of an installation operation. +type VirtualMachineInstallPatchesResult struct { + autorest.Response `json:"-"` + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + InstallationActivityID *string `json:"installationActivityId,omitempty"` + // RebootStatus - READ-ONLY; The reboot state of the VM following completion of the operation. Possible values include: 'VMGuestPatchRebootStatusUnknown', 'VMGuestPatchRebootStatusNotNeeded', 'VMGuestPatchRebootStatusRequired', 'VMGuestPatchRebootStatusStarted', 'VMGuestPatchRebootStatusFailed', 'VMGuestPatchRebootStatusCompleted' + RebootStatus VMGuestPatchRebootStatus `json:"rebootStatus,omitempty"` + // MaintenanceWindowExceeded - READ-ONLY; Whether the operation ran out of time before it completed all its intended actions. + MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"` + // ExcludedPatchCount - READ-ONLY; The number of patches that were not installed due to the user blocking their installation. + ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"` + // NotSelectedPatchCount - READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria. + NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"` + // PendingPatchCount - READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. + PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"` + // InstalledPatchCount - READ-ONLY; The number of patches successfully installed. + InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"` + // FailedPatchCount - READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details. + FailedPatchCount *int32 `json:"failedPatchCount,omitempty"` + // Patches - READ-ONLY; The patches that were installed during the operation. + Patches *[]PatchInstallationDetail `json:"patches,omitempty"` + // StartDateTime - READ-ONLY; The UTC timestamp when the operation began. + StartDateTime *date.Time `json:"startDateTime,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineInstallPatchesResult. +func (vmipr VirtualMachineInstallPatchesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineInstanceView the instance view of a virtual machine. +type VirtualMachineInstanceView struct { + autorest.Response `json:"-"` + // PlatformUpdateDomain - Specifies the update domain of the virtual machine. + PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` + // PlatformFaultDomain - Specifies the fault domain of the virtual machine. + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // ComputerName - The computer name assigned to the virtual machine. + ComputerName *string `json:"computerName,omitempty"` + // OsName - The Operating System running on the virtual machine. + OsName *string `json:"osName,omitempty"` + // OsVersion - The version of Operating System running on the virtual machine. + OsVersion *string `json:"osVersion,omitempty"` + // HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2' + HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"` + // RdpThumbPrint - The Remote desktop certificate thumbprint. + RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` + // VMAgent - The VM Agent running on the virtual machine. + VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` + // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine. + MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` + // Disks - The virtual machine disk information. + Disks *[]DiskInstanceView `json:"disks,omitempty"` + // Extensions - The extensions information. + Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` + // VMHealth - READ-ONLY; The health status for the VM. + VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"` + // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. + BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` + // AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. + AssignedHost *string `json:"assignedHost,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // PatchStatus - [Preview Feature] The status of virtual machine patch operations. + PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineInstanceView. +func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmiv.PlatformUpdateDomain != nil { + objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain + } + if vmiv.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain + } + if vmiv.ComputerName != nil { + objectMap["computerName"] = vmiv.ComputerName + } + if vmiv.OsName != nil { + objectMap["osName"] = vmiv.OsName + } + if vmiv.OsVersion != nil { + objectMap["osVersion"] = vmiv.OsVersion + } + if vmiv.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = vmiv.HyperVGeneration + } + if vmiv.RdpThumbPrint != nil { + objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint + } + if vmiv.VMAgent != nil { + objectMap["vmAgent"] = vmiv.VMAgent + } + if vmiv.MaintenanceRedeployStatus != nil { + objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus + } + if vmiv.Disks != nil { + objectMap["disks"] = vmiv.Disks + } + if vmiv.Extensions != nil { + objectMap["extensions"] = vmiv.Extensions + } + if vmiv.BootDiagnostics != nil { + objectMap["bootDiagnostics"] = vmiv.BootDiagnostics + } + if vmiv.Statuses != nil { + objectMap["statuses"] = vmiv.Statuses + } + if vmiv.PatchStatus != nil { + objectMap["patchStatus"] = vmiv.PatchStatus + } + return json.Marshal(objectMap) +} + +// VirtualMachineIPTag contains the IP tag associated with the public IP address. +type VirtualMachineIPTag struct { + // IPTagType - IP tag type. Example: FirstPartyUsage. + IPTagType *string `json:"ipTagType,omitempty"` + // Tag - IP tag associated with the public IP. Example: SQL, Storage etc. + Tag *string `json:"tag,omitempty"` +} + +// VirtualMachineListResult the List Virtual Machine operation response. +type VirtualMachineListResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machines. + Value *[]VirtualMachine `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values. +type VirtualMachineListResultIterator struct { + i int + page VirtualMachineListResultPage +} + +// 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 *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.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 *VirtualMachineListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineListResultIterator) 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 VirtualMachineListResultIterator) Response() VirtualMachineListResult { + 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 VirtualMachineListResultIterator) Value() VirtualMachine { + if !iter.page.NotDone() { + return VirtualMachine{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineListResultIterator type. +func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator { + return VirtualMachineListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmlr VirtualMachineListResult) IsEmpty() bool { + return vmlr.Value == nil || len(*vmlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmlr VirtualMachineListResult) hasNextLink() bool { + return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0 +} + +// virtualMachineListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmlr.NextLink))) +} + +// VirtualMachineListResultPage contains a page of VirtualMachine values. +type VirtualMachineListResultPage struct { + fn func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error) + vmlr VirtualMachineListResult +} + +// 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 *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmlr) + if err != nil { + return err + } + page.vmlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineListResultPage) NotDone() bool { + return !page.vmlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineListResultPage) Response() VirtualMachineListResult { + return page.vmlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineListResultPage) Values() []VirtualMachine { + if page.vmlr.IsEmpty() { + return nil + } + return *page.vmlr.Value +} + +// Creates a new instance of the VirtualMachineListResultPage type. +func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage { + return VirtualMachineListResultPage{ + fn: getNextPage, + vmlr: cur, + } +} + +// VirtualMachineNetworkInterfaceConfiguration describes a virtual machine network interface +// configurations. +type VirtualMachineNetworkInterfaceConfiguration struct { + // Name - The network interface configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineNetworkInterfaceConfigurationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineNetworkInterfaceConfiguration. +func (vmnic VirtualMachineNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmnic.Name != nil { + objectMap["name"] = vmnic.Name + } + if vmnic.VirtualMachineNetworkInterfaceConfigurationProperties != nil { + objectMap["properties"] = vmnic.VirtualMachineNetworkInterfaceConfigurationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineNetworkInterfaceConfiguration struct. +func (vmnic *VirtualMachineNetworkInterfaceConfiguration) 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 + } + vmnic.Name = &name + } + case "properties": + if v != nil { + var virtualMachineNetworkInterfaceConfigurationProperties VirtualMachineNetworkInterfaceConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineNetworkInterfaceConfigurationProperties) + if err != nil { + return err + } + vmnic.VirtualMachineNetworkInterfaceConfigurationProperties = &virtualMachineNetworkInterfaceConfigurationProperties + } + } + } + + return nil +} + +// VirtualMachineNetworkInterfaceConfigurationProperties describes a virtual machine network profile's IP +// configuration. +type VirtualMachineNetworkInterfaceConfigurationProperties struct { + // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. + Primary *bool `json:"primary,omitempty"` + // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` + // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + // EnableFpga - Specifies whether the network interface is FPGA networking-enabled. + EnableFpga *bool `json:"enableFpga,omitempty"` + // EnableIPForwarding - Whether IP forwarding enabled on this NIC. + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + // NetworkSecurityGroup - The network security group. + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + // DNSSettings - The dns settings to be applied on the network interfaces. + DNSSettings *VirtualMachineNetworkInterfaceDNSSettingsConfiguration `json:"dnsSettings,omitempty"` + // IPConfigurations - Specifies the IP configurations of the network interface. + IPConfigurations *[]VirtualMachineNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` +} + +// VirtualMachineNetworkInterfaceDNSSettingsConfiguration describes a virtual machines network +// configuration's DNS settings. +type VirtualMachineNetworkInterfaceDNSSettingsConfiguration struct { + // DNSServers - List of DNS servers IP addresses + DNSServers *[]string `json:"dnsServers,omitempty"` +} + +// VirtualMachineNetworkInterfaceIPConfiguration describes a virtual machine network profile's IP +// configuration. +type VirtualMachineNetworkInterfaceIPConfiguration struct { + // Name - The IP configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineNetworkInterfaceIPConfigurationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineNetworkInterfaceIPConfiguration. +func (vmniic VirtualMachineNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmniic.Name != nil { + objectMap["name"] = vmniic.Name + } + if vmniic.VirtualMachineNetworkInterfaceIPConfigurationProperties != nil { + objectMap["properties"] = vmniic.VirtualMachineNetworkInterfaceIPConfigurationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineNetworkInterfaceIPConfiguration struct. +func (vmniic *VirtualMachineNetworkInterfaceIPConfiguration) 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 + } + vmniic.Name = &name + } + case "properties": + if v != nil { + var virtualMachineNetworkInterfaceIPConfigurationProperties VirtualMachineNetworkInterfaceIPConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineNetworkInterfaceIPConfigurationProperties) + if err != nil { + return err + } + vmniic.VirtualMachineNetworkInterfaceIPConfigurationProperties = &virtualMachineNetworkInterfaceIPConfigurationProperties + } + } + } + + return nil +} + +// VirtualMachineNetworkInterfaceIPConfigurationProperties describes a virtual machine network interface IP +// configuration properties. +type VirtualMachineNetworkInterfaceIPConfigurationProperties struct { + // Subnet - Specifies the identifier of the subnet. + Subnet *SubResource `json:"subnet,omitempty"` + // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. + Primary *bool `json:"primary,omitempty"` + // PublicIPAddressConfiguration - The publicIPAddressConfiguration. + PublicIPAddressConfiguration *VirtualMachinePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` + // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionsIPv4', 'IPVersionsIPv6' + PrivateIPAddressVersion IPVersions `json:"privateIPAddressVersion,omitempty"` + // ApplicationSecurityGroups - Specifies an array of references to application security group. + ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` + // ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway. + ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` + // LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. + LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` +} + +// VirtualMachinePatchStatus the status of virtual machine patch operations. +type VirtualMachinePatchStatus struct { + // AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine. + AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"` + // LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine. + LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"` + // ConfigurationStatuses - READ-ONLY; The enablement status of the specified patchMode + ConfigurationStatuses *[]InstanceViewStatus `json:"configurationStatuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachinePatchStatus. +func (vmps VirtualMachinePatchStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmps.AvailablePatchSummary != nil { + objectMap["availablePatchSummary"] = vmps.AvailablePatchSummary + } + if vmps.LastPatchInstallationSummary != nil { + objectMap["lastPatchInstallationSummary"] = vmps.LastPatchInstallationSummary + } + return json.Marshal(objectMap) +} + +// VirtualMachineProperties describes the properties of a Virtual Machine. +type VirtualMachineProperties struct { + // HardwareProfile - Specifies the hardware settings for the virtual machine. + HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` + // StorageProfile - Specifies the storage settings for the virtual machine disks. + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine. + AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` + // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. + OsProfile *OSProfile `json:"osProfile,omitempty"` + // NetworkProfile - Specifies the network interfaces of the virtual machine. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + // SecurityProfile - Specifies the Security related profile settings for the virtual machine. + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // DiagnosticsProfile - Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` + // VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

This property cannot exist along with a non-null properties.availabilitySet reference.

Minimum api‐version: 2019‐03‐01 + 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: 'VirtualMachinePriorityTypesRegular', 'VirtualMachinePriorityTypesLow', 'VirtualMachinePriorityTypesSpot' + Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'VirtualMachineEvictionPolicyTypesDeallocate', 'VirtualMachineEvictionPolicyTypesDelete' + EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` + // 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"` + // HostGroup - Specifies information about the dedicated host group that the virtual machine resides in.

Minimum api-version: 2020-06-01.

NOTE: User cannot specify both host and hostGroup properties. + HostGroup *SubResource `json:"hostGroup,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The virtual machine instance view. + InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"` + // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 + LicenseType *string `json:"licenseType,omitempty"` + // VMID - READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. + VMID *string `json:"vmId,omitempty"` + // ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 + ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"` + // PlatformFaultDomain - Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.
  • This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // ScheduledEventsProfile - Specifies Scheduled Event related configurations. + ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` + // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 + UserData *string `json:"userData,omitempty"` + // CapacityReservation - Specifies information about the capacity reservation that is used to allocate virtual machine.

    Minimum api-version: 2021-04-01. + CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"` + // ApplicationProfile - Specifies the gallery applications that should be made available to the VM/VMSS + ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineProperties. +func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmp.HardwareProfile != nil { + objectMap["hardwareProfile"] = vmp.HardwareProfile + } + if vmp.StorageProfile != nil { + objectMap["storageProfile"] = vmp.StorageProfile + } + if vmp.AdditionalCapabilities != nil { + objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities + } + if vmp.OsProfile != nil { + objectMap["osProfile"] = vmp.OsProfile + } + if vmp.NetworkProfile != nil { + objectMap["networkProfile"] = vmp.NetworkProfile + } + if vmp.SecurityProfile != nil { + objectMap["securityProfile"] = vmp.SecurityProfile + } + if vmp.DiagnosticsProfile != nil { + objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile + } + if vmp.AvailabilitySet != nil { + objectMap["availabilitySet"] = vmp.AvailabilitySet + } + if vmp.VirtualMachineScaleSet != nil { + objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet + } + if vmp.ProximityPlacementGroup != nil { + objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup + } + if vmp.Priority != "" { + objectMap["priority"] = vmp.Priority + } + if vmp.EvictionPolicy != "" { + objectMap["evictionPolicy"] = vmp.EvictionPolicy + } + if vmp.BillingProfile != nil { + objectMap["billingProfile"] = vmp.BillingProfile + } + if vmp.Host != nil { + objectMap["host"] = vmp.Host + } + if vmp.HostGroup != nil { + objectMap["hostGroup"] = vmp.HostGroup + } + if vmp.LicenseType != nil { + objectMap["licenseType"] = vmp.LicenseType + } + if vmp.ExtensionsTimeBudget != nil { + objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget + } + if vmp.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = vmp.PlatformFaultDomain + } + if vmp.ScheduledEventsProfile != nil { + objectMap["scheduledEventsProfile"] = vmp.ScheduledEventsProfile + } + if vmp.UserData != nil { + objectMap["userData"] = vmp.UserData + } + if vmp.CapacityReservation != nil { + objectMap["capacityReservation"] = vmp.CapacityReservation + } + if vmp.ApplicationProfile != nil { + objectMap["applicationProfile"] = vmp.ApplicationProfile + } + return json.Marshal(objectMap) +} + +// VirtualMachinePublicIPAddressConfiguration describes a virtual machines IP Configuration's +// PublicIPAddress configuration +type VirtualMachinePublicIPAddressConfiguration struct { + // Name - The publicIP address configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachinePublicIPAddressConfigurationProperties `json:"properties,omitempty"` + Sku *PublicIPAddressSku `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachinePublicIPAddressConfiguration. +func (vmpiac VirtualMachinePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmpiac.Name != nil { + objectMap["name"] = vmpiac.Name + } + if vmpiac.VirtualMachinePublicIPAddressConfigurationProperties != nil { + objectMap["properties"] = vmpiac.VirtualMachinePublicIPAddressConfigurationProperties + } + if vmpiac.Sku != nil { + objectMap["sku"] = vmpiac.Sku + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachinePublicIPAddressConfiguration struct. +func (vmpiac *VirtualMachinePublicIPAddressConfiguration) 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 + } + vmpiac.Name = &name + } + case "properties": + if v != nil { + var virtualMachinePublicIPAddressConfigurationProperties VirtualMachinePublicIPAddressConfigurationProperties + err = json.Unmarshal(*v, &virtualMachinePublicIPAddressConfigurationProperties) + if err != nil { + return err + } + vmpiac.VirtualMachinePublicIPAddressConfigurationProperties = &virtualMachinePublicIPAddressConfigurationProperties + } + case "sku": + if v != nil { + var sku PublicIPAddressSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + vmpiac.Sku = &sku + } + } + } + + return nil +} + +// VirtualMachinePublicIPAddressConfigurationProperties describes a virtual machines IP Configuration's +// PublicIPAddress configuration +type VirtualMachinePublicIPAddressConfigurationProperties struct { + // IdleTimeoutInMinutes - The idle timeout of the public IP address. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // DeleteOption - Specify what happens to the public IP address when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` + // DNSSettings - The dns settings to be applied on the publicIP addresses . + DNSSettings *VirtualMachinePublicIPAddressDNSSettingsConfiguration `json:"dnsSettings,omitempty"` + // IPTags - The list of IP tags associated with the public IP address. + IPTags *[]VirtualMachineIPTag `json:"ipTags,omitempty"` + // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses. + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionsIPv4', 'IPVersionsIPv6' + PublicIPAddressVersion IPVersions `json:"publicIPAddressVersion,omitempty"` + // PublicIPAllocationMethod - Specify the public IP allocation type. Possible values include: 'PublicIPAllocationMethodDynamic', 'PublicIPAllocationMethodStatic' + PublicIPAllocationMethod PublicIPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` +} + +// VirtualMachinePublicIPAddressDNSSettingsConfiguration describes a virtual machines network +// configuration's DNS settings. +type VirtualMachinePublicIPAddressDNSSettingsConfiguration struct { + // DomainNameLabel - The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. + DomainNameLabel *string `json:"domainNameLabel,omitempty"` +} + +// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk +// will always be reimaged +type VirtualMachineReimageParameters struct { + // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + TempDisk *bool `json:"tempDisk,omitempty"` +} + +// VirtualMachineRunCommand describes a Virtual Machine run command. +type VirtualMachineRunCommand struct { + autorest.Response `json:"-"` + *VirtualMachineRunCommandProperties `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 VirtualMachineRunCommand. +func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmrc.VirtualMachineRunCommandProperties != nil { + objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties + } + if vmrc.Location != nil { + objectMap["location"] = vmrc.Location + } + if vmrc.Tags != nil { + objectMap["tags"] = vmrc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct. +func (vmrc *VirtualMachineRunCommand) 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 virtualMachineRunCommandProperties VirtualMachineRunCommandProperties + err = json.Unmarshal(*v, &virtualMachineRunCommandProperties) + if err != nil { + return err + } + vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmrc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmrc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmrc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vmrc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmrc.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command. +type VirtualMachineRunCommandInstanceView struct { + // ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled' + ExecutionState ExecutionState `json:"executionState,omitempty"` + // ExecutionMessage - Communicate script configuration errors or execution messages. + ExecutionMessage *string `json:"executionMessage,omitempty"` + // ExitCode - Exit code returned from script execution. + ExitCode *int32 `json:"exitCode,omitempty"` + // Output - Script output stream. + Output *string `json:"output,omitempty"` + // Error - Script error stream. + Error *string `json:"error,omitempty"` + // StartTime - Script start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Script end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command. +type VirtualMachineRunCommandProperties struct { + // Source - The source of the run command script. + Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"` + // Parameters - The parameters used by the script. + Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"` + // ProtectedParameters - The parameters used by the script. + ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"` + // AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. + AsyncExecution *bool `json:"asyncExecution,omitempty"` + // RunAsUser - Specifies the user account on the VM when executing the run command. + RunAsUser *string `json:"runAsUser,omitempty"` + // RunAsPassword - Specifies the user account password on the VM when executing the run command. + RunAsPassword *string `json:"runAsPassword,omitempty"` + // TimeoutInSeconds - The timeout in seconds to execute the run command. + TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"` + // OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded. + OutputBlobURI *string `json:"outputBlobUri,omitempty"` + // ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded. + ErrorBlobURI *string `json:"errorBlobUri,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The virtual machine run command instance view. + InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties. +func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmrcp.Source != nil { + objectMap["source"] = vmrcp.Source + } + if vmrcp.Parameters != nil { + objectMap["parameters"] = vmrcp.Parameters + } + if vmrcp.ProtectedParameters != nil { + objectMap["protectedParameters"] = vmrcp.ProtectedParameters + } + if vmrcp.AsyncExecution != nil { + objectMap["asyncExecution"] = vmrcp.AsyncExecution + } + if vmrcp.RunAsUser != nil { + objectMap["runAsUser"] = vmrcp.RunAsUser + } + if vmrcp.RunAsPassword != nil { + objectMap["runAsPassword"] = vmrcp.RunAsPassword + } + if vmrcp.TimeoutInSeconds != nil { + objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds + } + if vmrcp.OutputBlobURI != nil { + objectMap["outputBlobUri"] = vmrcp.OutputBlobURI + } + if vmrcp.ErrorBlobURI != nil { + objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI + } + return json.Marshal(objectMap) +} + +// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineRunCommandsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineRunCommandsCreateOrUpdateFuture.Result. +func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmrc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineRunCommandScriptSource describes the script sources for run command. +type VirtualMachineRunCommandScriptSource struct { + // Script - Specifies the script content to be executed on the VM. + Script *string `json:"script,omitempty"` + // ScriptURI - Specifies the script download location. + ScriptURI *string `json:"scriptUri,omitempty"` + // CommandID - Specifies a commandId of predefined built-in script. + CommandID *string `json:"commandId,omitempty"` +} + +// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineRunCommandsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineRunCommandsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineRunCommandsDeleteFuture.Result. +func (future *VirtualMachineRunCommandsDeleteFuture) result(client VirtualMachineRunCommandsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineRunCommandsListResult the List run command operation response +type VirtualMachineRunCommandsListResult struct { + autorest.Response `json:"-"` + // Value - The list of run commands + Value *[]VirtualMachineRunCommand `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of run commands. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of +// VirtualMachineRunCommand values. +type VirtualMachineRunCommandsListResultIterator struct { + i int + page VirtualMachineRunCommandsListResultPage +} + +// 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 *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.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 *VirtualMachineRunCommandsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineRunCommandsListResultIterator) 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 VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult { + 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 VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand { + if !iter.page.NotDone() { + return VirtualMachineRunCommand{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type. +func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator { + return VirtualMachineRunCommandsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool { + return vmrclr.Value == nil || len(*vmrclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool { + return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0 +} + +// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmrclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmrclr.NextLink))) +} + +// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values. +type VirtualMachineRunCommandsListResultPage struct { + fn func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error) + vmrclr VirtualMachineRunCommandsListResult +} + +// 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 *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmrclr) + if err != nil { + return err + } + page.vmrclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineRunCommandsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineRunCommandsListResultPage) NotDone() bool { + return !page.vmrclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult { + return page.vmrclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand { + if page.vmrclr.IsEmpty() { + return nil + } + return *page.vmrclr.Value +} + +// Creates a new instance of the VirtualMachineRunCommandsListResultPage type. +func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage { + return VirtualMachineRunCommandsListResultPage{ + fn: getNextPage, + vmrclr: cur, + } +} + +// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineRunCommandsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineRunCommandsUpdateFuture.Result. +func (future *VirtualMachineRunCommandsUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmrc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.UpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineRunCommandUpdate describes a Virtual Machine run command. +type VirtualMachineRunCommandUpdate struct { + *VirtualMachineRunCommandProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate. +func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmrcu.VirtualMachineRunCommandProperties != nil { + objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties + } + if vmrcu.Tags != nil { + objectMap["tags"] = vmrcu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct. +func (vmrcu *VirtualMachineRunCommandUpdate) 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 virtualMachineRunCommandProperties VirtualMachineRunCommandProperties + err = json.Unmarshal(*v, &virtualMachineRunCommandProperties) + if err != nil { + return err + } + vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmrcu.Tags = tags + } + } + } + + return nil +} + +// VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesAssessPatchesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (VirtualMachineAssessPatchesResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesAssessPatchesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesAssessPatchesFuture.Result. +func (future *VirtualMachinesAssessPatchesFuture) result(client VirtualMachinesClient) (vmapr VirtualMachineAssessPatchesResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmapr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesAssessPatchesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmapr.Response.Response, err = future.GetResult(sender); err == nil && vmapr.Response.Response.StatusCode != http.StatusNoContent { + vmapr, err = client.AssessPatchesResponder(vmapr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", vmapr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSet describes a Virtual Machine Scale Set. +type VirtualMachineScaleSet struct { + autorest.Response `json:"-"` + // Sku - The virtual machine scale set sku. + Sku *Sku `json:"sku,omitempty"` + // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + Plan *Plan `json:"plan,omitempty"` + *VirtualMachineScaleSetProperties `json:"properties,omitempty"` + // Identity - The identity of the virtual machine scale set, if configured. + Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` + // Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set + Zones *[]string `json:"zones,omitempty"` + // ExtendedLocation - The extended location of the Virtual Machine Scale Set. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,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 VirtualMachineScaleSet. +func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmss.Sku != nil { + objectMap["sku"] = vmss.Sku + } + if vmss.Plan != nil { + objectMap["plan"] = vmss.Plan + } + if vmss.VirtualMachineScaleSetProperties != nil { + objectMap["properties"] = vmss.VirtualMachineScaleSetProperties + } + if vmss.Identity != nil { + objectMap["identity"] = vmss.Identity + } + if vmss.Zones != nil { + objectMap["zones"] = vmss.Zones + } + if vmss.ExtendedLocation != nil { + objectMap["extendedLocation"] = vmss.ExtendedLocation + } + if vmss.Location != nil { + objectMap["location"] = vmss.Location + } + if vmss.Tags != nil { + objectMap["tags"] = vmss.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct. +func (vmss *VirtualMachineScaleSet) 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 "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + vmss.Sku = &sku + } + case "plan": + if v != nil { + var plan Plan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + vmss.Plan = &plan + } + case "properties": + if v != nil { + var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetProperties) + if err != nil { + return err + } + vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties + } + case "identity": + if v != nil { + var identity VirtualMachineScaleSetIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + vmss.Identity = &identity + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + vmss.Zones = &zones + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + vmss.ExtendedLocation = &extendedLocation + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmss.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmss.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmss.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vmss.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmss.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk. +type VirtualMachineScaleSetDataDisk struct { + // Name - The disk name. + Name *string `json:"name,omitempty"` + // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + Lun *int32 `json:"lun,omitempty"` + // Caching - Specifies the caching requirements.

    Possible values are:

    **None**

    **ReadOnly**

    **ReadWrite**

    Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` + // CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' + CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` + // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // ManagedDisk - The managed disk parameters. + ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` + // DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. + DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` + // DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` +} + +// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension. +type VirtualMachineScaleSetExtension struct { + autorest.Response `json:"-"` + // Name - 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 VirtualMachineScaleSetExtension. +func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmsse.Name != nil { + objectMap["name"] = vmsse.Name + } + if vmsse.VirtualMachineScaleSetExtensionProperties != nil { + objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct. +func (vmsse *VirtualMachineScaleSetExtension) 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 + } + 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 + err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties) + if err != nil { + return err + } + vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmsse.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response. +type VirtualMachineScaleSetExtensionListResult struct { + autorest.Response `json:"-"` + // Value - The list of VM scale set extensions. + Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of +// VirtualMachineScaleSetExtension values. +type VirtualMachineScaleSetExtensionListResultIterator struct { + i int + page VirtualMachineScaleSetExtensionListResultPage +} + +// 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 *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.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 *VirtualMachineScaleSetExtensionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineScaleSetExtensionListResultIterator) 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 VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult { + 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 VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension { + if !iter.page.NotDone() { + return VirtualMachineScaleSetExtension{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type. +func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator { + return VirtualMachineScaleSetExtensionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool { + return vmsselr.Value == nil || len(*vmsselr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool { + return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0 +} + +// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmsselr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmsselr.NextLink))) +} + +// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values. +type VirtualMachineScaleSetExtensionListResultPage struct { + fn func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error) + vmsselr VirtualMachineScaleSetExtensionListResult +} + +// 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 *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmsselr) + if err != nil { + return err + } + page.vmsselr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineScaleSetExtensionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool { + return !page.vmsselr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult { + return page.vmsselr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension { + if page.vmsselr.IsEmpty() { + return nil + } + return *page.vmsselr.Value +} + +// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type. +func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage { + return VirtualMachineScaleSetExtensionListResultPage{ + fn: getNextPage, + vmsselr: cur, + } +} + +// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile. +type VirtualMachineScaleSetExtensionProfile struct { + // Extensions - The virtual machine scale set child extension resources. + Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"` + // ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

    Minimum api-version: 2020-06-01 + ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"` +} + +// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set +// Extension. +type VirtualMachineScaleSetExtensionProperties struct { + // ForceUpdateTag - If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + // Publisher - The name of the extension handler publisher. + Publisher *string `json:"publisher,omitempty"` + // Type - Specifies the type of the extension; an example is "CustomScriptExtension". + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the script handler. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + // Settings - Json formatted public settings for the extension. + Settings interface{} `json:"settings,omitempty"` + // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + ProtectedSettings interface{} `json:"protectedSettings,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned. + ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"` + // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + SuppressFailures *bool `json:"suppressFailures,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties. +func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssep.ForceUpdateTag != nil { + objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag + } + if vmssep.Publisher != nil { + objectMap["publisher"] = vmssep.Publisher + } + if vmssep.Type != nil { + objectMap["type"] = vmssep.Type + } + if vmssep.TypeHandlerVersion != nil { + objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion + } + if vmssep.AutoUpgradeMinorVersion != nil { + objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion + } + if vmssep.EnableAutomaticUpgrade != nil { + objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade + } + if vmssep.Settings != nil { + objectMap["settings"] = vmssep.Settings + } + if vmssep.ProtectedSettings != nil { + objectMap["protectedSettings"] = vmssep.ProtectedSettings + } + if vmssep.ProvisionAfterExtensions != nil { + objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions + } + if vmssep.SuppressFailures != nil { + objectMap["suppressFailures"] = vmssep.SuppressFailures + } + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result. +func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) 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.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmsse.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(vmsse.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetExtensionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result. +func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetExtensionsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result. +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 { + vmsse.Response.Response = future.Response() + 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. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity. +func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssi.Type != "" { + objectMap["type"] = vmssi.Type + } + if vmssi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ... +type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - READ-ONLY; The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. +func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set. +type VirtualMachineScaleSetInstanceView struct { + autorest.Response `json:"-"` + // VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set. + VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"` + // Extensions - READ-ONLY; The extensions information. + Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // OrchestrationServices - READ-ONLY; The orchestration services information. + OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView. +func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssiv.Statuses != nil { + objectMap["statuses"] = vmssiv.Statuses + } + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of +// a virtual machine scale set. +type VirtualMachineScaleSetInstanceViewStatusesSummary struct { + // StatusesSummary - READ-ONLY; The extensions information. + StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary. +func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP +// configuration. +type VirtualMachineScaleSetIPConfiguration struct { + // Name - The IP configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration. +func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssic.Name != nil { + objectMap["name"] = vmssic.Name + } + if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil { + objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties + } + if vmssic.ID != nil { + objectMap["id"] = vmssic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct. +func (vmssic *VirtualMachineScaleSetIPConfiguration) 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 + } + vmssic.Name = &name + } + case "properties": + if v != nil { + var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties) + if err != nil { + return err + } + vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssic.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's +// IP configuration properties. +type VirtualMachineScaleSetIPConfigurationProperties struct { + // Subnet - Specifies the identifier of the subnet. + Subnet *APIEntityReference `json:"subnet,omitempty"` + // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. + Primary *bool `json:"primary,omitempty"` + // PublicIPAddressConfiguration - The publicIPAddressConfiguration. + PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` + // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. + ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` + // ApplicationSecurityGroups - Specifies an array of references to application security group. + ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` + // LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. + LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` + // LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. + LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` +} + +// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address. +type VirtualMachineScaleSetIPTag struct { + // IPTagType - IP tag type. Example: FirstPartyUsage. + IPTagType *string `json:"ipTagType,omitempty"` + // Tag - IP tag associated with the public IP. Example: SQL, Storage etc. + Tag *string `json:"tag,omitempty"` +} + +// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History +// operation response. +type VirtualMachineScaleSetListOSUpgradeHistory struct { + autorest.Response `json:"-"` + // Value - The list of OS upgrades performed on the virtual machine scale set. + Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of +// UpgradeOperationHistoricalStatusInfo values. +type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct { + i int + page VirtualMachineScaleSetListOSUpgradeHistoryPage +} + +// 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 *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.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 *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) 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 VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory { + 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 VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo { + if !iter.page.NotDone() { + return UpgradeOperationHistoricalStatusInfo{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type. +func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator { + return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool { + return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool { + return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0 +} + +// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) { + if !vmsslouh.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmsslouh.NextLink))) +} + +// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo +// values. +type VirtualMachineScaleSetListOSUpgradeHistoryPage struct { + fn func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error) + vmsslouh VirtualMachineScaleSetListOSUpgradeHistory +} + +// 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 *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmsslouh) + if err != nil { + return err + } + page.vmsslouh = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool { + return !page.vmsslouh.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory { + return page.vmsslouh +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo { + if page.vmsslouh.IsEmpty() { + return nil + } + return *page.vmsslouh.Value +} + +// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type. +func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage { + return VirtualMachineScaleSetListOSUpgradeHistoryPage{ + fn: getNextPage, + vmsslouh: cur, + } +} + +// VirtualMachineScaleSetListResult the List Virtual Machine operation response. +type VirtualMachineScaleSetListResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machine scale sets. + Value *[]VirtualMachineScaleSet `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet +// values. +type VirtualMachineScaleSetListResultIterator struct { + i int + page VirtualMachineScaleSetListResultPage +} + +// 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 *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.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 *VirtualMachineScaleSetListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineScaleSetListResultIterator) 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 VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult { + 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 VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet { + if !iter.page.NotDone() { + return VirtualMachineScaleSet{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineScaleSetListResultIterator type. +func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator { + return VirtualMachineScaleSetListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool { + return vmsslr.Value == nil || len(*vmsslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool { + return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0 +} + +// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmsslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmsslr.NextLink))) +} + +// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values. +type VirtualMachineScaleSetListResultPage struct { + fn func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error) + vmsslr VirtualMachineScaleSetListResult +} + +// 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 *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmsslr) + if err != nil { + return err + } + page.vmsslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineScaleSetListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineScaleSetListResultPage) NotDone() bool { + return !page.vmsslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult { + return page.vmsslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet { + if page.vmsslr.IsEmpty() { + return nil + } + return *page.vmsslr.Value +} + +// Creates a new instance of the VirtualMachineScaleSetListResultPage type. +func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage { + return VirtualMachineScaleSetListResultPage{ + fn: getNextPage, + vmsslr: cur, + } +} + +// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response. +type VirtualMachineScaleSetListSkusResult struct { + autorest.Response `json:"-"` + // Value - The list of skus available for the virtual machine scale set. + Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS Skus. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of +// VirtualMachineScaleSetSku values. +type VirtualMachineScaleSetListSkusResultIterator struct { + i int + page VirtualMachineScaleSetListSkusResultPage +} + +// 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 *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.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 *VirtualMachineScaleSetListSkusResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineScaleSetListSkusResultIterator) 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 VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult { + 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 VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku { + if !iter.page.NotDone() { + return VirtualMachineScaleSetSku{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type. +func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator { + return VirtualMachineScaleSetListSkusResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool { + return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool { + return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0 +} + +// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmsslsr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmsslsr.NextLink))) +} + +// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values. +type VirtualMachineScaleSetListSkusResultPage struct { + fn func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error) + vmsslsr VirtualMachineScaleSetListSkusResult +} + +// 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 *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmsslsr) + if err != nil { + return err + } + page.vmsslsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineScaleSetListSkusResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool { + return !page.vmsslsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult { + return page.vmsslsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku { + if page.vmsslsr.IsEmpty() { + return nil + } + return *page.vmsslsr.Value +} + +// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type. +func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage { + return VirtualMachineScaleSetListSkusResultPage{ + fn: getNextPage, + vmsslsr: cur, + } +} + +// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response. +type VirtualMachineScaleSetListWithLinkResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machine scale sets. + Value *[]VirtualMachineScaleSet `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual Machine Scale Sets. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of +// VirtualMachineScaleSet values. +type VirtualMachineScaleSetListWithLinkResultIterator struct { + i int + page VirtualMachineScaleSetListWithLinkResultPage +} + +// 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 *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.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 *VirtualMachineScaleSetListWithLinkResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineScaleSetListWithLinkResultIterator) 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 VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult { + 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 VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet { + if !iter.page.NotDone() { + return VirtualMachineScaleSet{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type. +func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator { + return VirtualMachineScaleSetListWithLinkResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool { + return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool { + return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0 +} + +// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmsslwlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmsslwlr.NextLink))) +} + +// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values. +type VirtualMachineScaleSetListWithLinkResultPage struct { + fn func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error) + vmsslwlr VirtualMachineScaleSetListWithLinkResult +} + +// 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 *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmsslwlr) + if err != nil { + return err + } + page.vmsslwlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineScaleSetListWithLinkResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool { + return !page.vmsslwlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult { + return page.vmsslwlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet { + if page.vmsslwlr.IsEmpty() { + return nil + } + return *page.vmsslwlr.Value +} + +// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type. +func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage { + return VirtualMachineScaleSetListWithLinkResultPage{ + fn: getNextPage, + vmsslwlr: cur, + } +} + +// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk. +type VirtualMachineScaleSetManagedDiskParameters struct { + // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS' + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` + // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk. + DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` +} + +// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's +// network configurations. +type VirtualMachineScaleSetNetworkConfiguration struct { + // Name - The network configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration. +func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssnc.Name != nil { + objectMap["name"] = vmssnc.Name + } + if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil { + objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties + } + if vmssnc.ID != nil { + objectMap["id"] = vmssnc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct. +func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) 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 + } + vmssnc.Name = &name + } + case "properties": + if v != nil { + var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties) + if err != nil { + return err + } + vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssnc.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network +// configuration's DNS settings. +type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct { + // DNSServers - List of DNS servers IP addresses + DNSServers *[]string `json:"dnsServers,omitempty"` +} + +// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network +// profile's IP configuration. +type VirtualMachineScaleSetNetworkConfigurationProperties struct { + // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. + Primary *bool `json:"primary,omitempty"` + // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + // EnableFpga - Specifies whether the network interface is FPGA networking-enabled. + EnableFpga *bool `json:"enableFpga,omitempty"` + // NetworkSecurityGroup - The network security group. + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + // DNSSettings - The dns settings to be applied on the network interfaces. + DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` + // IPConfigurations - Specifies the IP configurations of the network interface. + IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"` + // EnableIPForwarding - Whether IP forwarding enabled on this NIC. + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` +} + +// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile. +type VirtualMachineScaleSetNetworkProfile struct { + // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` + // NetworkInterfaceConfigurations - The list of network configurations. + NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` + // NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'. Possible values include: 'NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne' + NetworkAPIVersion NetworkAPIVersion `json:"networkApiVersion,omitempty"` +} + +// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk. +type VirtualMachineScaleSetOSDisk struct { + // Name - The disk name. + Name *string `json:"name,omitempty"` + // Caching - Specifies the caching requirements.

    Possible values are:

    **None**

    **ReadOnly**

    **ReadWrite**

    Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` + // CreateOption - Specifies how the virtual machines in the scale set should be created.

    The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' + CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` + // DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. + DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` + // DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    **Windows**

    **Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // Image - Specifies information about the unmanaged user image to base the scale set on. + Image *VirtualHardDisk `json:"image,omitempty"` + // VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set. + VhdContainers *[]string `json:"vhdContainers,omitempty"` + // ManagedDisk - The managed disk parameters. + ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` +} + +// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile. +type VirtualMachineScaleSetOSProfile struct { + // ComputerNamePrefix - Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. + ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"` + // AdminUsername - Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + AdminPassword *string `json:"adminPassword,omitempty"` + // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) + CustomData *string `json:"customData,omitempty"` + // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. + WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` + // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` + // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` +} + +// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set. +type VirtualMachineScaleSetProperties struct { + // UpgradePolicy - The upgrade policy. + UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` + // AutomaticRepairsPolicy - Policy for automatic repairs. + AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` + // VirtualMachineProfile - The virtual machine profile. + VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned. + Overprovision *bool `json:"overprovision,omitempty"` + // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. + DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` + // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set. + UniqueID *string `json:"uniqueId,omitempty"` + // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. + SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. + ZoneBalance *bool `json:"zoneBalance,omitempty"` + // PlatformFaultDomainCount - Fault Domain count for each placement group. + PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,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"` + // HostGroup - Specifies information about the dedicated host group that the virtual machine scale set resides in.

    Minimum api-version: 2020-06-01. + HostGroup *SubResource `json:"hostGroup,omitempty"` + // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` + // ScaleInPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. + ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` + // OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set. Possible values include: 'OrchestrationModeUniform', 'OrchestrationModeFlexible' + OrchestrationMode OrchestrationMode `json:"orchestrationMode,omitempty"` + // SpotRestorePolicy - Specifies the Spot Restore properties for the virtual machine scale set. + SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties. +func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssp.UpgradePolicy != nil { + objectMap["upgradePolicy"] = vmssp.UpgradePolicy + } + if vmssp.AutomaticRepairsPolicy != nil { + objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy + } + if vmssp.VirtualMachineProfile != nil { + objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile + } + if vmssp.Overprovision != nil { + objectMap["overprovision"] = vmssp.Overprovision + } + if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil { + objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs + } + if vmssp.SinglePlacementGroup != nil { + objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup + } + if vmssp.ZoneBalance != nil { + objectMap["zoneBalance"] = vmssp.ZoneBalance + } + if vmssp.PlatformFaultDomainCount != nil { + objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount + } + if vmssp.ProximityPlacementGroup != nil { + objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup + } + if vmssp.HostGroup != nil { + objectMap["hostGroup"] = vmssp.HostGroup + } + if vmssp.AdditionalCapabilities != nil { + objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities + } + if vmssp.ScaleInPolicy != nil { + objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy + } + if vmssp.OrchestrationMode != "" { + objectMap["orchestrationMode"] = vmssp.OrchestrationMode + } + if vmssp.SpotRestorePolicy != nil { + objectMap["spotRestorePolicy"] = vmssp.SpotRestorePolicy + } + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP +// Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetPublicIPAddressConfiguration struct { + // Name - The publicIP address configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"` + Sku *PublicIPAddressSku `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration. +func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmsspiac.Name != nil { + objectMap["name"] = vmsspiac.Name + } + if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil { + objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties + } + if vmsspiac.Sku != nil { + objectMap["sku"] = vmsspiac.Sku + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct. +func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) 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 + } + vmsspiac.Name = &name + } + case "properties": + if v != nil { + var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties) + if err != nil { + return err + } + vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties + } + case "sku": + if v != nil { + var sku PublicIPAddressSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + vmsspiac.Sku = &sku + } + } + } + + return nil +} + +// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets +// network configuration's DNS settings. +type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct { + // DomainNameLabel - The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created + DomainNameLabel *string `json:"domainNameLabel,omitempty"` +} + +// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP +// Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct { + // IdleTimeoutInMinutes - The idle timeout of the public IP address. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // DNSSettings - The dns settings to be applied on the publicIP addresses . + DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` + // IPTags - The list of IP tags associated with the public IP address. + IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"` + // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses. + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` + // DeleteOption - Specify what happens to the public IP when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` +} + +// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters. +type VirtualMachineScaleSetReimageParameters struct { + // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + InstanceIds *[]string `json:"instanceIds,omitempty"` + // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + TempDisk *bool `json:"tempDisk,omitempty"` +} + +// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualMachineScaleSetRollingUpgradesCancelFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result. +func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result. +func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result. +func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result. +func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmss.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent { + vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsDeallocateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result. +func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result. +func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetsDeleteInstancesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result. +func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetSku describes an available virtual machine scale set sku. +type VirtualMachineScaleSetSku struct { + // ResourceType - READ-ONLY; The type of resource the sku applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Sku - READ-ONLY; The Sku. + Sku *Sku `json:"sku,omitempty"` + // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set. + Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku. +func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku. +type VirtualMachineScaleSetSkuCapacity struct { + // Minimum - READ-ONLY; The minimum capacity. + Minimum *int64 `json:"minimum,omitempty"` + // Maximum - READ-ONLY; The maximum capacity that can be set. + Maximum *int64 `json:"maximum,omitempty"` + // DefaultCapacity - READ-ONLY; The default capacity. + DefaultCapacity *int64 `json:"defaultCapacity,omitempty"` + // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone' + ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity. +func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetsPerformMaintenanceFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result. +func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsPowerOffFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result. +func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsRedeployFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result. +func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsReimageAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result. +func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsReimageFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result. +func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsRestartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result. +func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.Result. +func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result. +func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile. +type VirtualMachineScaleSetStorageProfile struct { + // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. + ImageReference *ImageReference `json:"imageReference,omitempty"` + // OsDisk - Specifies information about the operating system disk used by the virtual machines in the scale set.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"` + // DataDisks - Specifies the parameters that are used to add data disks to the virtual machines in the scale set.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` +} + +// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result. +func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmss.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent { + vmss, err = client.UpdateResponder(vmss.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetsUpdateInstancesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result. +func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set. +type VirtualMachineScaleSetUpdate struct { + // Sku - The virtual machine scale set sku. + Sku *Sku `json:"sku,omitempty"` + // Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images. + Plan *Plan `json:"plan,omitempty"` + *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"` + // Identity - The identity of the virtual machine scale set, if configured. + Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate. +func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssu.Sku != nil { + objectMap["sku"] = vmssu.Sku + } + if vmssu.Plan != nil { + objectMap["plan"] = vmssu.Plan + } + if vmssu.VirtualMachineScaleSetUpdateProperties != nil { + objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties + } + if vmssu.Identity != nil { + objectMap["identity"] = vmssu.Identity + } + if vmssu.Tags != nil { + objectMap["tags"] = vmssu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct. +func (vmssu *VirtualMachineScaleSetUpdate) 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 "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + vmssu.Sku = &sku + } + case "plan": + if v != nil { + var plan Plan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + vmssu.Plan = &plan + } + case "properties": + if v != nil { + var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties) + if err != nil { + return err + } + vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties + } + case "identity": + if v != nil { + var identity VirtualMachineScaleSetIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + vmssu.Identity = &identity + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmssu.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP +// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the +// new subnet are in the same virtual network +type VirtualMachineScaleSetUpdateIPConfiguration struct { + // Name - The IP configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration. +func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssuic.Name != nil { + objectMap["name"] = vmssuic.Name + } + if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil { + objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties + } + if vmssuic.ID != nil { + objectMap["id"] = vmssuic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct. +func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) 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 + } + vmssuic.Name = &name + } + case "properties": + if v != nil { + var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties) + if err != nil { + return err + } + vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssuic.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network +// profile's IP configuration properties. +type VirtualMachineScaleSetUpdateIPConfigurationProperties struct { + // Subnet - The subnet. + Subnet *APIEntityReference `json:"subnet,omitempty"` + // Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. + Primary *bool `json:"primary,omitempty"` + // PublicIPAddressConfiguration - The publicIPAddressConfiguration. + PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` + // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // ApplicationGatewayBackendAddressPools - The application gateway backend address pools. + ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` + // ApplicationSecurityGroups - Specifies an array of references to application security group. + ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` + // LoadBalancerBackendAddressPools - The load balancer backend address pools. + LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` + // LoadBalancerInboundNatPools - The load balancer inbound nat pools. + LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` +} + +// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's +// network configurations. +type VirtualMachineScaleSetUpdateNetworkConfiguration struct { + // Name - The network configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration. +func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssunc.Name != nil { + objectMap["name"] = vmssunc.Name + } + if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil { + objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties + } + if vmssunc.ID != nil { + objectMap["id"] = vmssunc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct. +func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) 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 + } + vmssunc.Name = &name + } + case "properties": + if v != nil { + var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties) + if err != nil { + return err + } + vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssunc.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set +// updatable network profile's IP configuration.Use this object for updating network profile's IP +// Configuration. +type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct { + // Primary - Whether this is a primary NIC on a virtual machine. + Primary *bool `json:"primary,omitempty"` + // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + // EnableFpga - Specifies whether the network interface is FPGA networking-enabled. + EnableFpga *bool `json:"enableFpga,omitempty"` + // NetworkSecurityGroup - The network security group. + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + // DNSSettings - The dns settings to be applied on the network interfaces. + DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` + // IPConfigurations - The virtual machine scale set IP Configuration. + IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"` + // EnableIPForwarding - Whether IP forwarding enabled on this NIC. + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` +} + +// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile. +type VirtualMachineScaleSetUpdateNetworkProfile struct { + // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` + // NetworkInterfaceConfigurations - The list of network configurations. + NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` + // NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'. Possible values include: 'NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne' + NetworkAPIVersion NetworkAPIVersion `json:"networkApiVersion,omitempty"` +} + +// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update +// Object. This should be used for Updating VMSS OS Disk. +type VirtualMachineScaleSetUpdateOSDisk struct { + // Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` + // DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // Image - The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. + Image *VirtualHardDisk `json:"image,omitempty"` + // VhdContainers - The list of virtual hard disk container uris. + VhdContainers *[]string `json:"vhdContainers,omitempty"` + // ManagedDisk - The managed disk parameters. + ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` +} + +// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile. +type VirtualMachineScaleSetUpdateOSProfile struct { + // CustomData - A base-64 encoded string of custom data. + CustomData *string `json:"customData,omitempty"` + // WindowsConfiguration - The Windows Configuration of the OS profile. + WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` + // LinuxConfiguration - The Linux Configuration of the OS profile. + LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` + // Secrets - The List of certificates for addition to the VM. + Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` +} + +// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set. +type VirtualMachineScaleSetUpdateProperties struct { + // UpgradePolicy - The upgrade policy. + UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` + // AutomaticRepairsPolicy - Policy for automatic repairs. + AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` + // VirtualMachineProfile - The virtual machine profile. + VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"` + // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned. + Overprovision *bool `json:"overprovision,omitempty"` + // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. + DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` + // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. + SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` + // ScaleInPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. + 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 +// Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct { + // Name - The publicIP address configuration name. + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration. +func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssupiac.Name != nil { + objectMap["name"] = vmssupiac.Name + } + if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil { + objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct. +func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) 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 + } + vmssupiac.Name = &name + } + case "properties": + if v != nil { + var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties) + if err != nil { + return err + } + vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties + } + } + } + + return nil +} + +// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale +// set IP Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct { + // IdleTimeoutInMinutes - The idle timeout of the public IP address. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // DNSSettings - The dns settings to be applied on the publicIP addresses . + DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` + // DeleteOption - Specify what happens to the public IP when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` +} + +// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile. +type VirtualMachineScaleSetUpdateStorageProfile struct { + // ImageReference - The image reference. + ImageReference *ImageReference `json:"imageReference,omitempty"` + // OsDisk - The OS disk. + OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"` + // DataDisks - The data disks. + DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` +} + +// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile. +type VirtualMachineScaleSetUpdateVMProfile struct { + // OsProfile - The virtual machine scale set OS profile. + OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"` + // StorageProfile - The virtual machine scale set storage profile. + StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"` + // NetworkProfile - The virtual machine scale set network profile. + NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"` + // SecurityProfile - The virtual machine scale set Security profile + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // DiagnosticsProfile - The virtual machine scale set diagnostics profile. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + // ExtensionProfile - The virtual machine scale set extension profile. + 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 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"` + // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 + UserData *string `json:"userData,omitempty"` +} + +// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine. +type VirtualMachineScaleSetVM struct { + autorest.Response `json:"-"` + // InstanceID - READ-ONLY; The virtual machine instance ID. + InstanceID *string `json:"instanceId,omitempty"` + // Sku - READ-ONLY; The virtual machine SKU. + Sku *Sku `json:"sku,omitempty"` + *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"` + // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + Plan *Plan `json:"plan,omitempty"` + // Resources - READ-ONLY; The virtual machine child extension resources. + Resources *[]VirtualMachineExtension `json:"resources,omitempty"` + // Zones - READ-ONLY; The virtual machine zones. + Zones *[]string `json:"zones,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 VirtualMachineScaleSetVM. +func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssv.VirtualMachineScaleSetVMProperties != nil { + objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties + } + if vmssv.Plan != nil { + objectMap["plan"] = vmssv.Plan + } + if vmssv.Location != nil { + objectMap["location"] = vmssv.Location + } + if vmssv.Tags != nil { + objectMap["tags"] = vmssv.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct. +func (vmssv *VirtualMachineScaleSetVM) 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 "instanceId": + if v != nil { + var instanceID string + err = json.Unmarshal(*v, &instanceID) + if err != nil { + return err + } + vmssv.InstanceID = &instanceID + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + vmssv.Sku = &sku + } + case "properties": + if v != nil { + var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties) + if err != nil { + return err + } + vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties + } + case "plan": + if v != nil { + var plan Plan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + vmssv.Plan = &plan + } + case "resources": + if v != nil { + var resources []VirtualMachineExtension + err = json.Unmarshal(*v, &resources) + if err != nil { + return err + } + vmssv.Resources = &resources + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + vmssv.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssv.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmssv.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmssv.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vmssv.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmssv.Tags = tags + } + } + } + + return nil +} + +// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension. +type VirtualMachineScaleSetVMExtension struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; The name of the extension. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *VirtualMachineExtensionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension. +func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssve.VirtualMachineExtensionProperties != nil { + objectMap["properties"] = vmssve.VirtualMachineExtensionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct. +func (vmssve *VirtualMachineScaleSetVMExtension) 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 + } + vmssve.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmssve.Type = &typeVar + } + case "properties": + if v != nil { + var virtualMachineExtensionProperties VirtualMachineExtensionProperties + err = json.Unmarshal(*v, &virtualMachineExtensionProperties) + if err != nil { + return err + } + vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssve.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result. +func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmssve.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent { + vmssve, err = client.CreateOrUpdateResponder(vmssve.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetVMExtensionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result. +func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response +type VirtualMachineScaleSetVMExtensionsListResult struct { + autorest.Response `json:"-"` + // Value - The list of VMSS VM extensions + Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"` +} + +// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine +// scale set. +type VirtualMachineScaleSetVMExtensionsSummary struct { + // Name - READ-ONLY; The extension name. + Name *string `json:"name,omitempty"` + // StatusesSummary - READ-ONLY; The extensions information. + StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary. +func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetVMExtensionsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result. +func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmssve.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent { + vmssve, err = client.UpdateResponder(vmssve.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension. +type VirtualMachineScaleSetVMExtensionUpdate struct { + // Name - READ-ONLY; The name of the extension. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate. +func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssveu.VirtualMachineExtensionUpdateProperties != nil { + objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct. +func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) 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 + } + vmssveu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmssveu.Type = &typeVar + } + case "properties": + if v != nil { + var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties + err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties) + if err != nil { + return err + } + vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssveu.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale +// set. +type VirtualMachineScaleSetVMInstanceIDs struct { + // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + InstanceIds *[]string `json:"instanceIds,omitempty"` +} + +// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM +// scale set. +type VirtualMachineScaleSetVMInstanceRequiredIDs struct { + // InstanceIds - The virtual machine scale set instance ids. + InstanceIds *[]string `json:"instanceIds,omitempty"` +} + +// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM. +type VirtualMachineScaleSetVMInstanceView struct { + autorest.Response `json:"-"` + // PlatformUpdateDomain - The Update Domain count. + PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` + // PlatformFaultDomain - The Fault Domain count. + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // RdpThumbPrint - The Remote desktop certificate thumbprint. + RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` + // VMAgent - The VM Agent running on the virtual machine. + VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` + // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine. + MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` + // Disks - The disks information. + Disks *[]DiskInstanceView `json:"disks,omitempty"` + // Extensions - The extensions information. + Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` + // VMHealth - READ-ONLY; The health status for the VM. + VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"` + // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    You can easily view the output of your console log.

    Azure also enables you to see a screenshot of the VM from the hypervisor. + BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

    Minimum api-version: 2020-06-01. + AssignedHost *string `json:"assignedHost,omitempty"` + // PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. + PlacementGroupID *string `json:"placementGroupId,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView. +func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssviv.PlatformUpdateDomain != nil { + objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain + } + if vmssviv.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain + } + if vmssviv.RdpThumbPrint != nil { + objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint + } + if vmssviv.VMAgent != nil { + objectMap["vmAgent"] = vmssviv.VMAgent + } + if vmssviv.MaintenanceRedeployStatus != nil { + objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus + } + if vmssviv.Disks != nil { + objectMap["disks"] = vmssviv.Disks + } + if vmssviv.Extensions != nil { + objectMap["extensions"] = vmssviv.Extensions + } + if vmssviv.BootDiagnostics != nil { + objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics + } + if vmssviv.Statuses != nil { + objectMap["statuses"] = vmssviv.Statuses + } + if vmssviv.PlacementGroupID != nil { + objectMap["placementGroupId"] = vmssviv.PlacementGroupID + } + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response. +type VirtualMachineScaleSetVMListResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machine scale sets VMs. + Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS VMs + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of +// VirtualMachineScaleSetVM values. +type VirtualMachineScaleSetVMListResultIterator struct { + i int + page VirtualMachineScaleSetVMListResultPage +} + +// 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 *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.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 *VirtualMachineScaleSetVMListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineScaleSetVMListResultIterator) 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 VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult { + 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 VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM { + if !iter.page.NotDone() { + return VirtualMachineScaleSetVM{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type. +func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator { + return VirtualMachineScaleSetVMListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool { + return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool { + return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0 +} + +// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmssvlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmssvlr.NextLink))) +} + +// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values. +type VirtualMachineScaleSetVMListResultPage struct { + fn func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error) + vmssvlr VirtualMachineScaleSetVMListResult +} + +// 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 *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmssvlr) + if err != nil { + return err + } + page.vmssvlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualMachineScaleSetVMListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool { + return !page.vmssvlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult { + return page.vmssvlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM { + if page.vmssvlr.IsEmpty() { + return nil + } + return *page.vmssvlr.Value +} + +// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type. +func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage { + return VirtualMachineScaleSetVMListResultPage{ + fn: getNextPage, + vmssvlr: cur, + } +} + +// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network +// profile. +type VirtualMachineScaleSetVMNetworkProfileConfiguration struct { + // NetworkInterfaceConfigurations - The list of network configurations. + NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` +} + +// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile. +type VirtualMachineScaleSetVMProfile struct { + // OsProfile - Specifies the operating system settings for the virtual machines in the scale set. + OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"` + // StorageProfile - Specifies the storage settings for the virtual machine disks. + StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"` + // NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set. + NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"` + // SecurityProfile - Specifies the Security related profile settings for the virtual machines in the scale set. + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // DiagnosticsProfile - Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + // ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set. + ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` + // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    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: 'VirtualMachinePriorityTypesRegular', 'VirtualMachinePriorityTypesLow', 'VirtualMachinePriorityTypesSpot' + Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

    For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'VirtualMachineEvictionPolicyTypesDeallocate', 'VirtualMachineEvictionPolicyTypesDelete' + EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` + // 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"` + // UserData - UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 + UserData *string `json:"userData,omitempty"` + // CapacityReservation - Specifies the capacity reservation related details of a scale set.

    Minimum api-version: 2021-04-01. + CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"` + // ApplicationProfile - Specifies the gallery applications that should be made available to the VM/VMSS + ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"` +} + +// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual +// machine. +type VirtualMachineScaleSetVMProperties struct { + // LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine. + LatestModelApplied *bool `json:"latestModelApplied,omitempty"` + // VMID - READ-ONLY; Azure VM unique ID. + VMID *string `json:"vmId,omitempty"` + // InstanceView - READ-ONLY; The virtual machine instance view. + InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"` + // HardwareProfile - Specifies the hardware settings for the virtual machine. + HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` + // StorageProfile - Specifies the storage settings for the virtual machine disks. + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` + // OsProfile - Specifies the operating system settings for the virtual machine. + OsProfile *OSProfile `json:"osProfile,omitempty"` + // SecurityProfile - Specifies the Security related profile settings for the virtual machine. + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // NetworkProfile - Specifies the network interfaces of the virtual machine. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + // NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine. + NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"` + // DiagnosticsProfile - Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 + LicenseType *string `json:"licenseType,omitempty"` + // ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"` + // ProtectionPolicy - Specifies the protection policy of the virtual machine. + ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"` + // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 + UserData *string `json:"userData,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties. +func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssvp.HardwareProfile != nil { + objectMap["hardwareProfile"] = vmssvp.HardwareProfile + } + if vmssvp.StorageProfile != nil { + objectMap["storageProfile"] = vmssvp.StorageProfile + } + if vmssvp.AdditionalCapabilities != nil { + objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities + } + if vmssvp.OsProfile != nil { + objectMap["osProfile"] = vmssvp.OsProfile + } + if vmssvp.SecurityProfile != nil { + objectMap["securityProfile"] = vmssvp.SecurityProfile + } + if vmssvp.NetworkProfile != nil { + objectMap["networkProfile"] = vmssvp.NetworkProfile + } + if vmssvp.NetworkProfileConfiguration != nil { + objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration + } + if vmssvp.DiagnosticsProfile != nil { + objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile + } + if vmssvp.AvailabilitySet != nil { + objectMap["availabilitySet"] = vmssvp.AvailabilitySet + } + if vmssvp.LicenseType != nil { + objectMap["licenseType"] = vmssvp.LicenseType + } + if vmssvp.ProtectionPolicy != nil { + objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy + } + if vmssvp.UserData != nil { + objectMap["userData"] = vmssvp.UserData + } + return json.Marshal(objectMap) +} + +// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM. +type VirtualMachineScaleSetVMProtectionPolicy struct { + // ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation. + ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"` + // ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM. + ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"` +} + +// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters. +type VirtualMachineScaleSetVMReimageParameters struct { + // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + TempDisk *bool `json:"tempDisk,omitempty"` +} + +// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture.Result. +func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmrc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMRunCommandsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMRunCommandsDeleteFuture.Result. +func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMRunCommandsUpdateFuture.Result. +func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmrc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.UpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsDeallocateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result. +func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result. +func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result. +func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsPowerOffFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result. +func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsRedeployFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result. +func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsReimageAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result. +func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsReimageFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result. +func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsRestartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result. +func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsRunCommandFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result. +func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rcr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent { + rcr, err = client.RunCommandResponder(rcr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result. +func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineScaleSetVMsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result. +func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmssv.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent { + vmssv, err = client.UpdateResponder(vmssv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesCaptureFuture.Result. +func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmcr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent { + vmcr, err = client.CaptureResponder(vmcr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesConvertToManagedDisksFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result. +func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (VirtualMachine, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result. +func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + VM.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent { + VM, err = client.CreateOrUpdateResponder(VM.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesDeallocateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesDeallocateFuture.Result. +func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesDeleteFuture.Result. +func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesInstallPatchesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesInstallPatchesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (VirtualMachineInstallPatchesResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesInstallPatchesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesInstallPatchesFuture.Result. +func (future *VirtualMachinesInstallPatchesFuture) result(client VirtualMachinesClient) (vmipr VirtualMachineInstallPatchesResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesInstallPatchesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vmipr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesInstallPatchesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmipr.Response.Response, err = future.GetResult(sender); err == nil && vmipr.Response.Response.StatusCode != http.StatusNoContent { + vmipr, err = client.InstallPatchesResponder(vmipr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesInstallPatchesFuture", "Result", vmipr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineSize describes the properties of a VM size. +type VirtualMachineSize struct { + // Name - The name of the virtual machine size. + Name *string `json:"name,omitempty"` + // NumberOfCores - The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list + NumberOfCores *int32 `json:"numberOfCores,omitempty"` + // OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size. + OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"` + // ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size. + ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"` + // MemoryInMB - The amount of memory, in MB, supported by the virtual machine size. + MemoryInMB *int32 `json:"memoryInMB,omitempty"` + // MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size. + MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` +} + +// VirtualMachineSizeListResult the List Virtual Machine operation response. +type VirtualMachineSizeListResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machine sizes. + Value *[]VirtualMachineSize `json:"value,omitempty"` +} + +// VirtualMachineSoftwarePatchProperties describes the properties of a Virtual Machine software patch. +type VirtualMachineSoftwarePatchProperties struct { + // PatchID - READ-ONLY; A unique identifier for the patch. + PatchID *string `json:"patchId,omitempty"` + // Name - READ-ONLY; The friendly name of the patch. + Name *string `json:"name,omitempty"` + // Version - READ-ONLY; The version number of the patch. This property applies only to Linux patches. + Version *string `json:"version,omitempty"` + // KbID - READ-ONLY; The KBID of the patch. Only applies to Windows patches. + KbID *string `json:"kbId,omitempty"` + // Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher. + Classifications *[]string `json:"classifications,omitempty"` + // RebootBehavior - READ-ONLY; Describes the reboot requirements of the patch. Possible values include: 'VMGuestPatchRebootBehaviorUnknown', 'VMGuestPatchRebootBehaviorNeverReboots', 'VMGuestPatchRebootBehaviorAlwaysRequiresReboot', 'VMGuestPatchRebootBehaviorCanRequestReboot' + RebootBehavior VMGuestPatchRebootBehavior `json:"rebootBehavior,omitempty"` + // ActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + ActivityID *string `json:"activityId,omitempty"` + // PublishedDate - READ-ONLY; The UTC timestamp when the repository published this patch. + PublishedDate *date.Time `json:"publishedDate,omitempty"` + // LastModifiedDateTime - READ-ONLY; The UTC timestamp of the last update to this patch record. + LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"` + // AssessmentState - READ-ONLY; Describes the availability of a given patch. Possible values include: 'PatchAssessmentStateUnknown', 'PatchAssessmentStateAvailable' + AssessmentState PatchAssessmentState `json:"assessmentState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineSoftwarePatchProperties. +func (vmspp VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesPerformMaintenanceFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result. +func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesPowerOffFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesPowerOffFuture.Result. +func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesReapplyFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesReapplyFuture.Result. +func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesRedeployFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesRedeployFuture.Result. +func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesReimageFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesReimageFuture.Result. +func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesRestartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesRestartFuture.Result. +func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachinesRunCommandFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (RunCommandResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesRunCommandFuture.Result. +func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rcr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent { + rcr, err = client.RunCommandResponder(rcr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesStartFuture.Result. +func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view +// status summary. +type VirtualMachineStatusCodeCount struct { + // Code - READ-ONLY; The instance view status code. + Code *string `json:"code,omitempty"` + // Count - READ-ONLY; The number of instances having a particular status code. + Count *int32 `json:"count,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount. +func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualMachinesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualMachinesClient) (VirtualMachine, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualMachinesUpdateFuture.Result. +func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + VM.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent { + VM, err = client.UpdateResponder(VM.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineUpdate describes a Virtual Machine Update. +type VirtualMachineUpdate struct { + // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + Plan *Plan `json:"plan,omitempty"` + *VirtualMachineProperties `json:"properties,omitempty"` + // Identity - The identity of the virtual machine, if configured. + Identity *VirtualMachineIdentity `json:"identity,omitempty"` + // Zones - The virtual machine zones. + Zones *[]string `json:"zones,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineUpdate. +func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmu.Plan != nil { + objectMap["plan"] = vmu.Plan + } + if vmu.VirtualMachineProperties != nil { + objectMap["properties"] = vmu.VirtualMachineProperties + } + if vmu.Identity != nil { + objectMap["identity"] = vmu.Identity + } + if vmu.Zones != nil { + objectMap["zones"] = vmu.Zones + } + if vmu.Tags != nil { + objectMap["tags"] = vmu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct. +func (vmu *VirtualMachineUpdate) 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 "plan": + if v != nil { + var plan Plan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + vmu.Plan = &plan + } + case "properties": + if v != nil { + var virtualMachineProperties VirtualMachineProperties + err = json.Unmarshal(*v, &virtualMachineProperties) + if err != nil { + return err + } + vmu.VirtualMachineProperties = &virtualMachineProperties + } + case "identity": + if v != nil { + var identity VirtualMachineIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + vmu.Identity = &identity + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + vmu.Zones = &zones + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmu.Tags = tags + } + } + } + + return nil +} + +// VMGalleryApplication specifies the required information to reference a compute gallery application +// version +type VMGalleryApplication struct { + // Tags - Optional, Specifies a passthrough value for more generic context. + Tags *string `json:"tags,omitempty"` + // Order - Optional, Specifies the order in which the packages have to be installed + Order *int32 `json:"order,omitempty"` + // PackageReferenceID - Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} + PackageReferenceID *string `json:"packageReferenceId,omitempty"` + // ConfigurationReference - Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided + ConfigurationReference *string `json:"configurationReference,omitempty"` +} + +// VMScaleSetConvertToSinglePlacementGroupInput ... +type VMScaleSetConvertToSinglePlacementGroupInput struct { + // ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. + ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"` +} + +// VMSizeProperties specifies VM Size Property settings on the virtual machine. +type VMSizeProperties struct { + // VCPUsAvailable - Specifies the number of vCPUs available for the VM.

    When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) . + VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty"` + // VCPUsPerCore - Specifies the vCPU to physical core ratio.

    When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)

    Setting this property to 1 also means that hyper-threading is disabled. + VCPUsPerCore *int32 `json:"vCPUsPerCore,omitempty"` +} + +// WindowsConfiguration specifies Windows operating system settings on the virtual machine. +type WindowsConfiguration struct { + // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + // EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.

    For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. + EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` + // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".

    Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + TimeZone *string `json:"timeZone,omitempty"` + // AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. + AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"` + // PatchSettings - [Preview Feature] Specifies settings related to VM Guest Patching on Windows. + PatchSettings *PatchSettings `json:"patchSettings,omitempty"` + // WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. + WinRM *WinRMConfiguration `json:"winRM,omitempty"` +} + +// WindowsParameters input for InstallPatches on a Windows VM, as directly received by the API +type WindowsParameters struct { + // ClassificationsToInclude - The update classifications to select when installing patches for Windows. + ClassificationsToInclude *[]VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"` + // KbNumbersToInclude - Kbs to include in the patch operation + KbNumbersToInclude *[]string `json:"kbNumbersToInclude,omitempty"` + // KbNumbersToExclude - Kbs to exclude in the patch operation + KbNumbersToExclude *[]string `json:"kbNumbersToExclude,omitempty"` + // ExcludeKbsRequiringReboot - Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. + ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"` + // MaxPatchPublishDate - This is used to install patches that were published on or before this given max published date. + MaxPatchPublishDate *date.Time `json:"maxPatchPublishDate,omitempty"` +} + +// WinRMConfiguration describes Windows Remote Management configuration of the VM +type WinRMConfiguration struct { + // Listeners - The list of Windows Remote Management listeners + Listeners *[]WinRMListener `json:"listeners,omitempty"` +} + +// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener +type WinRMListener struct { + // Protocol - Specifies the protocol of WinRM listener.

    Possible values are:
    **http**

    **https**. Possible values include: 'ProtocolTypesHTTP', 'ProtocolTypesHTTPS' + Protocol ProtocolTypes `json:"protocol,omitempty"` + // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + CertificateURL *string `json:"certificateUrl,omitempty"` +} diff --git a/services/compute/mgmt/2021-07-01/compute/operations.go b/services/compute/mgmt/2021-07-01/compute/operations.go new file mode 100644 index 000000000000..b76ee91bfdf0 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/operations.go @@ -0,0 +1,98 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 compute Client +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 using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of compute operations. +func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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, "compute.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Compute/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) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go new file mode 100644 index 000000000000..8144933b91db --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go @@ -0,0 +1,575 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ProximityPlacementGroupsClient is the compute Client +type ProximityPlacementGroupsClient struct { + BaseClient +} + +// NewProximityPlacementGroupsClient creates an instance of the ProximityPlacementGroupsClient client. +func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacementGroupsClient { + return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient { + return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a proximity placement group. +// Parameters: +// resourceGroupName - the name of the resource group. +// proximityPlacementGroupName - the name of the proximity placement group. +// parameters - parameters supplied to the Create Proximity Placement Group operation. +func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (result ProximityPlacementGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.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, proximityPlacementGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", 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 ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProximityPlacementGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a proximity placement group. +// Parameters: +// resourceGroupName - the name of the resource group. +// proximityPlacementGroupName - the name of the proximity placement group. +func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, proximityPlacementGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", 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 ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about a proximity placement group . +// Parameters: +// resourceGroupName - the name of the resource group. +// proximityPlacementGroupName - the name of the proximity placement group. +// 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() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +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), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(includeColocationStatus) > 0 { + queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", 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 ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProximityPlacementGroupsClient) GetResponder(resp *http.Response) (result ProximityPlacementGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all proximity placement groups in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ppglr.Response.Response != nil { + sc = result.ppglr.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, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ppglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ppglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ProximityPlacementGroupsClient) 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 = "2021-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.Compute/proximityPlacementGroups", 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 ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ProximityPlacementGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 ProximityPlacementGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) { + req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "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, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProximityPlacementGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.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 lists all proximity placement groups in a subscription. +func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Context) (result ProximityPlacementGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription") + defer func() { + sc := -1 + if result.ppglr.Response.Response != nil { + sc = result.ppglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.ppglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.ppglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", 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 ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client ProximityPlacementGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 ProximityPlacementGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) { + req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "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, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProximityPlacementGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result ProximityPlacementGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.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 +} + +// Update update a proximity placement group. +// Parameters: +// resourceGroupName - the name of the resource group. +// proximityPlacementGroupName - the name of the proximity placement group. +// parameters - parameters supplied to the Update Proximity Placement Group operation. +func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (result ProximityPlacementGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.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, proximityPlacementGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/proximityPlacementGroups/{proximityPlacementGroupName}", 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 ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ProximityPlacementGroupsClient) UpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/resourceskus.go b/services/compute/mgmt/2021-07-01/compute/resourceskus.go new file mode 100644 index 000000000000..35266973811b --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/resourceskus.go @@ -0,0 +1,153 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ResourceSkusClient is the compute Client +type ResourceSkusClient struct { + BaseClient +} + +// NewResourceSkusClient creates an instance of the ResourceSkusClient client. +func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { + return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient { + return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets the list of Microsoft.Compute SKUs available for your Subscription. +// Parameters: +// filter - the filter to apply on the operation. Only **location** filter is supported currently. +// includeExtendedLocations - to Include Extended Locations information or not in the response. +func (client ResourceSkusClient) List(ctx context.Context, filter string, includeExtendedLocations string) (result ResourceSkusResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List") + defer func() { + sc := -1 + if result.rsr.Response.Response != nil { + sc = result.rsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, filter, includeExtendedLocations) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request") + return + } + + result.rsr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request") + return + } + if result.rsr.hasNextLink() && result.rsr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string, includeExtendedLocations string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(includeExtendedLocations) > 0 { + queryParameters["includeExtendedLocations"] = autorest.Encode("query", includeExtendedLocations) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", 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 ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) { + err = autorest.Respond( + resp, + 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 ResourceSkusClient) listNextResults(ctx context.Context, lastResults ResourceSkusResult) (result ResourceSkusResult, err error) { + req, err := lastResults.resourceSkusResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "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, "compute.ResourceSkusClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string, includeExtendedLocations string) (result ResourceSkusResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.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, includeExtendedLocations) + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/restorepointcollections.go b/services/compute/mgmt/2021-07-01/compute/restorepointcollections.go new file mode 100644 index 000000000000..3f07130c51c0 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/restorepointcollections.go @@ -0,0 +1,581 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RestorePointCollectionsClient is the compute Client +type RestorePointCollectionsClient struct { + BaseClient +} + +// NewRestorePointCollectionsClient creates an instance of the RestorePointCollectionsClient client. +func NewRestorePointCollectionsClient(subscriptionID string) RestorePointCollectionsClient { + return NewRestorePointCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestorePointCollectionsClientWithBaseURI creates an instance of the RestorePointCollectionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewRestorePointCollectionsClientWithBaseURI(baseURI string, subscriptionID string) RestorePointCollectionsClient { + return RestorePointCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the restore point collection. Please refer to +// https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection. +// parameters - parameters supplied to the Create or Update restore point collection operation. +func (client RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollection) (result RestorePointCollection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.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, restorePointCollectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RestorePointCollectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/restorePointCollections/{restorePointCollectionName}", 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 RestorePointCollectionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RestorePointCollectionsClient) CreateOrUpdateResponder(resp *http.Response) (result RestorePointCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the restore point collection. This operation will also delete all the contained +// restore points. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the Restore Point Collection. +func (client RestorePointCollectionsClient) Delete(ctx context.Context, resourceGroupName string, restorePointCollectionName string) (result RestorePointCollectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, restorePointCollectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RestorePointCollectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/restorePointCollections/{restorePointCollectionName}", 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 RestorePointCollectionsClient) DeleteSender(req *http.Request) (future RestorePointCollectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RestorePointCollectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the restore point collection. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection. +// expand - the expand expression to apply on the operation. If expand=restorePoints, server will return all +// contained restore points in the restorePointCollection. +func (client RestorePointCollectionsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, expand RestorePointCollectionExpandOptions) (result RestorePointCollection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.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, restorePointCollectionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RestorePointCollectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, expand RestorePointCollectionExpandOptions) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/restorePointCollections/{restorePointCollectionName}", 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 RestorePointCollectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RestorePointCollectionsClient) GetResponder(resp *http.Response) (result RestorePointCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of restore point collections in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client RestorePointCollectionsClient) List(ctx context.Context, resourceGroupName string) (result RestorePointCollectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.List") + defer func() { + sc := -1 + if result.rpclr.Response.Response != nil { + sc = result.rpclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rpclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "List", resp, "Failure sending request") + return + } + + result.rpclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "List", resp, "Failure responding to request") + return + } + if result.rpclr.hasNextLink() && result.rpclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client RestorePointCollectionsClient) ListPreparer(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 = "2021-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.Compute/restorePointCollections", 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 RestorePointCollectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RestorePointCollectionsClient) ListResponder(resp *http.Response) (result RestorePointCollectionListResult, err error) { + err = autorest.Respond( + resp, + 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 RestorePointCollectionsClient) listNextResults(ctx context.Context, lastResults RestorePointCollectionListResult) (result RestorePointCollectionListResult, err error) { + req, err := lastResults.restorePointCollectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "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, "compute.RestorePointCollectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RestorePointCollectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result RestorePointCollectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.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) + return +} + +// ListAll gets the list of restore point collections in the subscription. Use nextLink property in the response to get +// the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point +// collections. +func (client RestorePointCollectionsClient) ListAll(ctx context.Context) (result RestorePointCollectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.ListAll") + defer func() { + sc := -1 + if result.rpclr.Response.Response != nil { + sc = result.rpclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.rpclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "ListAll", resp, "Failure sending request") + return + } + + result.rpclr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.rpclr.hasNextLink() && result.rpclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client RestorePointCollectionsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client RestorePointCollectionsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client RestorePointCollectionsClient) ListAllResponder(resp *http.Response) (result RestorePointCollectionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client RestorePointCollectionsClient) listAllNextResults(ctx context.Context, lastResults RestorePointCollectionListResult) (result RestorePointCollectionListResult, err error) { + req, err := lastResults.restorePointCollectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client RestorePointCollectionsClient) ListAllComplete(ctx context.Context) (result RestorePointCollectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.ListAll") + 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.ListAll(ctx) + return +} + +// Update the operation to update the restore point collection. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection. +// parameters - parameters supplied to the Update restore point collection operation. +func (client RestorePointCollectionsClient) Update(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollectionUpdate) (result RestorePointCollection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.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, restorePointCollectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client RestorePointCollectionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollectionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/restorePointCollections/{restorePointCollectionName}", 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 RestorePointCollectionsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client RestorePointCollectionsClient) UpdateResponder(resp *http.Response) (result RestorePointCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/restorepoints.go b/services/compute/mgmt/2021-07-01/compute/restorepoints.go new file mode 100644 index 000000000000..72a92df65f23 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/restorepoints.go @@ -0,0 +1,295 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RestorePointsClient is the compute Client +type RestorePointsClient struct { + BaseClient +} + +// NewRestorePointsClient creates an instance of the RestorePointsClient client. +func NewRestorePointsClient(subscriptionID string) RestorePointsClient { + return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRestorePointsClientWithBaseURI(baseURI string, subscriptionID string) RestorePointsClient { + return RestorePointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create the operation to create the restore point. Updating properties of an existing restore point is not allowed +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection. +// restorePointName - the name of the restore point. +// parameters - parameters supplied to the Create restore point operation. +func (client RestorePointsClient) Create(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint) (result RestorePointsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.RestorePointProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("compute.RestorePointsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, restorePointCollectionName, restorePointName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client RestorePointsClient) CreatePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "restorePointName": autorest.Encode("path", restorePointName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", pathParameters), + autorest.WithJSON(parameters), + 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 RestorePointsClient) CreateSender(req *http.Request) (future RestorePointsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client RestorePointsClient) CreateResponder(resp *http.Response) (result RestorePoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the restore point. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the Restore Point Collection. +// restorePointName - the name of the restore point. +func (client RestorePointsClient) Delete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (result RestorePointsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, restorePointCollectionName, restorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RestorePointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "restorePointName": autorest.Encode("path", restorePointName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", 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 RestorePointsClient) DeleteSender(req *http.Request) (future RestorePointsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RestorePointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the restore point. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection. +// restorePointName - the name of the restore point. +func (client RestorePointsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (result RestorePoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.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, restorePointCollectionName, restorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RestorePointsClient) GetPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "restorePointName": autorest.Encode("path", restorePointName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", 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 RestorePointsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RestorePointsClient) GetResponder(resp *http.Response) (result RestorePoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/sharedgalleries.go b/services/compute/mgmt/2021-07-01/compute/sharedgalleries.go new file mode 100644 index 000000000000..261ed0770ac0 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/sharedgalleries.go @@ -0,0 +1,227 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SharedGalleriesClient is the compute Client +type SharedGalleriesClient struct { + BaseClient +} + +// NewSharedGalleriesClient creates an instance of the SharedGalleriesClient client. +func NewSharedGalleriesClient(subscriptionID string) SharedGalleriesClient { + return NewSharedGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSharedGalleriesClientWithBaseURI creates an instance of the SharedGalleriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSharedGalleriesClientWithBaseURI(baseURI string, subscriptionID string) SharedGalleriesClient { + return SharedGalleriesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a shared gallery by subscription id or tenant id. +// Parameters: +// location - resource location. +// galleryUniqueName - the unique name of the Shared Gallery. +func (client SharedGalleriesClient) Get(ctx context.Context, location string, galleryUniqueName string) (result SharedGallery, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleriesClient.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, location, galleryUniqueName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SharedGalleriesClient) GetPreparer(ctx context.Context, location string, galleryUniqueName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryUniqueName": autorest.Encode("path", galleryUniqueName), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}", 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 SharedGalleriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SharedGalleriesClient) GetResponder(resp *http.Response) (result SharedGallery, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list shared galleries by subscription id or tenant id. +// Parameters: +// location - resource location. +// sharedTo - the query parameter to decide what shared galleries to fetch when doing listing operations. +func (client SharedGalleriesClient) List(ctx context.Context, location string, sharedTo SharedToValues) (result SharedGalleryListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleriesClient.List") + defer func() { + sc := -1 + if result.sgl.Response.Response != nil { + sc = result.sgl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location, sharedTo) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.sgl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "List", resp, "Failure sending request") + return + } + + result.sgl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "List", resp, "Failure responding to request") + return + } + if result.sgl.hasNextLink() && result.sgl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SharedGalleriesClient) ListPreparer(ctx context.Context, location string, sharedTo SharedToValues) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(sharedTo)) > 0 { + queryParameters["sharedTo"] = autorest.Encode("query", sharedTo) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries", 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 SharedGalleriesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SharedGalleriesClient) ListResponder(resp *http.Response) (result SharedGalleryList, err error) { + err = autorest.Respond( + resp, + 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 SharedGalleriesClient) listNextResults(ctx context.Context, lastResults SharedGalleryList) (result SharedGalleryList, err error) { + req, err := lastResults.sharedGalleryListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "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, "compute.SharedGalleriesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SharedGalleriesClient) ListComplete(ctx context.Context, location string, sharedTo SharedToValues) (result SharedGalleryListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleriesClient.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, location, sharedTo) + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go b/services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go new file mode 100644 index 000000000000..5378b4f89811 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go @@ -0,0 +1,233 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SharedGalleryImagesClient is the compute Client +type SharedGalleryImagesClient struct { + BaseClient +} + +// NewSharedGalleryImagesClient creates an instance of the SharedGalleryImagesClient client. +func NewSharedGalleryImagesClient(subscriptionID string) SharedGalleryImagesClient { + return NewSharedGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSharedGalleryImagesClientWithBaseURI creates an instance of the SharedGalleryImagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSharedGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) SharedGalleryImagesClient { + return SharedGalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a shared gallery image by subscription id or tenant id. +// Parameters: +// location - resource location. +// galleryUniqueName - the unique name of the Shared Gallery. +// galleryImageName - the name of the Shared Gallery Image Definition from which the Image Versions are to be +// listed. +func (client SharedGalleryImagesClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string) (result SharedGalleryImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImagesClient.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, location, galleryUniqueName, galleryImageName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SharedGalleryImagesClient) GetPreparer(ctx context.Context, location string, galleryUniqueName string, galleryImageName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryUniqueName": autorest.Encode("path", galleryUniqueName), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}", 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 SharedGalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SharedGalleryImagesClient) GetResponder(resp *http.Response) (result SharedGalleryImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list shared gallery images by subscription id or tenant id. +// Parameters: +// location - resource location. +// galleryUniqueName - the unique name of the Shared Gallery. +// sharedTo - the query parameter to decide what shared galleries to fetch when doing listing operations. +func (client SharedGalleryImagesClient) List(ctx context.Context, location string, galleryUniqueName string, sharedTo SharedToValues) (result SharedGalleryImageListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImagesClient.List") + defer func() { + sc := -1 + if result.sgil.Response.Response != nil { + sc = result.sgil.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location, galleryUniqueName, sharedTo) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.sgil.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "List", resp, "Failure sending request") + return + } + + result.sgil, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "List", resp, "Failure responding to request") + return + } + if result.sgil.hasNextLink() && result.sgil.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SharedGalleryImagesClient) ListPreparer(ctx context.Context, location string, galleryUniqueName string, sharedTo SharedToValues) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryUniqueName": autorest.Encode("path", galleryUniqueName), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(sharedTo)) > 0 { + queryParameters["sharedTo"] = autorest.Encode("query", sharedTo) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images", 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 SharedGalleryImagesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SharedGalleryImagesClient) ListResponder(resp *http.Response) (result SharedGalleryImageList, err error) { + err = autorest.Respond( + resp, + 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 SharedGalleryImagesClient) listNextResults(ctx context.Context, lastResults SharedGalleryImageList) (result SharedGalleryImageList, err error) { + req, err := lastResults.sharedGalleryImageListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "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, "compute.SharedGalleryImagesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SharedGalleryImagesClient) ListComplete(ctx context.Context, location string, galleryUniqueName string, sharedTo SharedToValues) (result SharedGalleryImageListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImagesClient.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, location, galleryUniqueName, sharedTo) + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go b/services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go new file mode 100644 index 000000000000..325d3f48b3e9 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go @@ -0,0 +1,240 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SharedGalleryImageVersionsClient is the compute Client +type SharedGalleryImageVersionsClient struct { + BaseClient +} + +// NewSharedGalleryImageVersionsClient creates an instance of the SharedGalleryImageVersionsClient client. +func NewSharedGalleryImageVersionsClient(subscriptionID string) SharedGalleryImageVersionsClient { + return NewSharedGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSharedGalleryImageVersionsClientWithBaseURI creates an instance of the SharedGalleryImageVersionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSharedGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) SharedGalleryImageVersionsClient { + return SharedGalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a shared gallery image version by subscription id or tenant id. +// Parameters: +// location - resource location. +// galleryUniqueName - the unique name of the Shared Gallery. +// galleryImageName - the name of the Shared Gallery Image Definition from which the Image Versions are to be +// listed. +// galleryImageVersionName - the name of the gallery image version to be created. 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: .. +func (client SharedGalleryImageVersionsClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string) (result SharedGalleryImageVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionsClient.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, location, galleryUniqueName, galleryImageName, galleryImageVersionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SharedGalleryImageVersionsClient) GetPreparer(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), + "galleryUniqueName": autorest.Encode("path", galleryUniqueName), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}", 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 SharedGalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SharedGalleryImageVersionsClient) GetResponder(resp *http.Response) (result SharedGalleryImageVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list shared gallery image versions by subscription id or tenant id. +// Parameters: +// location - resource location. +// galleryUniqueName - the unique name of the Shared Gallery. +// galleryImageName - the name of the Shared Gallery Image Definition from which the Image Versions are to be +// listed. +// sharedTo - the query parameter to decide what shared galleries to fetch when doing listing operations. +func (client SharedGalleryImageVersionsClient) List(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo SharedToValues) (result SharedGalleryImageVersionListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionsClient.List") + defer func() { + sc := -1 + if result.sgivl.Response.Response != nil { + sc = result.sgivl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location, galleryUniqueName, galleryImageName, sharedTo) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.sgivl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "List", resp, "Failure sending request") + return + } + + result.sgivl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "List", resp, "Failure responding to request") + return + } + if result.sgivl.hasNextLink() && result.sgivl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SharedGalleryImageVersionsClient) ListPreparer(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo SharedToValues) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryUniqueName": autorest.Encode("path", galleryUniqueName), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(sharedTo)) > 0 { + queryParameters["sharedTo"] = autorest.Encode("query", sharedTo) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions", 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 SharedGalleryImageVersionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SharedGalleryImageVersionsClient) ListResponder(resp *http.Response) (result SharedGalleryImageVersionList, err error) { + err = autorest.Respond( + resp, + 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 SharedGalleryImageVersionsClient) listNextResults(ctx context.Context, lastResults SharedGalleryImageVersionList) (result SharedGalleryImageVersionList, err error) { + req, err := lastResults.sharedGalleryImageVersionListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "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, "compute.SharedGalleryImageVersionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SharedGalleryImageVersionsClient) ListComplete(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo SharedToValues) (result SharedGalleryImageVersionListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionsClient.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, location, galleryUniqueName, galleryImageName, sharedTo) + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/snapshots.go b/services/compute/mgmt/2021-07-01/compute/snapshots.go new file mode 100644 index 000000000000..bec313dd1aa6 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/snapshots.go @@ -0,0 +1,767 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SnapshotsClient is the compute Client +type SnapshotsClient struct { + BaseClient +} + +// NewSnapshotsClient creates an instance of the SnapshotsClient client. +func NewSnapshotsClient(subscriptionID string) SnapshotsClient { + return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient { + return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a snapshot. +// Parameters: +// resourceGroupName - the name of the resource group. +// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot +// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// snapshot - snapshot object supplied in the body of the Put disk operation. +func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: snapshot, + Constraints: []validation.Constraint{{Target: "snapshot.SnapshotProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.PurchasePlan", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.PurchasePlan.Publisher", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "snapshot.SnapshotProperties.PurchasePlan.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "snapshot.SnapshotProperties.PurchasePlan.Product", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("compute.SnapshotsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + snapshot.ManagedBy = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters), + autorest.WithJSON(snapshot), + 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 SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a snapshot. +// Parameters: +// resourceGroupName - the name of the resource group. +// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot +// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/snapshots/{snapshotName}", 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 SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about a snapshot. +// Parameters: +// resourceGroupName - the name of the resource group. +// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot +// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string) (result Snapshot, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/snapshots/{snapshotName}", 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 SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GrantAccess grants access to a snapshot. +// Parameters: +// resourceGroupName - the name of the resource group. +// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot +// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// grantAccessData - access data object supplied in the body of the get snapshot access operation. +func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (result SnapshotsGrantAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.GrantAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: grantAccessData, + Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.SnapshotsClient", "GrantAccess", err.Error()) + } + + req, err := client.GrantAccessPreparer(ctx, resourceGroupName, snapshotName, grantAccessData) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure preparing request") + return + } + + result, err = client.GrantAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure sending request") + return + } + + return +} + +// GrantAccessPreparer prepares the GrantAccess request. +func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/snapshots/{snapshotName}/beginGetAccess", pathParameters), + autorest.WithJSON(grantAccessData), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GrantAccessSender sends the GrantAccess request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GrantAccessResponder handles the response to the GrantAccess request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists snapshots under a subscription. +func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List") + defer func() { + sc := -1 + if result.sl.Response.Response != nil { + sc = result.sl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.sl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure sending request") + return + } + + result.sl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", 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 SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotList, err error) { + err = autorest.Respond( + resp, + 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 SnapshotsClient) listNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) { + req, err := lastResults.snapshotListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "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, "compute.SnapshotsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SnapshotsClient) ListComplete(ctx context.Context) (result SnapshotListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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 lists snapshots under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SnapshotListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.sl.Response.Response != nil { + sc = result.sl.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, "compute.SnapshotsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.sl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.sl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SnapshotsClient) 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 = "2020-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.Compute/snapshots", 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 SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response) (result SnapshotList, err error) { + err = autorest.Respond( + resp, + 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 SnapshotsClient) listByResourceGroupNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) { + req, err := lastResults.snapshotListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "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, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SnapshotListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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 +} + +// RevokeAccess revokes access to a snapshot. +// Parameters: +// resourceGroupName - the name of the resource group. +// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot +// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsRevokeAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.RevokeAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure preparing request") + return + } + + result, err = client.RevokeAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure sending request") + return + } + + return +} + +// RevokeAccessPreparer prepares the RevokeAccess request. +func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/snapshots/{snapshotName}/endGetAccess", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevokeAccessSender sends the RevokeAccess request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RevokeAccessResponder handles the response to the RevokeAccess request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates (patches) a snapshot. +// Parameters: +// resourceGroupName - the name of the resource group. +// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot +// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// snapshot - snapshot object supplied in the body of the Patch snapshot operation. +func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (result SnapshotsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.Compute/snapshots/{snapshotName}", pathParameters), + autorest.WithJSON(snapshot), + 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 SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/sshpublickeys.go b/services/compute/mgmt/2021-07-01/compute/sshpublickeys.go new file mode 100644 index 000000000000..896ec1f1edbf --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/sshpublickeys.go @@ -0,0 +1,649 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SSHPublicKeysClient is the compute Client +type SSHPublicKeysClient struct { + BaseClient +} + +// NewSSHPublicKeysClient creates an instance of the SSHPublicKeysClient client. +func NewSSHPublicKeysClient(subscriptionID string) SSHPublicKeysClient { + return NewSSHPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSSHPublicKeysClientWithBaseURI creates an instance of the SSHPublicKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSSHPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) SSHPublicKeysClient { + return SSHPublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a new SSH public key resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +// parameters - parameters supplied to create the SSH public key. +func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.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, resourceGroupName, SSHPublicKeyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithJSON(parameters), + 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 SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an SSH public key. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/sshPublicKeys/{sshPublicKeyName}", 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 SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GenerateKeyPair generates and returns a public/private key pair and populates the SSH public key resource with the +// public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key +// resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyGenerateKeyPairResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.GenerateKeyPair") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GenerateKeyPairPreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", nil, "Failure preparing request") + return + } + + resp, err := client.GenerateKeyPairSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure sending request") + return + } + + result, err = client.GenerateKeyPairResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request") + return + } + + return +} + +// GenerateKeyPairPreparer prepares the GenerateKeyPair request. +func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GenerateKeyPairSender sends the GenerateKeyPair request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GenerateKeyPairResponder handles the response to the GenerateKeyPair request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get retrieves information about an SSH public key. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.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, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Compute/sshPublicKeys/{sshPublicKeyName}", 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 SSHPublicKeysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all of the SSH public keys in the specified resource group. Use the nextLink property in +// the response to get the next page of SSH public keys. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.spkglr.Response.Response != nil { + sc = result.spkglr.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, "compute.SSHPublicKeysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.spkglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.spkglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SSHPublicKeysClient) 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 = "2021-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.Compute/sshPublicKeys", 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 SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { + req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "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, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SSHPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.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 lists all of the SSH public keys in the subscription. Use the nextLink property in the response +// to get the next page of SSH public keys. +func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (result SSHPublicKeysGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") + defer func() { + sc := -1 + if result.spkglr.Response.Response != nil { + sc = result.spkglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.spkglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.spkglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", 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 SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { + req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "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, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client SSHPublicKeysClient) ListBySubscriptionComplete(ctx context.Context) (result SSHPublicKeysGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.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 +} + +// Update updates a new SSH public key resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +// parameters - parameters supplied to update the SSH public key. +func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.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, SSHPublicKeyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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/sshPublicKeys/{sshPublicKeyName}", 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 SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/usage.go b/services/compute/mgmt/2021-07-01/compute/usage.go new file mode 100644 index 000000000000..ab20765aebf9 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/usage.go @@ -0,0 +1,155 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// UsageClient is the compute Client +type UsageClient struct { + BaseClient +} + +// NewUsageClient creates an instance of the UsageClient client. +func NewUsageClient(subscriptionID string) UsageClient { + return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient { + return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets, for the specified location, the current compute resource usage information as well as the limits for +// compute resources under the subscription. +// Parameters: +// location - the location for which resource usage is queried. +func (client UsageClient) List(ctx context.Context, location string) (result ListUsagesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.List") + defer func() { + sc := -1 + if result.lur.Response.Response != nil { + sc = result.lur.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.UsageClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lur.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure sending request") + return + } + + result.lur, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure responding to request") + return + } + if result.lur.hasNextLink() && result.lur.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client UsageClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages", 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 UsageClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client UsageClient) ListResponder(resp *http.Response) (result ListUsagesResult, err error) { + err = autorest.Respond( + resp, + 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 UsageClient) listNextResults(ctx context.Context, lastResults ListUsagesResult) (result ListUsagesResult, err error) { + req, err := lastResults.listUsagesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.UsageClient", "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, "compute.UsageClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client UsageClient) ListComplete(ctx context.Context, location string) (result ListUsagesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.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, location) + return +} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/version.go b/services/compute/mgmt/2021-07-01/compute/version.go similarity index 86% rename from services/securityinsight/mgmt/v1.0/securityinsight/version.go rename to services/compute/mgmt/2021-07-01/compute/version.go index 77d6fa935541..56cb9d0c28d7 100644 --- a/services/securityinsight/mgmt/v1.0/securityinsight/version.go +++ b/services/compute/mgmt/2021-07-01/compute/version.go @@ -1,4 +1,4 @@ -package securityinsight +package compute import "github.com/Azure/azure-sdk-for-go/version" @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " securityinsight/2020-01-01" + return "Azure-SDK-For-Go/" + Version() + " compute/2021-07-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go new file mode 100644 index 000000000000..e359238e21cb --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go @@ -0,0 +1,270 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineExtensionImagesClient is the compute Client +type VirtualMachineExtensionImagesClient struct { + BaseClient +} + +// NewVirtualMachineExtensionImagesClient creates an instance of the VirtualMachineExtensionImagesClient client. +func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachineExtensionImagesClient { + return NewVirtualMachineExtensionImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { + return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a virtual machine extension image. +// Parameters: +// location - the name of a supported Azure region. +func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, location string, publisherName string, typeParameter string, version string) (result VirtualMachineExtensionImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.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, location, publisherName, typeParameter, version) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Context, location string, publisherName string, typeParameter string, version string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "type": autorest.Encode("path", typeParameter), + "version": autorest.Encode("path", version), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", 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 VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionImagesClient) GetResponder(resp *http.Response) (result VirtualMachineExtensionImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTypes gets a list of virtual machine extension image types. +// Parameters: +// location - the name of a supported Azure region. +func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, location string, publisherName string) (result ListVirtualMachineExtensionImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListTypes") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListTypesPreparer(ctx, location, publisherName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", nil, "Failure preparing request") + return + } + + resp, err := client.ListTypesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure sending request") + return + } + + result, err = client.ListTypesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request") + return + } + + return +} + +// ListTypesPreparer prepares the ListTypes request. +func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.Context, location string, publisherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListTypesSender sends the ListTypes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListTypesResponder handles the response to the ListTypes request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListVersions gets a list of virtual machine extension image versions. +// Parameters: +// location - the name of a supported Azure region. +// filter - the filter to apply on the operation. +func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (result ListVirtualMachineExtensionImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListVersions") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListVersionsPreparer(ctx, location, publisherName, typeParameter, filter, top, orderby) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", nil, "Failure preparing request") + return + } + + resp, err := client.ListVersionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure sending request") + return + } + + result, err = client.ListVersionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request") + return + } + + return +} + +// ListVersionsPreparer prepares the ListVersions request. +func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "type": autorest.Encode("path", typeParameter), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVersionsSender sends the ListVersions request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVersionsResponder handles the response to the ListVersions request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionImagesClient) ListVersionsResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go new file mode 100644 index 000000000000..c5cb4b557fb4 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go @@ -0,0 +1,439 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineExtensionsClient is the compute Client +type VirtualMachineExtensionsClient struct { + BaseClient +} + +// NewVirtualMachineExtensionsClient creates an instance of the VirtualMachineExtensionsClient client. +func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExtensionsClient { + return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient { + return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the extension should be created or updated. +// VMExtensionName - the name of the virtual machine extension. +// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation. +func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (result VirtualMachineExtensionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", pathParameters), + autorest.WithJSON(extensionParameters), + 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 VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the extension should be deleted. +// VMExtensionName - the name of the virtual machine extension. +func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (result VirtualMachineExtensionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, VMExtensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", 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 VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine containing the extension. +// VMExtensionName - the name of the virtual machine extension. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.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, VMName, VMExtensionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", 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 VirtualMachineExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the operation to get all extensions of a Virtual Machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine containing the extension. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineExtensionsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.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, resourceGroupName, VMName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachines/{vmName}/extensions", 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 VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update the operation to update the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the extension should be updated. +// VMExtensionName - the name of the virtual machine extension. +// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation. +func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (result VirtualMachineExtensionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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/virtualMachines/{vmName}/extensions/{vmExtensionName}", 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 VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go b/services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go new file mode 100644 index 000000000000..95b6c52e34af --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go @@ -0,0 +1,432 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineImagesClient is the compute Client +type VirtualMachineImagesClient struct { + BaseClient +} + +// NewVirtualMachineImagesClient creates an instance of the VirtualMachineImagesClient client. +func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesClient { + return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient { + return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a virtual machine image. +// Parameters: +// location - the name of a supported Azure region. +// publisherName - a valid image publisher. +// offer - a valid image publisher offer. +// skus - a valid image SKU. +// version - a valid image SKU version. +func (client VirtualMachineImagesClient) Get(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.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, location, publisherName, offer, skus, version) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "offer": autorest.Encode("path", offer), + "publisherName": autorest.Encode("path", publisherName), + "skus": autorest.Encode("path", skus), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "version": autorest.Encode("path", version), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", 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 VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. +// Parameters: +// location - the name of a supported Azure region. +// publisherName - a valid image publisher. +// offer - a valid image publisher offer. +// skus - a valid image SKU. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.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, location, publisherName, offer, skus, expand, top, orderby) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "offer": autorest.Encode("path", offer), + "publisherName": autorest.Encode("path", publisherName), + "skus": autorest.Encode("path", skus), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", 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 VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListOffers gets a list of virtual machine image offers for the specified location and publisher. +// Parameters: +// location - the name of a supported Azure region. +// publisherName - a valid image publisher. +func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, location string, publisherName string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListOffers") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListOffersPreparer(ctx, location, publisherName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", nil, "Failure preparing request") + return + } + + resp, err := client.ListOffersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure sending request") + return + } + + result, err = client.ListOffersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request") + return + } + + return +} + +// ListOffersPreparer prepares the ListOffers request. +func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, location string, publisherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOffersSender sends the ListOffers request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListOffersResponder handles the response to the ListOffers request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPublishers gets a list of virtual machine image publishers for the specified Azure location. +// Parameters: +// location - the name of a supported Azure region. +func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, location string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListPublishers") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPublishersPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", nil, "Failure preparing request") + return + } + + resp, err := client.ListPublishersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure sending request") + return + } + + result, err = client.ListPublishersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request") + return + } + + return +} + +// ListPublishersPreparer prepares the ListPublishers request. +func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPublishersSender sends the ListPublishers request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListPublishersResponder handles the response to the ListPublishers request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSkus gets a list of virtual machine image SKUs for the specified location, publisher, and offer. +// Parameters: +// location - the name of a supported Azure region. +// publisherName - a valid image publisher. +// offer - a valid image publisher offer. +func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListSkus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListSkusPreparer(ctx, location, publisherName, offer) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure sending request") + return + } + + result, err = client.ListSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request") + return + } + + return +} + +// ListSkusPreparer prepares the ListSkus request. +func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, location string, publisherName string, offer string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "offer": autorest.Encode("path", offer), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSkusSender sends the ListSkus request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListSkusResponder handles the response to the ListSkus request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go b/services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go new file mode 100644 index 000000000000..8fb48bf680d2 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go @@ -0,0 +1,445 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineImagesEdgeZoneClient is the compute Client +type VirtualMachineImagesEdgeZoneClient struct { + BaseClient +} + +// NewVirtualMachineImagesEdgeZoneClient creates an instance of the VirtualMachineImagesEdgeZoneClient client. +func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string) VirtualMachineImagesEdgeZoneClient { + return NewVirtualMachineImagesEdgeZoneClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineImagesEdgeZoneClientWithBaseURI creates an instance of the VirtualMachineImagesEdgeZoneClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewVirtualMachineImagesEdgeZoneClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesEdgeZoneClient { + return VirtualMachineImagesEdgeZoneClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a virtual machine image in an edge zone. +// Parameters: +// location - the name of a supported Azure region. +// edgeZone - the name of the edge zone. +// publisherName - a valid image publisher. +// offer - a valid image publisher offer. +// skus - a valid image SKU. +// version - a valid image SKU version. +func (client VirtualMachineImagesEdgeZoneClient) Get(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.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, location, edgeZone, publisherName, offer, skus, version) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineImagesEdgeZoneClient) GetPreparer(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "edgeZone": autorest.Encode("path", edgeZone), + "location": autorest.Encode("path", location), + "offer": autorest.Encode("path", offer), + "publisherName": autorest.Encode("path", publisherName), + "skus": autorest.Encode("path", skus), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "version": autorest.Encode("path", version), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", 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 VirtualMachineImagesEdgeZoneClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesEdgeZoneClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and +// SKU. +// Parameters: +// location - the name of a supported Azure region. +// edgeZone - the name of the edge zone. +// publisherName - a valid image publisher. +// offer - a valid image publisher offer. +// skus - a valid image SKU. +// expand - the expand expression to apply on the operation. +// top - an integer value specifying the number of images to return that matches supplied values. +// orderby - specifies the order of the results returned. Formatted as an OData query. +func (client VirtualMachineImagesEdgeZoneClient) List(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.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, location, edgeZone, publisherName, offer, skus, expand, top, orderby) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineImagesEdgeZoneClient) ListPreparer(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "edgeZone": autorest.Encode("path", edgeZone), + "location": autorest.Encode("path", location), + "offer": autorest.Encode("path", offer), + "publisherName": autorest.Encode("path", publisherName), + "skus": autorest.Encode("path", skus), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", 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 VirtualMachineImagesEdgeZoneClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesEdgeZoneClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListOffers gets a list of virtual machine image offers for the specified location, edge zone and publisher. +// Parameters: +// location - the name of a supported Azure region. +// edgeZone - the name of the edge zone. +// publisherName - a valid image publisher. +func (client VirtualMachineImagesEdgeZoneClient) ListOffers(ctx context.Context, location string, edgeZone string, publisherName string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.ListOffers") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListOffersPreparer(ctx, location, edgeZone, publisherName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListOffers", nil, "Failure preparing request") + return + } + + resp, err := client.ListOffersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListOffers", resp, "Failure sending request") + return + } + + result, err = client.ListOffersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListOffers", resp, "Failure responding to request") + return + } + + return +} + +// ListOffersPreparer prepares the ListOffers request. +func (client VirtualMachineImagesEdgeZoneClient) ListOffersPreparer(ctx context.Context, location string, edgeZone string, publisherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "edgeZone": autorest.Encode("path", edgeZone), + "location": autorest.Encode("path", location), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOffersSender sends the ListOffers request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineImagesEdgeZoneClient) ListOffersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListOffersResponder handles the response to the ListOffers request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesEdgeZoneClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPublishers gets a list of virtual machine image publishers for the specified Azure location and edge zone. +// Parameters: +// location - the name of a supported Azure region. +// edgeZone - the name of the edge zone. +func (client VirtualMachineImagesEdgeZoneClient) ListPublishers(ctx context.Context, location string, edgeZone string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.ListPublishers") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPublishersPreparer(ctx, location, edgeZone) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListPublishers", nil, "Failure preparing request") + return + } + + resp, err := client.ListPublishersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListPublishers", resp, "Failure sending request") + return + } + + result, err = client.ListPublishersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListPublishers", resp, "Failure responding to request") + return + } + + return +} + +// ListPublishersPreparer prepares the ListPublishers request. +func (client VirtualMachineImagesEdgeZoneClient) ListPublishersPreparer(ctx context.Context, location string, edgeZone string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "edgeZone": autorest.Encode("path", edgeZone), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPublishersSender sends the ListPublishers request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineImagesEdgeZoneClient) ListPublishersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListPublishersResponder handles the response to the ListPublishers request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesEdgeZoneClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSkus gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. +// Parameters: +// location - the name of a supported Azure region. +// edgeZone - the name of the edge zone. +// publisherName - a valid image publisher. +// offer - a valid image publisher offer. +func (client VirtualMachineImagesEdgeZoneClient) ListSkus(ctx context.Context, location string, edgeZone string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.ListSkus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListSkusPreparer(ctx, location, edgeZone, publisherName, offer) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListSkus", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListSkus", resp, "Failure sending request") + return + } + + result, err = client.ListSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListSkus", resp, "Failure responding to request") + return + } + + return +} + +// ListSkusPreparer prepares the ListSkus request. +func (client VirtualMachineImagesEdgeZoneClient) ListSkusPreparer(ctx context.Context, location string, edgeZone string, publisherName string, offer string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "edgeZone": autorest.Encode("path", edgeZone), + "location": autorest.Encode("path", location), + "offer": autorest.Encode("path", offer), + "publisherName": autorest.Encode("path", publisherName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSkusSender sends the ListSkus request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineImagesEdgeZoneClient) ListSkusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListSkusResponder handles the response to the ListSkus request. The method always +// closes the http.Response Body. +func (client VirtualMachineImagesEdgeZoneClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go new file mode 100644 index 000000000000..10cd0b67ad1a --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go @@ -0,0 +1,686 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineRunCommandsClient is the compute Client +type VirtualMachineRunCommandsClient struct { + BaseClient +} + +// NewVirtualMachineRunCommandsClient creates an instance of the VirtualMachineRunCommandsClient client. +func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRunCommandsClient { + return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient { + return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the run command should be created or updated. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Create Virtual Machine RunCommand operation. +func (client VirtualMachineRunCommandsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommand) (result VirtualMachineRunCommandsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineRunCommandsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommand) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + 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 VirtualMachineRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineRunCommandsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the run command should be deleted. +// runCommandName - the name of the virtual machine run command. +func (client VirtualMachineRunCommandsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (result VirtualMachineRunCommandsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, runCommandName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineRunCommandsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", 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 VirtualMachineRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineRunCommandsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets specific run command for a subscription in a location. +// Parameters: +// location - the location upon which run commands is queried. +// commandID - the command id. +func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location string, commandID string) (result RunCommandDocument, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.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: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, location, commandID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, location string, commandID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "commandId": autorest.Encode("path", commandID), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", 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 VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetByVirtualMachine the operation to get the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine containing the run command. +// runCommandName - the name of the virtual machine run command. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (result VirtualMachineRunCommand, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.GetByVirtualMachine") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetByVirtualMachinePreparer(ctx, resourceGroupName, VMName, runCommandName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", nil, "Failure preparing request") + return + } + + resp, err := client.GetByVirtualMachineSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", resp, "Failure sending request") + return + } + + result, err = client.GetByVirtualMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", resp, "Failure responding to request") + return + } + + return +} + +// GetByVirtualMachinePreparer prepares the GetByVirtualMachine request. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachinePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetByVirtualMachineSender sends the GetByVirtualMachine request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachineSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetByVirtualMachineResponder handles the response to the GetByVirtualMachine request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachineResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all available run commands for a subscription in a location. +// Parameters: +// location - the location upon which run commands is queried. +func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location string) (result RunCommandListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List") + defer func() { + sc := -1 + if result.rclr.Response.Response != nil { + sc = result.rclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure sending request") + return + } + + result.rclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to request") + return + } + if result.rclr.hasNextLink() && result.rclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", 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 VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualMachineRunCommandsClient) listNextResults(ctx context.Context, lastResults RunCommandListResult) (result RunCommandListResult, err error) { + req, err := lastResults.runCommandListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "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, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineRunCommandsClient) ListComplete(ctx context.Context, location string) (result RunCommandListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.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, location) + return +} + +// ListByVirtualMachine the operation to get all run commands of a Virtual Machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine containing the run command. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineRunCommandsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.ListByVirtualMachine") + defer func() { + sc := -1 + if result.vmrclr.Response.Response != nil { + sc = result.vmrclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVirtualMachineNextResults + req, err := client.ListByVirtualMachinePreparer(ctx, resourceGroupName, VMName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVirtualMachineSender(req) + if err != nil { + result.vmrclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", resp, "Failure sending request") + return + } + + result.vmrclr, err = client.ListByVirtualMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", resp, "Failure responding to request") + return + } + if result.vmrclr.hasNextLink() && result.vmrclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVirtualMachinePreparer prepares the ListByVirtualMachine request. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachinePreparer(ctx context.Context, resourceGroupName string, VMName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachines/{vmName}/runCommands", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVirtualMachineSender sends the ListByVirtualMachine request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachineSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVirtualMachineResponder handles the response to the ListByVirtualMachine request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachineResponder(resp *http.Response) (result VirtualMachineRunCommandsListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVirtualMachineNextResults retrieves the next set of results, if any. +func (client VirtualMachineRunCommandsClient) listByVirtualMachineNextResults(ctx context.Context, lastResults VirtualMachineRunCommandsListResult) (result VirtualMachineRunCommandsListResult, err error) { + req, err := lastResults.virtualMachineRunCommandsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVirtualMachineSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVirtualMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVirtualMachineComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachineComplete(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineRunCommandsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.ListByVirtualMachine") + 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.ListByVirtualMachine(ctx, resourceGroupName, VMName, expand) + return +} + +// Update the operation to update the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the run command should be updated. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Update Virtual Machine RunCommand operation. +func (client VirtualMachineRunCommandsClient) Update(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (result VirtualMachineRunCommandsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineRunCommandsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + 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 VirtualMachineRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineRunCommandsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) UpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachines.go b/services/compute/mgmt/2021-07-01/compute/virtualmachines.go new file mode 100644 index 000000000000..07ff3ab2b183 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachines.go @@ -0,0 +1,2177 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachinesClient is the compute Client +type VirtualMachinesClient struct { + BaseClient +} + +// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient client. +func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { + return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient { + return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// AssessPatches assess patches on the VM. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) AssessPatches(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesAssessPatchesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.AssessPatches") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.AssessPatchesPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "AssessPatches", nil, "Failure preparing request") + return + } + + result, err = client.AssessPatchesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "AssessPatches", nil, "Failure sending request") + return + } + + return +} + +// AssessPatchesPreparer prepares the AssessPatches request. +func (client VirtualMachinesClient) AssessPatchesPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/assessPatches", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AssessPatchesSender sends the AssessPatches request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) AssessPatchesSender(req *http.Request) (future VirtualMachinesAssessPatchesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// AssessPatchesResponder handles the response to the AssessPatches request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) AssessPatchesResponder(resp *http.Response) (result VirtualMachineAssessPatchesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Capture captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create +// similar VMs. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// parameters - parameters supplied to the Capture Virtual Machine operation. +func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (result VirtualMachinesCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Capture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VhdPrefix", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DestinationContainerName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.OverwriteVhds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachinesClient", "Capture", err.Error()) + } + + req, err := client.CapturePreparer(ctx, resourceGroupName, VMName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure preparing request") + return + } + + result, err = client.CaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure sending request") + return + } + + return +} + +// CapturePreparer prepares the Capture request. +func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CaptureSender sends the Capture request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CaptureResponder handles the response to the Capture request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (result VirtualMachineCaptureResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ConvertToManagedDisks converts virtual machine disks from blob-based to managed disks. Virtual machine must be +// stop-deallocated before invoking this operation. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesConvertToManagedDisksFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ConvertToManagedDisks") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ConvertToManagedDisksPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure preparing request") + return + } + + result, err = client.ConvertToManagedDisksSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure sending request") + return + } + + return +} + +// ConvertToManagedDisksPreparer prepares the ConvertToManagedDisks request. +func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/convertToManagedDisks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ConvertToManagedDisksResponder handles the response to the ConvertToManagedDisks request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate the operation to create or update a virtual machine. Please note some properties can be set only +// during virtual machine creation. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// parameters - parameters supplied to the Create Virtual Machine operation. +func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (result VirtualMachinesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachinesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Resources = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", 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 VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachine, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Deallocate shuts down the virtual machine and releases the compute resources. You are not billed for the compute +// resources that this virtual machine uses. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// hibernate - optional parameter to hibernate a virtual machine. (Feature in Preview) +func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (result VirtualMachinesDeallocateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName, hibernate) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure preparing request") + return + } + + result, err = client.DeallocateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure sending request") + return + } + + return +} + +// DeallocatePreparer prepares the Deallocate request. +func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if hibernate != nil { + queryParameters["hibernate"] = autorest.Encode("query", *hibernate) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeallocateSender sends the Deallocate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeallocateResponder handles the response to the Deallocate request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Delete the operation to delete a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// forceDeletion - optional parameter to force delete virtual machines.(Feature in Preview) +func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (result VirtualMachinesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, forceDeletion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceDeletion != nil { + queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", 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 VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine +// before performing this operation.
    For Windows, please refer to [Create a managed image of a generalized VM in +// Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For Linux, please refer +// to [How to create an image of a virtual machine or +// VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Generalize") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GeneralizePreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", nil, "Failure preparing request") + return + } + + resp, err := client.GeneralizeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure sending request") + return + } + + result, err = client.GeneralizeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request") + return + } + + return +} + +// GeneralizePreparer prepares the Generalize request. +func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/generalize", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GeneralizeSender sends the Generalize request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) GeneralizeSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GeneralizeResponder handles the response to the Generalize request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about the model view or the instance view of a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// expand - the expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime +// properties of the virtual machine that is managed by the platform and can change outside of control plane +// operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the +// user during the VM Create/Update operation. +func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (result VirtualMachine, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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, VMName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/virtualMachines/{vmName}", 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 VirtualMachinesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result VirtualMachine, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InstallPatches installs patches on the VM. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// installPatchesInput - input for InstallPatches as directly received by the API +func (client VirtualMachinesClient) InstallPatches(ctx context.Context, resourceGroupName string, VMName string, installPatchesInput VirtualMachineInstallPatchesParameters) (result VirtualMachinesInstallPatchesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.InstallPatches") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.InstallPatchesPreparer(ctx, resourceGroupName, VMName, installPatchesInput) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", nil, "Failure preparing request") + return + } + + result, err = client.InstallPatchesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", nil, "Failure sending request") + return + } + + return +} + +// InstallPatchesPreparer prepares the InstallPatches request. +func (client VirtualMachinesClient) InstallPatchesPreparer(ctx context.Context, resourceGroupName string, VMName string, installPatchesInput VirtualMachineInstallPatchesParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches", pathParameters), + autorest.WithJSON(installPatchesInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InstallPatchesSender sends the InstallPatches request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) InstallPatchesSender(req *http.Request) (future VirtualMachinesInstallPatchesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// InstallPatchesResponder handles the response to the InstallPatches request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) InstallPatchesResponder(resp *http.Response) (result VirtualMachineInstallPatchesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InstanceView retrieves information about the run-time state of a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineInstanceView, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.InstanceView") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.InstanceViewPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", nil, "Failure preparing request") + return + } + + resp, err := client.InstanceViewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure sending request") + return + } + + result, err = client.InstanceViewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request") + return + } + + return +} + +// InstanceViewPreparer prepares the InstanceView request. +func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/instanceView", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InstanceViewSender sends the InstanceView request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) InstanceViewSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// InstanceViewResponder handles the response to the InstanceView request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) InstanceViewResponder(resp *http.Response) (result VirtualMachineInstanceView, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to +// get the next page of virtual machines. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List") + defer func() { + sc := -1 + if result.vmlr.Response.Response != nil { + sc = result.vmlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vmlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", resp, "Failure sending request") + return + } + + result.vmlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", resp, "Failure responding to request") + return + } + if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachinesClient) ListPreparer(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 = "2021-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.Compute/virtualMachines", 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 VirtualMachinesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ListResponder(resp *http.Response) (result VirtualMachineListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualMachinesClient) listNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) { + req, err := lastResults.virtualMachineListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "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, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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) + return +} + +// ListAll lists all of the virtual machines in the specified subscription. Use the nextLink property in the response +// to get the next page of virtual machines. +// Parameters: +// statusOnly - statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. +func (client VirtualMachinesClient) ListAll(ctx context.Context, statusOnly string) (result VirtualMachineListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll") + defer func() { + sc := -1 + if result.vmlr.Response.Response != nil { + sc = result.vmlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx, statusOnly) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.vmlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure sending request") + return + } + + result.vmlr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusOnly string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(statusOnly) > 0 { + queryParameters["statusOnly"] = autorest.Encode("query", statusOnly) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (result VirtualMachineListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) { + req, err := lastResults.virtualMachineListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachinesClient) ListAllComplete(ctx context.Context, statusOnly string) (result VirtualMachineListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll") + 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.ListAll(ctx, statusOnly) + return +} + +// ListAvailableSizes lists all available virtual machine sizes to which the specified virtual machine can be resized. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineSizeListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAvailableSizes") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableSizesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableSizesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableSizesPreparer prepares the ListAvailableSizes request. +func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/vmSizes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByLocation gets all the virtual machines under the specified subscription for the specified location. +// Parameters: +// location - the location for which virtual machines under the subscription are queried. +func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation") + defer func() { + sc := -1 + if result.vmlr.Response.Response != nil { + sc = result.vmlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error()) + } + + result.fn = client.listByLocationNextResults + req, err := client.ListByLocationPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request") + return + } + + resp, err := client.ListByLocationSender(req) + if err != nil { + result.vmlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request") + return + } + + result.vmlr, err = client.ListByLocationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request") + return + } + if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByLocationPreparer prepares the ListByLocation request. +func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByLocationSender sends the ListByLocation request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByLocationResponder handles the response to the ListByLocation request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByLocationNextResults retrieves the next set of results, if any. +func (client VirtualMachinesClient) listByLocationNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) { + req, err := lastResults.virtualMachineListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByLocationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByLocationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation") + 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.ListByLocation(ctx, location) + return +} + +// PerformMaintenance the operation to perform maintenance on a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesPerformMaintenanceFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PerformMaintenance") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure preparing request") + return + } + + result, err = client.PerformMaintenanceSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure sending request") + return + } + + return +} + +// PerformMaintenancePreparer prepares the PerformMaintenance request. +func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/performMaintenance", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// PowerOff the operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same +// provisioned resources. You are still charged for this virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates +// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not +// specified +func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (result VirtualMachinesPowerOffFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMName, skipShutdown) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure preparing request") + return + } + + result, err = client.PowerOffSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure sending request") + return + } + + return +} + +// PowerOffPreparer prepares the PowerOff request. +func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if skipShutdown != nil { + queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown) + } else { + queryParameters["skipShutdown"] = autorest.Encode("query", false) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PowerOffSender sends the PowerOff request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PowerOffResponder handles the response to the PowerOff request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Reapply the operation to reapply a virtual machine's state. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesReapplyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reapply") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReapplyPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure preparing request") + return + } + + result, err = client.ReapplySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure sending request") + return + } + + return +} + +// ReapplyPreparer prepares the Reapply request. +func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/reapply", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReapplySender sends the Reapply request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReapplyResponder handles the response to the Reapply request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ReapplyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Redeploy shuts down the virtual machine, moves it to a new node, and powers it back on. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRedeployFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Redeploy") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RedeployPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure preparing request") + return + } + + result, err = client.RedeploySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure sending request") + return + } + + return +} + +// RedeployPreparer prepares the Redeploy request. +func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/redeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RedeploySender sends the Redeploy request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RedeployResponder handles the response to the Redeploy request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Reimage reimages the virtual machine which has an ephemeral OS disk back to its initial state. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// parameters - parameters supplied to the Reimage Virtual Machine operation. +func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (result VirtualMachinesReimageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reimage") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReimagePreparer(ctx, resourceGroupName, VMName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure preparing request") + return + } + + result, err = client.ReimageSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure sending request") + return + } + + return +} + +// ReimagePreparer prepares the Reimage request. +func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageSender sends the Reimage request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageResponder handles the response to the Reimage request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Restart the operation to restart a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRestartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Restart") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RestartPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure preparing request") + return + } + + result, err = client.RestartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure sending request") + return + } + + return +} + +// RestartPreparer prepares the Restart request. +func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/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 VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RestartResponder handles the response to the Restart request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RetrieveBootDiagnosticsData the operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// sasURIExpirationTimeInMinutes - expiration duration in minutes for the SAS URIs with a value between 1 to +// 1440 minutes.

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration +// of 120 minutes. +func (client VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, VMName string, sasURIExpirationTimeInMinutes *int32) (result RetrieveBootDiagnosticsDataResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RetrieveBootDiagnosticsData") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RetrieveBootDiagnosticsDataPreparer(ctx, resourceGroupName, VMName, sasURIExpirationTimeInMinutes) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", nil, "Failure preparing request") + return + } + + resp, err := client.RetrieveBootDiagnosticsDataSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", resp, "Failure sending request") + return + } + + result, err = client.RetrieveBootDiagnosticsDataResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", resp, "Failure responding to request") + return + } + + return +} + +// RetrieveBootDiagnosticsDataPreparer prepares the RetrieveBootDiagnosticsData request. +func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataPreparer(ctx context.Context, resourceGroupName string, VMName string, sasURIExpirationTimeInMinutes *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if sasURIExpirationTimeInMinutes != nil { + queryParameters["sasUriExpirationTimeInMinutes"] = autorest.Encode("query", *sasURIExpirationTimeInMinutes) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RetrieveBootDiagnosticsDataSender sends the RetrieveBootDiagnosticsData request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RetrieveBootDiagnosticsDataResponder handles the response to the RetrieveBootDiagnosticsData request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataResponder(resp *http.Response) (result RetrieveBootDiagnosticsDataResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RunCommand run command on the VM. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// parameters - parameters supplied to the Run command operation. +func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (result VirtualMachinesRunCommandFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RunCommand") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachinesClient", "RunCommand", err.Error()) + } + + req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure preparing request") + return + } + + result, err = client.RunCommandSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure sending request") + return + } + + return +} + +// RunCommandPreparer prepares the RunCommand request. +func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RunCommandSender sends the RunCommand request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RunCommandResponder handles the response to the RunCommand request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SimulateEviction the operation to simulate the eviction of spot virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.SimulateEviction") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", nil, "Failure preparing request") + return + } + + resp, err := client.SimulateEvictionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure sending request") + return + } + + result, err = client.SimulateEvictionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request") + return + } + + return +} + +// SimulateEvictionPreparer prepares the SimulateEviction request. +func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/simulateEviction", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SimulateEvictionSender sends the SimulateEviction request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Start the operation to start a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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.Compute/virtualMachines/{vmName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update the operation to update a virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +// parameters - parameters supplied to the Update Virtual Machine operation. +func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (result VirtualMachinesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-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/virtualMachines/{vmName}", 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 VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) UpdateResponder(resp *http.Response) (result VirtualMachine, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go new file mode 100644 index 000000000000..a1b098bd3780 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go @@ -0,0 +1,480 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineScaleSetExtensionsClient is the compute Client +type VirtualMachineScaleSetExtensionsClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetExtensionsClient creates an instance of the VirtualMachineScaleSetExtensionsClient client. +func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMachineScaleSetExtensionsClient { + return NewVirtualMachineScaleSetExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetExtensionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient { + return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update an extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set where the extension should be create or updated. +// vmssExtensionName - the name of the VM scale set extension. +// extensionParameters - parameters supplied to the Create VM scale set Extension operation. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (result VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (*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 = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + extensionParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + 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)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set where the extension should be deleted. +// vmssExtensionName - the name of the VM scale set extension. +func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result VirtualMachineScaleSetExtensionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (*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 = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", 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 VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set containing the extension. +// vmssExtensionName - the name of the VM scale set extension. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result VirtualMachineScaleSetExtension, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.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, VMScaleSetName, vmssExtensionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (*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 = "2021-07-01" + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", 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 VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all extensions in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set containing the extension. +func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.List") + defer func() { + sc := -1 + if result.vmsselr.Response.Response != nil { + sc = result.vmsselr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vmsselr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure sending request") + return + } + + result.vmsselr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to request") + return + } + if result.vmsselr.hasNextLink() && result.vmsselr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions", 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 VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetExtensionListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualMachineScaleSetExtensionsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) { + req, err := lastResults.virtualMachineScaleSetExtensionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "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, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.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, 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.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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", nil, "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 = "2021-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) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + 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, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go new file mode 100644 index 000000000000..298f74a52a29 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go @@ -0,0 +1,343 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineScaleSetRollingUpgradesClient is the compute Client +type VirtualMachineScaleSetRollingUpgradesClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetRollingUpgradesClient creates an instance of the +// VirtualMachineScaleSetRollingUpgradesClient client. +func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { + return NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetRollingUpgradesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { + return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Cancel cancels the current virtual machine scale set rolling upgrade. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.Cancel") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CancelPreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure preparing request") + return + } + + result, err = client.CancelSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure sending request") + return + } + + return +} + +// CancelPreparer prepares the Cancel request. +func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/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 VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetLatest gets the status of the latest virtual machine scale set rolling upgrade. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result RollingUpgradeStatusInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.GetLatest") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetLatestPreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", nil, "Failure preparing request") + return + } + + resp, err := client.GetLatestSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure sending request") + return + } + + result, err = client.GetLatestResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request") + return + } + + return +} + +// GetLatestPreparer prepares the GetLatest request. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetLatestSender sends the GetLatest request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetLatestResponder handles the response to the GetLatest request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(resp *http.Response) (result RollingUpgradeStatusInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StartExtensionUpgrade starts a rolling upgrade to move all extensions for all virtual machine scale set instances to +// the latest available extension version. Instances which are already running the latest extension versions are not +// affected. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartExtensionUpgradePreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure preparing request") + return + } + + result, err = client.StartExtensionUpgradeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request") + return + } + + return +} + +// StartExtensionUpgradePreparer prepares the StartExtensionUpgrade request. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartExtensionUpgradeResponder handles the response to the StartExtensionUpgrade request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available +// Platform Image OS version. Instances which are already running the latest available OS version are not affected. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartOSUpgradePreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure preparing request") + return + } + + result, err = client.StartOSUpgradeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request") + return + } + + return +} + +// StartOSUpgradePreparer prepares the StartOSUpgrade request. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartOSUpgradeResponder handles the response to the StartOSUpgrade request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go new file mode 100644 index 000000000000..9ba36e4df75b --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go @@ -0,0 +1,2140 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineScaleSetsClient is the compute Client +type VirtualMachineScaleSetsClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetsClient creates an instance of the VirtualMachineScaleSetsClient client. +func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScaleSetsClient { + return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient { + return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ConvertToSinglePlacementGroup converts SinglePlacementGroup property to false for a existing virtual machine scale +// set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the virtual machine scale set to create or update. +// parameters - the input object for ConvertToSinglePlacementGroup API. +func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ConvertToSinglePlacementGroupPreparer(ctx, resourceGroupName, VMScaleSetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ConvertToSinglePlacementGroupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure sending request") + return + } + + result, err = client.ConvertToSinglePlacementGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure responding to request") + return + } + + return +} + +// ConvertToSinglePlacementGroupPreparer prepares the ConvertToSinglePlacementGroup request. +func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ConvertToSinglePlacementGroupSender sends the ConvertToSinglePlacementGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ConvertToSinglePlacementGroupResponder handles the response to the ConvertToSinglePlacementGroup request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate create or update a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set to create or update. +// parameters - the scale set object. +func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (result VirtualMachineScaleSetsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy", Name: validation.Null, Rule: false, + 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: 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: 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: int64(0), Chain: nil}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}", 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 VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Deallocate deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the +// compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsDeallocateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Deallocate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure preparing request") + return + } + + result, err = client.DeallocateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure sending request") + return + } + + return +} + +// DeallocatePreparer prepares the Deallocate request. +func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeallocateSender sends the Deallocate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeallocateResponder handles the response to the Deallocate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Delete deletes a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// forceDeletion - optional parameter to force delete a VM scale set. (Feature in Preview) +func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, forceDeletion *bool) (result VirtualMachineScaleSetsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, forceDeletion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, forceDeletion *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceDeletion != nil { + queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", 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 VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteInstances deletes virtual machines in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +// forceDeletion - optional parameter to force delete virtual machines from the VM scale set. (Feature in +// Preview) +func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, forceDeletion *bool) (result VirtualMachineScaleSetsDeleteInstancesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.DeleteInstances") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: VMInstanceIDs, + Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "DeleteInstances", err.Error()) + } + + req, err := client.DeleteInstancesPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs, forceDeletion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure preparing request") + return + } + + result, err = client.DeleteInstancesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure sending request") + return + } + + return +} + +// DeleteInstancesPreparer prepares the DeleteInstances request. +func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, forceDeletion *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceDeletion != nil { + queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete", pathParameters), + autorest.WithJSON(VMInstanceIDs), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteInstancesSender sends the DeleteInstances request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteInstancesResponder handles the response to the DeleteInstances request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ForceRecoveryServiceFabricPlatformUpdateDomainWalk manual platform update domain walk to update virtual machines in +// a service fabric virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// platformUpdateDomain - the platform update domain for which a manual recovery walk is requested +func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (result RecoveryWalkResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx, resourceGroupName, VMScaleSetName, platformUpdateDomain) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", nil, "Failure preparing request") + return + } + + resp, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure sending request") + return + } + + result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request") + return + } + + return +} + +// ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer prepares the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. +func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender sends the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder handles the response to the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp *http.Response) (result RecoveryWalkResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get display information about a virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// expand - the expand expression to apply on the operation. 'UserData' retrieves the UserData property of the +// VM scale set that was provided by the user during the VM scale set Create/Update operation +func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, expand ExpandTypesForGetVMScaleSets) (result VirtualMachineScaleSet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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, VMScaleSetName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, expand ExpandTypesForGetVMScaleSets) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/virtualMachineScaleSets/{vmScaleSetName}", 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 VirtualMachineScaleSetsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceView gets the status of a VM scale set instance. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetInstanceView") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceViewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceViewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure responding to request") + return + } + + return +} + +// GetInstanceViewPreparer prepares the GetInstanceView request. +func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInstanceViewSender sends the GetInstanceView request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) GetInstanceViewResponder(resp *http.Response) (result VirtualMachineScaleSetInstanceView, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetOSUpgradeHistory gets list of OS upgrades on a VM scale set instance. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory") + defer func() { + sc := -1 + if result.vmsslouh.Response.Response != nil { + sc = result.vmsslouh.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getOSUpgradeHistoryNextResults + req, err := client.GetOSUpgradeHistoryPreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", nil, "Failure preparing request") + return + } + + resp, err := client.GetOSUpgradeHistorySender(req) + if err != nil { + result.vmsslouh.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure sending request") + return + } + + result.vmsslouh, err = client.GetOSUpgradeHistoryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure responding to request") + return + } + if result.vmsslouh.hasNextLink() && result.vmsslouh.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetOSUpgradeHistoryPreparer prepares the GetOSUpgradeHistory request. +func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetOSUpgradeHistorySender sends the GetOSUpgradeHistory request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistorySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetOSUpgradeHistoryResponder handles the response to the GetOSUpgradeHistory request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryResponder(resp *http.Response) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getOSUpgradeHistoryNextResults retrieves the next set of results, if any. +func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListOSUpgradeHistory) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) { + req, err := lastResults.virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetOSUpgradeHistorySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure sending next results request") + } + result, err = client.GetOSUpgradeHistoryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetOSUpgradeHistoryComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory") + 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.GetOSUpgradeHistory(ctx, resourceGroupName, VMScaleSetName) + return +} + +// List gets a list of all VM scale sets under a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.List") + defer func() { + sc := -1 + if result.vmsslr.Response.Response != nil { + sc = result.vmsslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vmsslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure sending request") + return + } + + result.vmsslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure responding to request") + return + } + if result.vmsslr.hasNextLink() && result.vmsslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetsClient) ListPreparer(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 = "2021-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.Compute/virtualMachineScaleSets", 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 VirtualMachineScaleSetsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualMachineScaleSetsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) { + req, err := lastResults.virtualMachineScaleSetListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "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, "compute.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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) + return +} + +// ListAll gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use +// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all +// the VM Scale Sets. +func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll") + defer func() { + sc := -1 + if result.vmsslwlr.Response.Response != nil { + sc = result.vmsslwlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.vmsslwlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", resp, "Failure sending request") + return + } + + result.vmsslwlr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vmsslwlr.hasNextLink() && result.vmsslwlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ListAllResponder(resp *http.Response) (result VirtualMachineScaleSetListWithLinkResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client VirtualMachineScaleSetsClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListWithLinkResult) (result VirtualMachineScaleSetListWithLinkResult, err error) { + req, err := lastResults.virtualMachineScaleSetListWithLinkResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetsClient) ListAllComplete(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListByLocation gets all the VM scale sets under the specified subscription for the specified location. +// Parameters: +// location - the location for which VM scale sets under the subscription are queried. +func (client VirtualMachineScaleSetsClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineScaleSetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListByLocation") + defer func() { + sc := -1 + if result.vmsslr.Response.Response != nil { + sc = result.vmsslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "ListByLocation", err.Error()) + } + + result.fn = client.listByLocationNextResults + req, err := client.ListByLocationPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListByLocation", nil, "Failure preparing request") + return + } + + resp, err := client.ListByLocationSender(req) + if err != nil { + result.vmsslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListByLocation", resp, "Failure sending request") + return + } + + result.vmsslr, err = client.ListByLocationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListByLocation", resp, "Failure responding to request") + return + } + if result.vmsslr.hasNextLink() && result.vmsslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByLocationPreparer prepares the ListByLocation request. +func (client VirtualMachineScaleSetsClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByLocationSender sends the ListByLocation request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ListByLocationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByLocationResponder handles the response to the ListByLocation request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineScaleSetListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByLocationNextResults retrieves the next set of results, if any. +func (client VirtualMachineScaleSetsClient) listByLocationNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) { + req, err := lastResults.virtualMachineScaleSetListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listByLocationNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByLocationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listByLocationNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByLocationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listByLocationNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetsClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineScaleSetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListByLocation") + 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.ListByLocation(ctx, location) + return +} + +// ListSkus gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed +// for each SKU. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus") + defer func() { + sc := -1 + if result.vmsslsr.Response.Response != nil { + sc = result.vmsslsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listSkusNextResults + req, err := client.ListSkusPreparer(ctx, resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusSender(req) + if err != nil { + result.vmsslsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", resp, "Failure sending request") + return + } + + result.vmsslsr, err = client.ListSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", resp, "Failure responding to request") + return + } + if result.vmsslsr.hasNextLink() && result.vmsslsr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListSkusPreparer prepares the ListSkus request. +func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSkusSender sends the ListSkus request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ListSkusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListSkusResponder handles the response to the ListSkus request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ListSkusResponder(resp *http.Response) (result VirtualMachineScaleSetListSkusResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listSkusNextResults retrieves the next set of results, if any. +func (client VirtualMachineScaleSetsClient) listSkusNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListSkusResult) (result VirtualMachineScaleSetListSkusResult, err error) { + req, err := lastResults.virtualMachineScaleSetListSkusResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSkusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure sending next results request") + } + result, err = client.ListSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListSkusComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetsClient) ListSkusComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus") + 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.ListSkus(ctx, resourceGroupName, VMScaleSetName) + return +} + +// PerformMaintenance perform maintenance on one or more virtual machines in a VM scale set. Operation on instances +// which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: +// https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPerformMaintenanceFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PerformMaintenance") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure preparing request") + return + } + + result, err = client.PerformMaintenanceSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure sending request") + return + } + + return +} + +// PerformMaintenancePreparer prepares the PerformMaintenance request. +func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// PowerOff power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and +// you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates +// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not +// specified +func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (result VirtualMachineScaleSetsPowerOffFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs, skipShutdown) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure preparing request") + return + } + + result, err = client.PowerOffSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure sending request") + return + } + + return +} + +// PowerOffPreparer prepares the PowerOff request. +func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if skipShutdown != nil { + queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown) + } else { + queryParameters["skipShutdown"] = autorest.Encode("query", false) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PowerOffSender sends the PowerOff request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PowerOffResponder handles the response to the PowerOff request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Redeploy shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers +// them back on. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRedeployFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Redeploy") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure preparing request") + return + } + + result, err = client.RedeploySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure sending request") + return + } + + return +} + +// RedeployPreparer prepares the Redeploy request. +func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RedeploySender sends the Redeploy request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RedeployResponder handles the response to the Redeploy request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a +// ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMScaleSetReimageInput - parameters for Reimaging VM ScaleSet. +func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (result VirtualMachineScaleSetsReimageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMScaleSetReimageInput) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request") + return + } + + result, err = client.ReimageSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure sending request") + return + } + + return +} + +// ReimagePreparer prepares the Reimage request. +func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMScaleSetReimageInput != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMScaleSetReimageInput)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageSender sends the Reimage request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageResponder handles the response to the Reimage request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReimageAll reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation +// is only supported for managed disks. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageAllFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ReimageAll") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request") + return + } + + result, err = client.ReimageAllSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure sending request") + return + } + + return +} + +// ReimageAllPreparer prepares the ReimageAll request. +func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageAllSender sends the ReimageAll request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageAllResponder handles the response to the ReimageAll request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Restart restarts one or more virtual machines in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRestartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Restart") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure preparing request") + return + } + + result, err = client.RestartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure sending request") + return + } + + return +} + +// RestartPreparer prepares the Restart request. +func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + 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 VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RestartResponder handles the response to the Restart request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// SetOrchestrationServiceState changes ServiceState property for a given service +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the virtual machine scale set to create or update. +// parameters - the input object for SetOrchestrationServiceState API. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (result VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.SetOrchestrationServiceState") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request") + return + } + + result, err = client.SetOrchestrationServiceStateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure sending request") + return + } + + return +} + +// SetOrchestrationServiceStatePreparer prepares the SetOrchestrationServiceState request. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetOrchestrationServiceStateSender sends the SetOrchestrationServiceState request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// SetOrchestrationServiceStateResponder handles the response to the SetOrchestrationServiceState request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Start starts one or more virtual machines in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update update a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set to create or update. +// parameters - the scale set object. +func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (result VirtualMachineScaleSetsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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/virtualMachineScaleSets/{vmScaleSetName}", 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 VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateInstances upgrades one or more virtual machines to the latest SKU set in the VM scale set model. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsUpdateInstancesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.UpdateInstances") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: VMInstanceIDs, + Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "UpdateInstances", err.Error()) + } + + req, err := client.UpdateInstancesPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure preparing request") + return + } + + result, err = client.UpdateInstancesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure sending request") + return + } + + return +} + +// UpdateInstancesPreparer prepares the UpdateInstances request. +func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade", pathParameters), + autorest.WithJSON(VMInstanceIDs), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateInstancesSender sends the UpdateInstances request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateInstancesResponder handles the response to the UpdateInstances request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) UpdateInstancesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go new file mode 100644 index 000000000000..9f4104b79872 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go @@ -0,0 +1,454 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineScaleSetVMExtensionsClient is the compute Client +type VirtualMachineScaleSetVMExtensionsClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetVMExtensionsClient creates an instance of the VirtualMachineScaleSetVMExtensionsClient +// client. +func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualMachineScaleSetVMExtensionsClient { + return NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetVMExtensionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient { + return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the VMSS VM extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// VMExtensionName - the name of the virtual machine extension. +// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation. +func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension) (result VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters), + autorest.WithJSON(extensionParameters), + 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 VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the VMSS VM extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// VMExtensionName - the name of the virtual machine extension. +func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (result VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", 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 VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the VMSS VM extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// VMExtensionName - the name of the virtual machine extension. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (result VirtualMachineScaleSetVMExtension, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.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, VMScaleSetName, instanceID, VMExtensionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", 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 VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the operation to get all extensions of an instance in Virtual Machine Scaleset. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineScaleSetVMExtensionsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.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, resourceGroupName, VMScaleSetName, instanceID, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions", 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 VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtensionsListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update the operation to update the VMSS VM extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// VMExtensionName - the name of the virtual machine extension. +// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation. +func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate) (result VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmExtensionName": autorest.Encode("path", VMExtensionName), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", 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 VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go new file mode 100644 index 000000000000..64ba4b4b2b4c --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go @@ -0,0 +1,492 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineScaleSetVMRunCommandsClient is the compute Client +type VirtualMachineScaleSetVMRunCommandsClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetVMRunCommandsClient creates an instance of the VirtualMachineScaleSetVMRunCommandsClient +// client. +func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string) VirtualMachineScaleSetVMRunCommandsClient { + return NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetVMRunCommandsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMRunCommandsClient { + return VirtualMachineScaleSetVMRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Create Virtual Machine RunCommand operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand) (result VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + 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 VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +func (client VirtualMachineScaleSetVMRunCommandsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (result VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetVMRunCommandsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", 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 VirtualMachineScaleSetVMRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (result VirtualMachineRunCommand, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.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, VMScaleSetName, instanceID, runCommandName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetVMRunCommandsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", 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 VirtualMachineScaleSetVMRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) GetResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the operation to get all run commands of an instance in Virtual Machine Scaleset. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineRunCommandsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.List") + defer func() { + sc := -1 + if result.vmrclr.Response.Response != nil { + sc = result.vmrclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vmrclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", resp, "Failure sending request") + return + } + + result.vmrclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", resp, "Failure responding to request") + return + } + if result.vmrclr.hasNextLink() && result.vmrclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands", 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 VirtualMachineScaleSetVMRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListResponder(resp *http.Response) (result VirtualMachineRunCommandsListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualMachineScaleSetVMRunCommandsClient) listNextResults(ctx context.Context, lastResults VirtualMachineRunCommandsListResult) (result VirtualMachineRunCommandsListResult, err error) { + req, err := lastResults.virtualMachineRunCommandsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "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, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineRunCommandsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.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, VMScaleSetName, instanceID, expand) + return +} + +// Update the operation to update the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Update Virtual Machine RunCommand operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (result VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetVMRunCommandsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + 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 VirtualMachineScaleSetVMRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) UpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go new file mode 100644 index 000000000000..4032b1c19bd1 --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go @@ -0,0 +1,1419 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineScaleSetVMsClient is the compute Client +type VirtualMachineScaleSetVMsClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetVMsClient creates an instance of the VirtualMachineScaleSetVMsClient client. +func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineScaleSetVMsClient { + return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMsClient { + return VirtualMachineScaleSetVMsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Deallocate deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the +// compute resources it uses. You are not billed for the compute resources of this virtual machine once it is +// deallocated. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeallocateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Deallocate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure preparing request") + return + } + + result, err = client.DeallocateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure sending request") + return + } + + return +} + +// DeallocatePreparer prepares the Deallocate request. +func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeallocateSender sends the Deallocate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeallocateResponder handles the response to the Deallocate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Delete deletes a virtual machine from a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// forceDeletion - optional parameter to force delete a virtual machine from a VM scale set. (Feature in +// Preview) +func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, forceDeletion *bool) (result VirtualMachineScaleSetVMsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, forceDeletion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, forceDeletion *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceDeletion != nil { + queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", 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 VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a virtual machine from a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of +// the virtual machine. 'UserData' will retrieve the UserData of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (result VirtualMachineScaleSetVM, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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, VMScaleSetName, instanceID, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", 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 VirtualMachineScaleSetVMsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceView gets the status of a virtual machine from a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMInstanceView, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.GetInstanceView") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceViewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceViewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure responding to request") + return + } + + return +} + +// GetInstanceViewPreparer prepares the GetInstanceView request. +func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInstanceViewSender sends the GetInstanceView request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) GetInstanceViewResponder(resp *http.Response) (result VirtualMachineScaleSetVMInstanceView, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all virtual machines in a VM scale sets. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the VM scale set. +// filter - the filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, +// 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'. +// selectParameter - the list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. +// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'. +func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.List") + defer func() { + sc := -1 + if result.vmssvlr.Response.Response != nil { + sc = result.vmssvlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vmssvlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", resp, "Failure sending request") + return + } + + result.vmssvlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", resp, "Failure responding to request") + return + } + if result.vmssvlr.hasNextLink() && result.vmssvlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(selectParameter) > 0 { + queryParameters["$select"] = autorest.Encode("query", selectParameter) + } + 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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines", 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 VirtualMachineScaleSetVMsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualMachineScaleSetVMsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetVMListResult) (result VirtualMachineScaleSetVMListResult, err error) { + req, err := lastResults.virtualMachineScaleSetVMListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "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, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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, virtualMachineScaleSetName, filter, selectParameter, expand) + return +} + +// PerformMaintenance performs maintenance on a virtual machine in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PerformMaintenance") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure preparing request") + return + } + + result, err = client.PerformMaintenanceSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure sending request") + return + } + + return +} + +// PerformMaintenancePreparer prepares the PerformMaintenance request. +func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// PowerOff power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are +// getting charged for the resources. Instead, use deallocate to release resources and avoid charges. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates +// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not +// specified +func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (result VirtualMachineScaleSetVMsPowerOffFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, skipShutdown) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure preparing request") + return + } + + result, err = client.PowerOffSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure sending request") + return + } + + return +} + +// PowerOffPreparer prepares the PowerOff request. +func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if skipShutdown != nil { + queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown) + } else { + queryParameters["skipShutdown"] = autorest.Encode("query", false) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PowerOffSender sends the PowerOff request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PowerOffResponder handles the response to the PowerOff request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Redeploy shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back +// on. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRedeployFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Redeploy") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure preparing request") + return + } + + result, err = client.RedeploySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure sending request") + return + } + + return +} + +// RedeployPreparer prepares the Redeploy request. +func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RedeploySender sends the Redeploy request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RedeployResponder handles the response to the Redeploy request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Reimage reimages (upgrade the operating system) a specific virtual machine in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// VMScaleSetVMReimageInput - parameters for the Reimaging Virtual machine in ScaleSet. +func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (result VirtualMachineScaleSetVMsReimageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMScaleSetVMReimageInput) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure preparing request") + return + } + + result, err = client.ReimageSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure sending request") + return + } + + return +} + +// ReimagePreparer prepares the Reimage request. +func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if VMScaleSetVMReimageInput != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMScaleSetVMReimageInput)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageSender sends the Reimage request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageResponder handles the response to the Reimage request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReimageAll allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This +// operation is only supported for managed disks. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageAllFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.ReimageAll") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure preparing request") + return + } + + result, err = client.ReimageAllSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure sending request") + return + } + + return +} + +// ReimageAllPreparer prepares the ReimageAll request. +func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReimageAllSender sends the ReimageAll request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReimageAllResponder handles the response to the ReimageAll request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Restart restarts a virtual machine in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRestartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Restart") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure preparing request") + return + } + + result, err = client.RestartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure sending request") + return + } + + return +} + +// RestartPreparer prepares the Restart request. +func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/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 VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RestartResponder handles the response to the Restart request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RetrieveBootDiagnosticsData the operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM +// scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// sasURIExpirationTimeInMinutes - expiration duration in minutes for the SAS URIs with a value between 1 to +// 1440 minutes.

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration +// of 120 minutes. +func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, sasURIExpirationTimeInMinutes *int32) (result RetrieveBootDiagnosticsDataResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RetrieveBootDiagnosticsDataPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, sasURIExpirationTimeInMinutes) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", nil, "Failure preparing request") + return + } + + resp, err := client.RetrieveBootDiagnosticsDataSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", resp, "Failure sending request") + return + } + + result, err = client.RetrieveBootDiagnosticsDataResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", resp, "Failure responding to request") + return + } + + return +} + +// RetrieveBootDiagnosticsDataPreparer prepares the RetrieveBootDiagnosticsData request. +func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, sasURIExpirationTimeInMinutes *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if sasURIExpirationTimeInMinutes != nil { + queryParameters["sasUriExpirationTimeInMinutes"] = autorest.Encode("query", *sasURIExpirationTimeInMinutes) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RetrieveBootDiagnosticsDataSender sends the RetrieveBootDiagnosticsData request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RetrieveBootDiagnosticsDataResponder handles the response to the RetrieveBootDiagnosticsData request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataResponder(resp *http.Response) (result RetrieveBootDiagnosticsDataResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RunCommand run command on a virtual machine in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// parameters - parameters supplied to the Run command operation. +func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (result VirtualMachineScaleSetVMsRunCommandFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RunCommand") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "RunCommand", err.Error()) + } + + req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure preparing request") + return + } + + result, err = client.RunCommandSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure sending request") + return + } + + return +} + +// RunCommandPreparer prepares the RunCommand request. +func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RunCommandSender sends the RunCommand request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RunCommandResponder handles the response to the RunCommand request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.SimulateEviction") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", nil, "Failure preparing request") + return + } + + resp, err := client.SimulateEvictionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure sending request") + return + } + + result, err = client.SimulateEvictionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request") + return + } + + return +} + +// SimulateEvictionPreparer prepares the SimulateEviction request. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SimulateEvictionSender sends the SimulateEviction request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Start starts a virtual machine in a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates a virtual machine of a VM scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set where the extension should be create or updated. +// instanceID - the instance ID of the virtual machine. +// parameters - parameters supplied to the Update Virtual Machine Scale Sets VM operation. +func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (result VirtualMachineScaleSetVMsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.InstanceID = nil + parameters.Sku = nil + parameters.Resources = nil + parameters.Zones = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", 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 VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go new file mode 100644 index 000000000000..394d659c218c --- /dev/null +++ b/services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go @@ -0,0 +1,113 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualMachineSizesClient is the compute Client +type VirtualMachineSizesClient struct { + BaseClient +} + +// NewVirtualMachineSizesClient creates an instance of the VirtualMachineSizesClient client. +func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClient { + return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient { + return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List this API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) +// Parameters: +// location - the location upon which virtual-machine-sizes is queried. +func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSizesClient.List") + 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: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineSizesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes", 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 VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineSizesClient) ListResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/CHANGELOG.md b/services/datafactory/mgmt/2018-06-01/datafactory/CHANGELOG.md index ed3c44b8d825..f235aa6cd399 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/CHANGELOG.md +++ b/services/datafactory/mgmt/2018-06-01/datafactory/CHANGELOG.md @@ -2,23 +2,715 @@ ## Additive Changes +### New Constants + +1. AmazonRdsForOraclePartitionOption.AmazonRdsForOraclePartitionOptionDynamicRange +1. AmazonRdsForOraclePartitionOption.AmazonRdsForOraclePartitionOptionNone +1. AmazonRdsForOraclePartitionOption.AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable +1. TypeBasicActivity.TypeBasicActivityTypeExecuteWranglingDataflow +1. TypeBasicCopySource.TypeBasicCopySourceTypeAmazonRdsForOracleSource +1. TypeBasicDataFlow.TypeBasicDataFlowTypeWranglingDataFlow +1. TypeBasicDataset.TypeBasicDatasetTypeAmazonRdsForOracleTable +1. TypeBasicLinkedService.TypeBasicLinkedServiceTypeAmazonRdsForOracle + ### New Funcs -1. IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints(context.Context, string, string, string) (IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse, error) -1. IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpointsPreparer(context.Context, string, string, string) (*http.Request, error) -1. IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpointsResponder(*http.Response) (IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse, error) -1. IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpointsSender(*http.Request) (*http.Response, error) +1. *AmazonRdsForLinkedServiceTypeProperties.UnmarshalJSON([]byte) error +1. *AmazonRdsForOracleLinkedService.UnmarshalJSON([]byte) error +1. *AmazonRdsForOracleSource.UnmarshalJSON([]byte) error +1. *AmazonRdsForOracleTableDataset.UnmarshalJSON([]byte) error +1. *ExecuteWranglingDataflowActivity.UnmarshalJSON([]byte) error +1. *WranglingDataFlow.UnmarshalJSON([]byte) error +1. Activity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AmazonMWSLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AmazonMWSObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AmazonMWSSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AmazonRdsForOracleLinkedService.AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAmazonS3CompatibleLinkedService() (*AmazonS3CompatibleLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureBlobFSLinkedService() (*AzureBlobFSLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureBlobStorageLinkedService() (*AzureBlobStorageLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureDataExplorerLinkedService() (*AzureDataExplorerLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureDatabricksDeltaLakeLinkedService() (*AzureDatabricksDeltaLakeLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureFileStorageLinkedService() (*AzureFileStorageLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureFunctionLinkedService() (*AzureFunctionLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureMLLinkedService() (*AzureMLLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureMLServiceLinkedService() (*AzureMLServiceLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureMariaDBLinkedService() (*AzureMariaDBLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureSQLMILinkedService() (*AzureSQLMILinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsAzureTableStorageLinkedService() (*AzureTableStorageLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsBasicLinkedService() (BasicLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsCassandraLinkedService() (*CassandraLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsCommonDataServiceForAppsLinkedService() (*CommonDataServiceForAppsLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsConcurLinkedService() (*ConcurLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsCosmosDbMongoDbAPILinkedService() (*CosmosDbMongoDbAPILinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsDb2LinkedService() (*Db2LinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsDrillLinkedService() (*DrillLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsDynamicsAXLinkedService() (*DynamicsAXLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsDynamicsCrmLinkedService() (*DynamicsCrmLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsDynamicsLinkedService() (*DynamicsLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsEloquaLinkedService() (*EloquaLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsFileServerLinkedService() (*FileServerLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsFtpServerLinkedService() (*FtpServerLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsGoogleAdWordsLinkedService() (*GoogleAdWordsLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsGoogleCloudStorageLinkedService() (*GoogleCloudStorageLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsGreenplumLinkedService() (*GreenplumLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHBaseLinkedService() (*HBaseLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHDInsightLinkedService() (*HDInsightLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHTTPLinkedService() (*HTTPLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHdfsLinkedService() (*HdfsLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHiveLinkedService() (*HiveLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsHubspotLinkedService() (*HubspotLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsImpalaLinkedService() (*ImpalaLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsInformixLinkedService() (*InformixLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsJiraLinkedService() (*JiraLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsLinkedService() (*LinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMagentoLinkedService() (*MagentoLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMariaDBLinkedService() (*MariaDBLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMarketoLinkedService() (*MarketoLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMicrosoftAccessLinkedService() (*MicrosoftAccessLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMongoDbAtlasLinkedService() (*MongoDbAtlasLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMongoDbLinkedService() (*MongoDbLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMongoDbV2LinkedService() (*MongoDbV2LinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsMySQLLinkedService() (*MySQLLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsNetezzaLinkedService() (*NetezzaLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsODataLinkedService() (*ODataLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsOdbcLinkedService() (*OdbcLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsOffice365LinkedService() (*Office365LinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsOracleCloudStorageLinkedService() (*OracleCloudStorageLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsOracleLinkedService() (*OracleLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsOracleServiceCloudLinkedService() (*OracleServiceCloudLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsPaypalLinkedService() (*PaypalLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsPhoenixLinkedService() (*PhoenixLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsPrestoLinkedService() (*PrestoLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsResponsysLinkedService() (*ResponsysLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsRestServiceLinkedService() (*RestServiceLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSQLServerLinkedService() (*SQLServerLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSalesforceLinkedService() (*SalesforceLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSalesforceServiceCloudLinkedService() (*SalesforceServiceCloudLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSapBWLinkedService() (*SapBWLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSapEccLinkedService() (*SapEccLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSapHanaLinkedService() (*SapHanaLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSapOpenHubLinkedService() (*SapOpenHubLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSapTableLinkedService() (*SapTableLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSftpServerLinkedService() (*SftpServerLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSharePointOnlineListLinkedService() (*SharePointOnlineListLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsShopifyLinkedService() (*ShopifyLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSnowflakeLinkedService() (*SnowflakeLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSparkLinkedService() (*SparkLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSquareLinkedService() (*SquareLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsSybaseLinkedService() (*SybaseLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsTeradataLinkedService() (*TeradataLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsVerticaLinkedService() (*VerticaLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsWebLinkedService() (*WebLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsXeroLinkedService() (*XeroLinkedService, bool) +1. AmazonRdsForOracleLinkedService.AsZohoLinkedService() (*ZohoLinkedService, bool) +1. AmazonRdsForOracleLinkedService.MarshalJSON() ([]byte, error) +1. AmazonRdsForOracleSource.AsAmazonMWSSource() (*AmazonMWSSource, bool) +1. AmazonRdsForOracleSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AmazonRdsForOracleSource.AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) +1. AmazonRdsForOracleSource.AsAvroSource() (*AvroSource, bool) +1. AmazonRdsForOracleSource.AsAzureBlobFSSource() (*AzureBlobFSSource, bool) +1. AmazonRdsForOracleSource.AsAzureDataExplorerSource() (*AzureDataExplorerSource, bool) +1. AmazonRdsForOracleSource.AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) +1. AmazonRdsForOracleSource.AsAzureDatabricksDeltaLakeSource() (*AzureDatabricksDeltaLakeSource, bool) +1. AmazonRdsForOracleSource.AsAzureMariaDBSource() (*AzureMariaDBSource, bool) +1. AmazonRdsForOracleSource.AsAzureMySQLSource() (*AzureMySQLSource, bool) +1. AmazonRdsForOracleSource.AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) +1. AmazonRdsForOracleSource.AsAzureSQLSource() (*AzureSQLSource, bool) +1. AmazonRdsForOracleSource.AsAzureTableSource() (*AzureTableSource, bool) +1. AmazonRdsForOracleSource.AsBasicCopySource() (BasicCopySource, bool) +1. AmazonRdsForOracleSource.AsBasicTabularSource() (BasicTabularSource, bool) +1. AmazonRdsForOracleSource.AsBinarySource() (*BinarySource, bool) +1. AmazonRdsForOracleSource.AsBlobSource() (*BlobSource, bool) +1. AmazonRdsForOracleSource.AsCassandraSource() (*CassandraSource, bool) +1. AmazonRdsForOracleSource.AsCommonDataServiceForAppsSource() (*CommonDataServiceForAppsSource, bool) +1. AmazonRdsForOracleSource.AsConcurSource() (*ConcurSource, bool) +1. AmazonRdsForOracleSource.AsCopySource() (*CopySource, bool) +1. AmazonRdsForOracleSource.AsCosmosDbMongoDbAPISource() (*CosmosDbMongoDbAPISource, bool) +1. AmazonRdsForOracleSource.AsCosmosDbSQLAPISource() (*CosmosDbSQLAPISource, bool) +1. AmazonRdsForOracleSource.AsCouchbaseSource() (*CouchbaseSource, bool) +1. AmazonRdsForOracleSource.AsDb2Source() (*Db2Source, bool) +1. AmazonRdsForOracleSource.AsDelimitedTextSource() (*DelimitedTextSource, bool) +1. AmazonRdsForOracleSource.AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) +1. AmazonRdsForOracleSource.AsDrillSource() (*DrillSource, bool) +1. AmazonRdsForOracleSource.AsDynamicsAXSource() (*DynamicsAXSource, bool) +1. AmazonRdsForOracleSource.AsDynamicsCrmSource() (*DynamicsCrmSource, bool) +1. AmazonRdsForOracleSource.AsDynamicsSource() (*DynamicsSource, bool) +1. AmazonRdsForOracleSource.AsEloquaSource() (*EloquaSource, bool) +1. AmazonRdsForOracleSource.AsExcelSource() (*ExcelSource, bool) +1. AmazonRdsForOracleSource.AsFileSystemSource() (*FileSystemSource, bool) +1. AmazonRdsForOracleSource.AsGoogleAdWordsSource() (*GoogleAdWordsSource, bool) +1. AmazonRdsForOracleSource.AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) +1. AmazonRdsForOracleSource.AsGreenplumSource() (*GreenplumSource, bool) +1. AmazonRdsForOracleSource.AsHBaseSource() (*HBaseSource, bool) +1. AmazonRdsForOracleSource.AsHTTPSource() (*HTTPSource, bool) +1. AmazonRdsForOracleSource.AsHdfsSource() (*HdfsSource, bool) +1. AmazonRdsForOracleSource.AsHiveSource() (*HiveSource, bool) +1. AmazonRdsForOracleSource.AsHubspotSource() (*HubspotSource, bool) +1. AmazonRdsForOracleSource.AsImpalaSource() (*ImpalaSource, bool) +1. AmazonRdsForOracleSource.AsInformixSource() (*InformixSource, bool) +1. AmazonRdsForOracleSource.AsJSONSource() (*JSONSource, bool) +1. AmazonRdsForOracleSource.AsJiraSource() (*JiraSource, bool) +1. AmazonRdsForOracleSource.AsMagentoSource() (*MagentoSource, bool) +1. AmazonRdsForOracleSource.AsMariaDBSource() (*MariaDBSource, bool) +1. AmazonRdsForOracleSource.AsMarketoSource() (*MarketoSource, bool) +1. AmazonRdsForOracleSource.AsMicrosoftAccessSource() (*MicrosoftAccessSource, bool) +1. AmazonRdsForOracleSource.AsMongoDbAtlasSource() (*MongoDbAtlasSource, bool) +1. AmazonRdsForOracleSource.AsMongoDbSource() (*MongoDbSource, bool) +1. AmazonRdsForOracleSource.AsMongoDbV2Source() (*MongoDbV2Source, bool) +1. AmazonRdsForOracleSource.AsMySQLSource() (*MySQLSource, bool) +1. AmazonRdsForOracleSource.AsNetezzaSource() (*NetezzaSource, bool) +1. AmazonRdsForOracleSource.AsODataSource() (*ODataSource, bool) +1. AmazonRdsForOracleSource.AsOdbcSource() (*OdbcSource, bool) +1. AmazonRdsForOracleSource.AsOffice365Source() (*Office365Source, bool) +1. AmazonRdsForOracleSource.AsOracleServiceCloudSource() (*OracleServiceCloudSource, bool) +1. AmazonRdsForOracleSource.AsOracleSource() (*OracleSource, bool) +1. AmazonRdsForOracleSource.AsOrcSource() (*OrcSource, bool) +1. AmazonRdsForOracleSource.AsParquetSource() (*ParquetSource, bool) +1. AmazonRdsForOracleSource.AsPaypalSource() (*PaypalSource, bool) +1. AmazonRdsForOracleSource.AsPhoenixSource() (*PhoenixSource, bool) +1. AmazonRdsForOracleSource.AsPostgreSQLSource() (*PostgreSQLSource, bool) +1. AmazonRdsForOracleSource.AsPrestoSource() (*PrestoSource, bool) +1. AmazonRdsForOracleSource.AsQuickBooksSource() (*QuickBooksSource, bool) +1. AmazonRdsForOracleSource.AsRelationalSource() (*RelationalSource, bool) +1. AmazonRdsForOracleSource.AsResponsysSource() (*ResponsysSource, bool) +1. AmazonRdsForOracleSource.AsRestSource() (*RestSource, bool) +1. AmazonRdsForOracleSource.AsSQLDWSource() (*SQLDWSource, bool) +1. AmazonRdsForOracleSource.AsSQLMISource() (*SQLMISource, bool) +1. AmazonRdsForOracleSource.AsSQLServerSource() (*SQLServerSource, bool) +1. AmazonRdsForOracleSource.AsSQLSource() (*SQLSource, bool) +1. AmazonRdsForOracleSource.AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) +1. AmazonRdsForOracleSource.AsSalesforceServiceCloudSource() (*SalesforceServiceCloudSource, bool) +1. AmazonRdsForOracleSource.AsSalesforceSource() (*SalesforceSource, bool) +1. AmazonRdsForOracleSource.AsSapBwSource() (*SapBwSource, bool) +1. AmazonRdsForOracleSource.AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) +1. AmazonRdsForOracleSource.AsSapEccSource() (*SapEccSource, bool) +1. AmazonRdsForOracleSource.AsSapHanaSource() (*SapHanaSource, bool) +1. AmazonRdsForOracleSource.AsSapOpenHubSource() (*SapOpenHubSource, bool) +1. AmazonRdsForOracleSource.AsSapTableSource() (*SapTableSource, bool) +1. AmazonRdsForOracleSource.AsServiceNowSource() (*ServiceNowSource, bool) +1. AmazonRdsForOracleSource.AsSharePointOnlineListSource() (*SharePointOnlineListSource, bool) +1. AmazonRdsForOracleSource.AsShopifySource() (*ShopifySource, bool) +1. AmazonRdsForOracleSource.AsSnowflakeSource() (*SnowflakeSource, bool) +1. AmazonRdsForOracleSource.AsSparkSource() (*SparkSource, bool) +1. AmazonRdsForOracleSource.AsSquareSource() (*SquareSource, bool) +1. AmazonRdsForOracleSource.AsSybaseSource() (*SybaseSource, bool) +1. AmazonRdsForOracleSource.AsTabularSource() (*TabularSource, bool) +1. AmazonRdsForOracleSource.AsTeradataSource() (*TeradataSource, bool) +1. AmazonRdsForOracleSource.AsVerticaSource() (*VerticaSource, bool) +1. AmazonRdsForOracleSource.AsWebSource() (*WebSource, bool) +1. AmazonRdsForOracleSource.AsXMLSource() (*XMLSource, bool) +1. AmazonRdsForOracleSource.AsXeroSource() (*XeroSource, bool) +1. AmazonRdsForOracleSource.AsZohoSource() (*ZohoSource, bool) +1. AmazonRdsForOracleSource.MarshalJSON() ([]byte, error) +1. AmazonRdsForOracleTableDataset.AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAmazonRedshiftTableDataset() (*AmazonRedshiftTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAmazonS3Dataset() (*AmazonS3Dataset, bool) +1. AmazonRdsForOracleTableDataset.AsAvroDataset() (*AvroDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureBlobDataset() (*AzureBlobDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureBlobFSDataset() (*AzureBlobFSDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureDataExplorerTableDataset() (*AzureDataExplorerTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureDatabricksDeltaLakeDataset() (*AzureDatabricksDeltaLakeDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureMariaDBTableDataset() (*AzureMariaDBTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureSQLMITableDataset() (*AzureSQLMITableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) +1. AmazonRdsForOracleTableDataset.AsAzureTableDataset() (*AzureTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsBasicDataset() (BasicDataset, bool) +1. AmazonRdsForOracleTableDataset.AsBinaryDataset() (*BinaryDataset, bool) +1. AmazonRdsForOracleTableDataset.AsCassandraTableDataset() (*CassandraTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsCommonDataServiceForAppsEntityDataset() (*CommonDataServiceForAppsEntityDataset, bool) +1. AmazonRdsForOracleTableDataset.AsConcurObjectDataset() (*ConcurObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsCosmosDbMongoDbAPICollectionDataset() (*CosmosDbMongoDbAPICollectionDataset, bool) +1. AmazonRdsForOracleTableDataset.AsCosmosDbSQLAPICollectionDataset() (*CosmosDbSQLAPICollectionDataset, bool) +1. AmazonRdsForOracleTableDataset.AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsCustomDataset() (*CustomDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDataset() (*Dataset, bool) +1. AmazonRdsForOracleTableDataset.AsDb2TableDataset() (*Db2TableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDelimitedTextDataset() (*DelimitedTextDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDrillTableDataset() (*DrillTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDynamicsAXResourceDataset() (*DynamicsAXResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDynamicsCrmEntityDataset() (*DynamicsCrmEntityDataset, bool) +1. AmazonRdsForOracleTableDataset.AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) +1. AmazonRdsForOracleTableDataset.AsEloquaObjectDataset() (*EloquaObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsExcelDataset() (*ExcelDataset, bool) +1. AmazonRdsForOracleTableDataset.AsFileShareDataset() (*FileShareDataset, bool) +1. AmazonRdsForOracleTableDataset.AsGoogleAdWordsObjectDataset() (*GoogleAdWordsObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsGreenplumTableDataset() (*GreenplumTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsHBaseObjectDataset() (*HBaseObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsHTTPDataset() (*HTTPDataset, bool) +1. AmazonRdsForOracleTableDataset.AsHiveObjectDataset() (*HiveObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsHubspotObjectDataset() (*HubspotObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsInformixTableDataset() (*InformixTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsJSONDataset() (*JSONDataset, bool) +1. AmazonRdsForOracleTableDataset.AsJiraObjectDataset() (*JiraObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMagentoObjectDataset() (*MagentoObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMariaDBTableDataset() (*MariaDBTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMarketoObjectDataset() (*MarketoObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMicrosoftAccessTableDataset() (*MicrosoftAccessTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMongoDbAtlasCollectionDataset() (*MongoDbAtlasCollectionDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMongoDbV2CollectionDataset() (*MongoDbV2CollectionDataset, bool) +1. AmazonRdsForOracleTableDataset.AsMySQLTableDataset() (*MySQLTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsNetezzaTableDataset() (*NetezzaTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsODataResourceDataset() (*ODataResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsOdbcTableDataset() (*OdbcTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsOffice365Dataset() (*Office365Dataset, bool) +1. AmazonRdsForOracleTableDataset.AsOracleServiceCloudObjectDataset() (*OracleServiceCloudObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsOracleTableDataset() (*OracleTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsOrcDataset() (*OrcDataset, bool) +1. AmazonRdsForOracleTableDataset.AsParquetDataset() (*ParquetDataset, bool) +1. AmazonRdsForOracleTableDataset.AsPaypalObjectDataset() (*PaypalObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsPostgreSQLTableDataset() (*PostgreSQLTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsPrestoObjectDataset() (*PrestoObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsRelationalTableDataset() (*RelationalTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsRestResourceDataset() (*RestResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSQLServerTableDataset() (*SQLServerTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSalesforceServiceCloudObjectDataset() (*SalesforceServiceCloudObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSapBwCubeDataset() (*SapBwCubeDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSapEccResourceDataset() (*SapEccResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSapHanaTableDataset() (*SapHanaTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSapOpenHubTableDataset() (*SapOpenHubTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSapTableResourceDataset() (*SapTableResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSharePointOnlineListResourceDataset() (*SharePointOnlineListResourceDataset, bool) +1. AmazonRdsForOracleTableDataset.AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSnowflakeDataset() (*SnowflakeDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSparkObjectDataset() (*SparkObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSquareObjectDataset() (*SquareObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsSybaseTableDataset() (*SybaseTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsTeradataTableDataset() (*TeradataTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsVerticaTableDataset() (*VerticaTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsWebTableDataset() (*WebTableDataset, bool) +1. AmazonRdsForOracleTableDataset.AsXMLDataset() (*XMLDataset, bool) +1. AmazonRdsForOracleTableDataset.AsXeroObjectDataset() (*XeroObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.AsZohoObjectDataset() (*ZohoObjectDataset, bool) +1. AmazonRdsForOracleTableDataset.MarshalJSON() ([]byte, error) +1. AmazonRedshiftLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AmazonRedshiftSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AmazonRedshiftTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AmazonS3CompatibleLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AmazonS3Dataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AmazonS3LinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AppendVariableActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AvroDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AvroSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureBatchLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureBlobDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureBlobFSDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureBlobFSLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureBlobFSSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureBlobStorageLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureDataExplorerCommandActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AzureDataExplorerLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureDataExplorerSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureDataExplorerTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureDataLakeAnalyticsLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureDataLakeStoreDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureDataLakeStoreLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureDataLakeStoreSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureDatabricksDeltaLakeDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureDatabricksDeltaLakeLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureDatabricksDeltaLakeSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureDatabricksLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureFileStorageLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureFunctionActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AzureFunctionLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureKeyVaultLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureMLBatchExecutionActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AzureMLExecutePipelineActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AzureMLLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureMLServiceLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureMLUpdateResourceActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. AzureMariaDBLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureMariaDBSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureMariaDBTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureMySQLLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureMySQLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureMySQLTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzurePostgreSQLLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzurePostgreSQLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzurePostgreSQLTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureSQLDWLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureSQLDWTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureSQLDatabaseLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureSQLMILinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureSQLMITableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureSQLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureSQLTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureSearchIndexDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureSearchLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureStorageLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. AzureTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. AzureTableSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. AzureTableStorageLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. BinaryDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. BinarySource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. BlobSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. CassandraLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. CassandraSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. CassandraTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. CommonDataServiceForAppsEntityDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. CommonDataServiceForAppsLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. CommonDataServiceForAppsSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ConcurLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ConcurObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ConcurSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ControlActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. CopyActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. CopySource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. CosmosDbLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. CosmosDbMongoDbAPICollectionDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. CosmosDbMongoDbAPILinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. CosmosDbMongoDbAPISource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. CosmosDbSQLAPICollectionDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. CosmosDbSQLAPISource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. CouchbaseLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. CouchbaseSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. CouchbaseTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. CustomActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. CustomDataSourceLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. CustomDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DataFlow.AsWranglingDataFlow() (*WranglingDataFlow, bool) +1. DataLakeAnalyticsUSQLActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. DatabricksNotebookActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. DatabricksSparkJarActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. DatabricksSparkPythonActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. Dataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. Db2LinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. Db2Source.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. Db2TableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DeleteActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. DelimitedTextDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DelimitedTextSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. DocumentDbCollectionDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DocumentDbCollectionSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. DrillLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. DrillSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. DrillTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DynamicsAXLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. DynamicsAXResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DynamicsAXSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. DynamicsCrmEntityDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DynamicsCrmLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. DynamicsCrmSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. DynamicsEntityDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. DynamicsLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. DynamicsSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. EloquaLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. EloquaObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. EloquaSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ExcelDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ExcelSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ExecuteDataFlowActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ExecutePipelineActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ExecutePowerQueryActivityTypeProperties.MarshalJSON() ([]byte, error) +1. ExecuteSSISPackageActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ExecuteWranglingDataflowActivity.AsActivity() (*Activity, bool) +1. ExecuteWranglingDataflowActivity.AsAppendVariableActivity() (*AppendVariableActivity, bool) +1. ExecuteWranglingDataflowActivity.AsAzureDataExplorerCommandActivity() (*AzureDataExplorerCommandActivity, bool) +1. ExecuteWranglingDataflowActivity.AsAzureFunctionActivity() (*AzureFunctionActivity, bool) +1. ExecuteWranglingDataflowActivity.AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) +1. ExecuteWranglingDataflowActivity.AsAzureMLExecutePipelineActivity() (*AzureMLExecutePipelineActivity, bool) +1. ExecuteWranglingDataflowActivity.AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) +1. ExecuteWranglingDataflowActivity.AsBasicActivity() (BasicActivity, bool) +1. ExecuteWranglingDataflowActivity.AsBasicControlActivity() (BasicControlActivity, bool) +1. ExecuteWranglingDataflowActivity.AsBasicExecutionActivity() (BasicExecutionActivity, bool) +1. ExecuteWranglingDataflowActivity.AsControlActivity() (*ControlActivity, bool) +1. ExecuteWranglingDataflowActivity.AsCopyActivity() (*CopyActivity, bool) +1. ExecuteWranglingDataflowActivity.AsCustomActivity() (*CustomActivity, bool) +1. ExecuteWranglingDataflowActivity.AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) +1. ExecuteWranglingDataflowActivity.AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) +1. ExecuteWranglingDataflowActivity.AsDatabricksSparkJarActivity() (*DatabricksSparkJarActivity, bool) +1. ExecuteWranglingDataflowActivity.AsDatabricksSparkPythonActivity() (*DatabricksSparkPythonActivity, bool) +1. ExecuteWranglingDataflowActivity.AsDeleteActivity() (*DeleteActivity, bool) +1. ExecuteWranglingDataflowActivity.AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) +1. ExecuteWranglingDataflowActivity.AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) +1. ExecuteWranglingDataflowActivity.AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) +1. ExecuteWranglingDataflowActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ExecuteWranglingDataflowActivity.AsExecutionActivity() (*ExecutionActivity, bool) +1. ExecuteWranglingDataflowActivity.AsFilterActivity() (*FilterActivity, bool) +1. ExecuteWranglingDataflowActivity.AsForEachActivity() (*ForEachActivity, bool) +1. ExecuteWranglingDataflowActivity.AsGetMetadataActivity() (*GetMetadataActivity, bool) +1. ExecuteWranglingDataflowActivity.AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) +1. ExecuteWranglingDataflowActivity.AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) +1. ExecuteWranglingDataflowActivity.AsHDInsightPigActivity() (*HDInsightPigActivity, bool) +1. ExecuteWranglingDataflowActivity.AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) +1. ExecuteWranglingDataflowActivity.AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) +1. ExecuteWranglingDataflowActivity.AsIfConditionActivity() (*IfConditionActivity, bool) +1. ExecuteWranglingDataflowActivity.AsLookupActivity() (*LookupActivity, bool) +1. ExecuteWranglingDataflowActivity.AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) +1. ExecuteWranglingDataflowActivity.AsSetVariableActivity() (*SetVariableActivity, bool) +1. ExecuteWranglingDataflowActivity.AsSwitchActivity() (*SwitchActivity, bool) +1. ExecuteWranglingDataflowActivity.AsUntilActivity() (*UntilActivity, bool) +1. ExecuteWranglingDataflowActivity.AsValidationActivity() (*ValidationActivity, bool) +1. ExecuteWranglingDataflowActivity.AsWaitActivity() (*WaitActivity, bool) +1. ExecuteWranglingDataflowActivity.AsWebActivity() (*WebActivity, bool) +1. ExecuteWranglingDataflowActivity.AsWebHookActivity() (*WebHookActivity, bool) +1. ExecuteWranglingDataflowActivity.MarshalJSON() ([]byte, error) +1. ExecutionActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. FileServerLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. FileShareDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. FileSystemSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. FilterActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ForEachActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. FtpServerLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. GetMetadataActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. GoogleAdWordsLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. GoogleAdWordsObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. GoogleAdWordsSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. GoogleBigQueryLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. GoogleBigQueryObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. GoogleBigQuerySource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. GoogleCloudStorageLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. GreenplumLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. GreenplumSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. GreenplumTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. HBaseLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HBaseObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. HBaseSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. HDInsightHiveActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. HDInsightLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HDInsightMapReduceActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. HDInsightOnDemandLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HDInsightPigActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. HDInsightSparkActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. HDInsightStreamingActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. HTTPDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. HTTPLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HTTPSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. HdfsLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HdfsSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. HiveLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HiveObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. HiveSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. HubspotLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. HubspotObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. HubspotSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. IfConditionActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ImpalaLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ImpalaObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ImpalaSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. InformixLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. InformixSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. InformixTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. JSONDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. JSONSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. JiraLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. JiraObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. JiraSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. LinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. LookupActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. MagentoLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MagentoObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MagentoSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MappingDataFlow.AsWranglingDataFlow() (*WranglingDataFlow, bool) +1. MariaDBLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MariaDBSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MariaDBTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MarketoLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MarketoObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MarketoSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MicrosoftAccessLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MicrosoftAccessSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MicrosoftAccessTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MongoDbAtlasCollectionDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MongoDbAtlasLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MongoDbAtlasSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MongoDbCollectionDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MongoDbLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MongoDbSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MongoDbV2CollectionDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. MongoDbV2LinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MongoDbV2Source.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MySQLLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. MySQLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. MySQLTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. NetezzaLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. NetezzaSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. NetezzaTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ODataLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ODataResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ODataSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. OdbcLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. OdbcSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. OdbcTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. Office365Dataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. Office365LinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. Office365Source.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. OracleCloudStorageLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. OracleLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. OracleServiceCloudLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. OracleServiceCloudObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. OracleServiceCloudSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. OracleSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. OracleTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. OrcDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. OrcSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ParquetDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ParquetSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. PaypalLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. PaypalObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. PaypalSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. PhoenixLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. PhoenixObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. PhoenixSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. PossibleAmazonRdsForOraclePartitionOptionValues() []AmazonRdsForOraclePartitionOption +1. PostgreSQLLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. PostgreSQLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. PostgreSQLTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. PrestoLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. PrestoObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. PrestoSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. QuickBooksLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. QuickBooksObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. QuickBooksSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. RelationalSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. RelationalTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ResponsysLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ResponsysObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ResponsysSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. RestResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. RestServiceLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. RestSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SQLDWSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SQLMISource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SQLServerLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SQLServerSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SQLServerStoredProcedureActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. SQLServerTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SQLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SalesforceLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SalesforceMarketingCloudLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SalesforceMarketingCloudObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SalesforceMarketingCloudSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SalesforceObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SalesforceServiceCloudLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SalesforceServiceCloudObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SalesforceServiceCloudSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SalesforceSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SapBWLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SapBwCubeDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SapBwSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SapCloudForCustomerLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SapCloudForCustomerResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SapCloudForCustomerSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SapEccLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SapEccResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SapEccSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SapHanaLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SapHanaSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SapHanaTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SapOpenHubLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SapOpenHubSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SapOpenHubTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SapTableLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SapTableResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SapTableSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ServiceNowLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ServiceNowObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ServiceNowSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SetVariableActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. SftpServerLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SharePointOnlineListLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SharePointOnlineListResourceDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SharePointOnlineListSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ShopifyLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ShopifyObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ShopifySource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SnowflakeDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SnowflakeLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SnowflakeSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SparkLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SparkObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SparkSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SquareLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SquareObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. SquareSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SwitchActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. SybaseLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. SybaseSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. SybaseTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. TabularSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. TeradataLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. TeradataSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. TeradataTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. UntilActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. ValidationActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. VerticaLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. VerticaSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. VerticaTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. WaitActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. WebActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. WebHookActivity.AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) +1. WebLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. WebSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. WebTableDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. WranglingDataFlow.AsBasicDataFlow() (BasicDataFlow, bool) +1. WranglingDataFlow.AsDataFlow() (*DataFlow, bool) +1. WranglingDataFlow.AsMappingDataFlow() (*MappingDataFlow, bool) +1. WranglingDataFlow.AsWranglingDataFlow() (*WranglingDataFlow, bool) +1. WranglingDataFlow.MarshalJSON() ([]byte, error) +1. XMLDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. XMLSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. XeroLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. XeroObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. XeroSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) +1. ZohoLinkedService.AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) +1. ZohoObjectDataset.AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) +1. ZohoSource.AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) ### Struct Changes #### New Structs -1. IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint -1. IntegrationRuntimeOutboundNetworkDependenciesEndpoint -1. IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails -1. IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse - -#### New Struct Fields - -1. CosmosDbMongoDbAPILinkedServiceTypeProperties.IsServerVersionAbove32 -1. IntegrationRuntimeVNetProperties.SubnetID +1. AmazonRdsForLinkedServiceTypeProperties +1. AmazonRdsForOracleLinkedService +1. AmazonRdsForOraclePartitionSettings +1. AmazonRdsForOracleSource +1. AmazonRdsForOracleTableDataset +1. AmazonRdsForOracleTableDatasetTypeProperties +1. ExecutePowerQueryActivityTypeProperties +1. ExecuteWranglingDataflowActivity +1. PowerQuerySink +1. PowerQuerySource +1. PowerQueryTypeProperties +1. WranglingDataFlow diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/_meta.json b/services/datafactory/mgmt/2018-06-01/datafactory/_meta.json index 41aad660889b..bb4b0a65aca2 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/_meta.json +++ b/services/datafactory/mgmt/2018-06-01/datafactory/_meta.json @@ -1,5 +1,5 @@ { - "commit": "47545c5f0842f5be29529674a4609d75a973d783", + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", "readme": "/_/azure-rest-api-specs/specification/datafactory/resource-manager/readme.md", "tag": "package-2018-06", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/enums.go b/services/datafactory/mgmt/2018-06-01/datafactory/enums.go index 55e922962a28..2182646d4ef4 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/enums.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/enums.go @@ -6,6 +6,23 @@ package datafactory // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// AmazonRdsForOraclePartitionOption enumerates the values for amazon rds for oracle partition option. +type AmazonRdsForOraclePartitionOption string + +const ( + // AmazonRdsForOraclePartitionOptionDynamicRange ... + AmazonRdsForOraclePartitionOptionDynamicRange AmazonRdsForOraclePartitionOption = "DynamicRange" + // AmazonRdsForOraclePartitionOptionNone ... + AmazonRdsForOraclePartitionOptionNone AmazonRdsForOraclePartitionOption = "None" + // AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable ... + AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable AmazonRdsForOraclePartitionOption = "PhysicalPartitionsOfTable" +) + +// PossibleAmazonRdsForOraclePartitionOptionValues returns an array of possible values for the AmazonRdsForOraclePartitionOption const type. +func PossibleAmazonRdsForOraclePartitionOptionValues() []AmazonRdsForOraclePartitionOption { + return []AmazonRdsForOraclePartitionOption{AmazonRdsForOraclePartitionOptionDynamicRange, AmazonRdsForOraclePartitionOptionNone, AmazonRdsForOraclePartitionOptionPhysicalPartitionsOfTable} +} + // AuthenticationType enumerates the values for authentication type. type AuthenticationType string @@ -1717,6 +1734,8 @@ const ( TypeBasicActivityTypeExecutePipeline TypeBasicActivity = "ExecutePipeline" // TypeBasicActivityTypeExecuteSSISPackage ... TypeBasicActivityTypeExecuteSSISPackage TypeBasicActivity = "ExecuteSSISPackage" + // TypeBasicActivityTypeExecuteWranglingDataflow ... + TypeBasicActivityTypeExecuteWranglingDataflow TypeBasicActivity = "ExecuteWranglingDataflow" // TypeBasicActivityTypeExecution ... TypeBasicActivityTypeExecution TypeBasicActivity = "Execution" // TypeBasicActivityTypeFilter ... @@ -1759,7 +1778,7 @@ const ( // PossibleTypeBasicActivityValues returns an array of possible values for the TypeBasicActivity const type. func PossibleTypeBasicActivityValues() []TypeBasicActivity { - return []TypeBasicActivity{TypeBasicActivityTypeActivity, TypeBasicActivityTypeAppendVariable, TypeBasicActivityTypeAzureDataExplorerCommand, TypeBasicActivityTypeAzureFunctionActivity, TypeBasicActivityTypeAzureMLBatchExecution, TypeBasicActivityTypeAzureMLExecutePipeline, TypeBasicActivityTypeAzureMLUpdateResource, TypeBasicActivityTypeContainer, TypeBasicActivityTypeCopy, TypeBasicActivityTypeCustom, TypeBasicActivityTypeDatabricksNotebook, TypeBasicActivityTypeDatabricksSparkJar, TypeBasicActivityTypeDatabricksSparkPython, TypeBasicActivityTypeDataLakeAnalyticsUSQL, TypeBasicActivityTypeDelete, TypeBasicActivityTypeExecuteDataFlow, TypeBasicActivityTypeExecutePipeline, TypeBasicActivityTypeExecuteSSISPackage, TypeBasicActivityTypeExecution, TypeBasicActivityTypeFilter, TypeBasicActivityTypeForEach, TypeBasicActivityTypeGetMetadata, TypeBasicActivityTypeHDInsightHive, TypeBasicActivityTypeHDInsightMapReduce, TypeBasicActivityTypeHDInsightPig, TypeBasicActivityTypeHDInsightSpark, TypeBasicActivityTypeHDInsightStreaming, TypeBasicActivityTypeIfCondition, TypeBasicActivityTypeLookup, TypeBasicActivityTypeSetVariable, TypeBasicActivityTypeSQLServerStoredProcedure, TypeBasicActivityTypeSwitch, TypeBasicActivityTypeUntil, TypeBasicActivityTypeValidation, TypeBasicActivityTypeWait, TypeBasicActivityTypeWebActivity, TypeBasicActivityTypeWebHook} + return []TypeBasicActivity{TypeBasicActivityTypeActivity, TypeBasicActivityTypeAppendVariable, TypeBasicActivityTypeAzureDataExplorerCommand, TypeBasicActivityTypeAzureFunctionActivity, TypeBasicActivityTypeAzureMLBatchExecution, TypeBasicActivityTypeAzureMLExecutePipeline, TypeBasicActivityTypeAzureMLUpdateResource, TypeBasicActivityTypeContainer, TypeBasicActivityTypeCopy, TypeBasicActivityTypeCustom, TypeBasicActivityTypeDatabricksNotebook, TypeBasicActivityTypeDatabricksSparkJar, TypeBasicActivityTypeDatabricksSparkPython, TypeBasicActivityTypeDataLakeAnalyticsUSQL, TypeBasicActivityTypeDelete, TypeBasicActivityTypeExecuteDataFlow, TypeBasicActivityTypeExecutePipeline, TypeBasicActivityTypeExecuteSSISPackage, TypeBasicActivityTypeExecuteWranglingDataflow, TypeBasicActivityTypeExecution, TypeBasicActivityTypeFilter, TypeBasicActivityTypeForEach, TypeBasicActivityTypeGetMetadata, TypeBasicActivityTypeHDInsightHive, TypeBasicActivityTypeHDInsightMapReduce, TypeBasicActivityTypeHDInsightPig, TypeBasicActivityTypeHDInsightSpark, TypeBasicActivityTypeHDInsightStreaming, TypeBasicActivityTypeIfCondition, TypeBasicActivityTypeLookup, TypeBasicActivityTypeSetVariable, TypeBasicActivityTypeSQLServerStoredProcedure, TypeBasicActivityTypeSwitch, TypeBasicActivityTypeUntil, TypeBasicActivityTypeValidation, TypeBasicActivityTypeWait, TypeBasicActivityTypeWebActivity, TypeBasicActivityTypeWebHook} } // TypeBasicCompressionReadSettings enumerates the values for type basic compression read settings. @@ -1878,6 +1897,8 @@ type TypeBasicCopySource string const ( // TypeBasicCopySourceTypeAmazonMWSSource ... TypeBasicCopySourceTypeAmazonMWSSource TypeBasicCopySource = "AmazonMWSSource" + // TypeBasicCopySourceTypeAmazonRdsForOracleSource ... + TypeBasicCopySourceTypeAmazonRdsForOracleSource TypeBasicCopySource = "AmazonRdsForOracleSource" // TypeBasicCopySourceTypeAmazonRedshiftSource ... TypeBasicCopySourceTypeAmazonRedshiftSource TypeBasicCopySource = "AmazonRedshiftSource" // TypeBasicCopySourceTypeAvroSource ... @@ -2068,7 +2089,7 @@ const ( // PossibleTypeBasicCopySourceValues returns an array of possible values for the TypeBasicCopySource const type. func PossibleTypeBasicCopySourceValues() []TypeBasicCopySource { - return []TypeBasicCopySource{TypeBasicCopySourceTypeAmazonMWSSource, TypeBasicCopySourceTypeAmazonRedshiftSource, TypeBasicCopySourceTypeAvroSource, TypeBasicCopySourceTypeAzureBlobFSSource, TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource, TypeBasicCopySourceTypeAzureDataExplorerSource, TypeBasicCopySourceTypeAzureDataLakeStoreSource, TypeBasicCopySourceTypeAzureMariaDBSource, TypeBasicCopySourceTypeAzureMySQLSource, TypeBasicCopySourceTypeAzurePostgreSQLSource, TypeBasicCopySourceTypeAzureSQLSource, TypeBasicCopySourceTypeAzureTableSource, TypeBasicCopySourceTypeBinarySource, TypeBasicCopySourceTypeBlobSource, TypeBasicCopySourceTypeCassandraSource, TypeBasicCopySourceTypeCommonDataServiceForAppsSource, TypeBasicCopySourceTypeConcurSource, TypeBasicCopySourceTypeCopySource, TypeBasicCopySourceTypeCosmosDbMongoDbAPISource, TypeBasicCopySourceTypeCosmosDbSQLAPISource, TypeBasicCopySourceTypeCouchbaseSource, TypeBasicCopySourceTypeDb2Source, TypeBasicCopySourceTypeDelimitedTextSource, TypeBasicCopySourceTypeDocumentDbCollectionSource, TypeBasicCopySourceTypeDrillSource, TypeBasicCopySourceTypeDynamicsAXSource, TypeBasicCopySourceTypeDynamicsCrmSource, TypeBasicCopySourceTypeDynamicsSource, TypeBasicCopySourceTypeEloquaSource, TypeBasicCopySourceTypeExcelSource, TypeBasicCopySourceTypeFileSystemSource, TypeBasicCopySourceTypeGoogleAdWordsSource, TypeBasicCopySourceTypeGoogleBigQuerySource, TypeBasicCopySourceTypeGreenplumSource, TypeBasicCopySourceTypeHBaseSource, TypeBasicCopySourceTypeHdfsSource, TypeBasicCopySourceTypeHiveSource, TypeBasicCopySourceTypeHTTPSource, TypeBasicCopySourceTypeHubspotSource, TypeBasicCopySourceTypeImpalaSource, TypeBasicCopySourceTypeInformixSource, TypeBasicCopySourceTypeJiraSource, TypeBasicCopySourceTypeJSONSource, TypeBasicCopySourceTypeMagentoSource, TypeBasicCopySourceTypeMariaDBSource, TypeBasicCopySourceTypeMarketoSource, TypeBasicCopySourceTypeMicrosoftAccessSource, TypeBasicCopySourceTypeMongoDbAtlasSource, TypeBasicCopySourceTypeMongoDbSource, TypeBasicCopySourceTypeMongoDbV2Source, TypeBasicCopySourceTypeMySQLSource, TypeBasicCopySourceTypeNetezzaSource, TypeBasicCopySourceTypeODataSource, TypeBasicCopySourceTypeOdbcSource, TypeBasicCopySourceTypeOffice365Source, TypeBasicCopySourceTypeOracleServiceCloudSource, TypeBasicCopySourceTypeOracleSource, TypeBasicCopySourceTypeOrcSource, TypeBasicCopySourceTypeParquetSource, TypeBasicCopySourceTypePaypalSource, TypeBasicCopySourceTypePhoenixSource, TypeBasicCopySourceTypePostgreSQLSource, TypeBasicCopySourceTypePrestoSource, TypeBasicCopySourceTypeQuickBooksSource, TypeBasicCopySourceTypeRelationalSource, TypeBasicCopySourceTypeResponsysSource, TypeBasicCopySourceTypeRestSource, TypeBasicCopySourceTypeSalesforceMarketingCloudSource, TypeBasicCopySourceTypeSalesforceServiceCloudSource, TypeBasicCopySourceTypeSalesforceSource, TypeBasicCopySourceTypeSapBwSource, TypeBasicCopySourceTypeSapCloudForCustomerSource, TypeBasicCopySourceTypeSapEccSource, TypeBasicCopySourceTypeSapHanaSource, TypeBasicCopySourceTypeSapOpenHubSource, TypeBasicCopySourceTypeSapTableSource, TypeBasicCopySourceTypeServiceNowSource, TypeBasicCopySourceTypeSharePointOnlineListSource, TypeBasicCopySourceTypeShopifySource, TypeBasicCopySourceTypeSnowflakeSource, TypeBasicCopySourceTypeSparkSource, TypeBasicCopySourceTypeSQLDWSource, TypeBasicCopySourceTypeSQLMISource, TypeBasicCopySourceTypeSQLServerSource, TypeBasicCopySourceTypeSQLSource, TypeBasicCopySourceTypeSquareSource, TypeBasicCopySourceTypeSybaseSource, TypeBasicCopySourceTypeTabularSource, TypeBasicCopySourceTypeTeradataSource, TypeBasicCopySourceTypeVerticaSource, TypeBasicCopySourceTypeWebSource, TypeBasicCopySourceTypeXeroSource, TypeBasicCopySourceTypeXMLSource, TypeBasicCopySourceTypeZohoSource} + return []TypeBasicCopySource{TypeBasicCopySourceTypeAmazonMWSSource, TypeBasicCopySourceTypeAmazonRdsForOracleSource, TypeBasicCopySourceTypeAmazonRedshiftSource, TypeBasicCopySourceTypeAvroSource, TypeBasicCopySourceTypeAzureBlobFSSource, TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource, TypeBasicCopySourceTypeAzureDataExplorerSource, TypeBasicCopySourceTypeAzureDataLakeStoreSource, TypeBasicCopySourceTypeAzureMariaDBSource, TypeBasicCopySourceTypeAzureMySQLSource, TypeBasicCopySourceTypeAzurePostgreSQLSource, TypeBasicCopySourceTypeAzureSQLSource, TypeBasicCopySourceTypeAzureTableSource, TypeBasicCopySourceTypeBinarySource, TypeBasicCopySourceTypeBlobSource, TypeBasicCopySourceTypeCassandraSource, TypeBasicCopySourceTypeCommonDataServiceForAppsSource, TypeBasicCopySourceTypeConcurSource, TypeBasicCopySourceTypeCopySource, TypeBasicCopySourceTypeCosmosDbMongoDbAPISource, TypeBasicCopySourceTypeCosmosDbSQLAPISource, TypeBasicCopySourceTypeCouchbaseSource, TypeBasicCopySourceTypeDb2Source, TypeBasicCopySourceTypeDelimitedTextSource, TypeBasicCopySourceTypeDocumentDbCollectionSource, TypeBasicCopySourceTypeDrillSource, TypeBasicCopySourceTypeDynamicsAXSource, TypeBasicCopySourceTypeDynamicsCrmSource, TypeBasicCopySourceTypeDynamicsSource, TypeBasicCopySourceTypeEloquaSource, TypeBasicCopySourceTypeExcelSource, TypeBasicCopySourceTypeFileSystemSource, TypeBasicCopySourceTypeGoogleAdWordsSource, TypeBasicCopySourceTypeGoogleBigQuerySource, TypeBasicCopySourceTypeGreenplumSource, TypeBasicCopySourceTypeHBaseSource, TypeBasicCopySourceTypeHdfsSource, TypeBasicCopySourceTypeHiveSource, TypeBasicCopySourceTypeHTTPSource, TypeBasicCopySourceTypeHubspotSource, TypeBasicCopySourceTypeImpalaSource, TypeBasicCopySourceTypeInformixSource, TypeBasicCopySourceTypeJiraSource, TypeBasicCopySourceTypeJSONSource, TypeBasicCopySourceTypeMagentoSource, TypeBasicCopySourceTypeMariaDBSource, TypeBasicCopySourceTypeMarketoSource, TypeBasicCopySourceTypeMicrosoftAccessSource, TypeBasicCopySourceTypeMongoDbAtlasSource, TypeBasicCopySourceTypeMongoDbSource, TypeBasicCopySourceTypeMongoDbV2Source, TypeBasicCopySourceTypeMySQLSource, TypeBasicCopySourceTypeNetezzaSource, TypeBasicCopySourceTypeODataSource, TypeBasicCopySourceTypeOdbcSource, TypeBasicCopySourceTypeOffice365Source, TypeBasicCopySourceTypeOracleServiceCloudSource, TypeBasicCopySourceTypeOracleSource, TypeBasicCopySourceTypeOrcSource, TypeBasicCopySourceTypeParquetSource, TypeBasicCopySourceTypePaypalSource, TypeBasicCopySourceTypePhoenixSource, TypeBasicCopySourceTypePostgreSQLSource, TypeBasicCopySourceTypePrestoSource, TypeBasicCopySourceTypeQuickBooksSource, TypeBasicCopySourceTypeRelationalSource, TypeBasicCopySourceTypeResponsysSource, TypeBasicCopySourceTypeRestSource, TypeBasicCopySourceTypeSalesforceMarketingCloudSource, TypeBasicCopySourceTypeSalesforceServiceCloudSource, TypeBasicCopySourceTypeSalesforceSource, TypeBasicCopySourceTypeSapBwSource, TypeBasicCopySourceTypeSapCloudForCustomerSource, TypeBasicCopySourceTypeSapEccSource, TypeBasicCopySourceTypeSapHanaSource, TypeBasicCopySourceTypeSapOpenHubSource, TypeBasicCopySourceTypeSapTableSource, TypeBasicCopySourceTypeServiceNowSource, TypeBasicCopySourceTypeSharePointOnlineListSource, TypeBasicCopySourceTypeShopifySource, TypeBasicCopySourceTypeSnowflakeSource, TypeBasicCopySourceTypeSparkSource, TypeBasicCopySourceTypeSQLDWSource, TypeBasicCopySourceTypeSQLMISource, TypeBasicCopySourceTypeSQLServerSource, TypeBasicCopySourceTypeSQLSource, TypeBasicCopySourceTypeSquareSource, TypeBasicCopySourceTypeSybaseSource, TypeBasicCopySourceTypeTabularSource, TypeBasicCopySourceTypeTeradataSource, TypeBasicCopySourceTypeVerticaSource, TypeBasicCopySourceTypeWebSource, TypeBasicCopySourceTypeXeroSource, TypeBasicCopySourceTypeXMLSource, TypeBasicCopySourceTypeZohoSource} } // TypeBasicCopyTranslator enumerates the values for type basic copy translator. @@ -2132,11 +2153,13 @@ const ( TypeBasicDataFlowTypeDataFlow TypeBasicDataFlow = "DataFlow" // TypeBasicDataFlowTypeMappingDataFlow ... TypeBasicDataFlowTypeMappingDataFlow TypeBasicDataFlow = "MappingDataFlow" + // TypeBasicDataFlowTypeWranglingDataFlow ... + TypeBasicDataFlowTypeWranglingDataFlow TypeBasicDataFlow = "WranglingDataFlow" ) // PossibleTypeBasicDataFlowValues returns an array of possible values for the TypeBasicDataFlow const type. func PossibleTypeBasicDataFlowValues() []TypeBasicDataFlow { - return []TypeBasicDataFlow{TypeBasicDataFlowTypeDataFlow, TypeBasicDataFlowTypeMappingDataFlow} + return []TypeBasicDataFlow{TypeBasicDataFlowTypeDataFlow, TypeBasicDataFlowTypeMappingDataFlow, TypeBasicDataFlowTypeWranglingDataFlow} } // TypeBasicDataset enumerates the values for type basic dataset. @@ -2145,6 +2168,8 @@ type TypeBasicDataset string const ( // TypeBasicDatasetTypeAmazonMWSObject ... TypeBasicDatasetTypeAmazonMWSObject TypeBasicDataset = "AmazonMWSObject" + // TypeBasicDatasetTypeAmazonRdsForOracleTable ... + TypeBasicDatasetTypeAmazonRdsForOracleTable TypeBasicDataset = "AmazonRdsForOracleTable" // TypeBasicDatasetTypeAmazonRedshiftTable ... TypeBasicDatasetTypeAmazonRedshiftTable TypeBasicDataset = "AmazonRedshiftTable" // TypeBasicDatasetTypeAmazonS3Object ... @@ -2335,7 +2360,7 @@ const ( // PossibleTypeBasicDatasetValues returns an array of possible values for the TypeBasicDataset const type. func PossibleTypeBasicDatasetValues() []TypeBasicDataset { - return []TypeBasicDataset{TypeBasicDatasetTypeAmazonMWSObject, TypeBasicDatasetTypeAmazonRedshiftTable, TypeBasicDatasetTypeAmazonS3Object, TypeBasicDatasetTypeAvro, TypeBasicDatasetTypeAzureBlob, TypeBasicDatasetTypeAzureBlobFSFile, TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset, TypeBasicDatasetTypeAzureDataExplorerTable, TypeBasicDatasetTypeAzureDataLakeStoreFile, TypeBasicDatasetTypeAzureMariaDBTable, TypeBasicDatasetTypeAzureMySQLTable, TypeBasicDatasetTypeAzurePostgreSQLTable, TypeBasicDatasetTypeAzureSearchIndex, TypeBasicDatasetTypeAzureSQLDWTable, TypeBasicDatasetTypeAzureSQLMITable, TypeBasicDatasetTypeAzureSQLTable, TypeBasicDatasetTypeAzureTable, TypeBasicDatasetTypeBinary, TypeBasicDatasetTypeCassandraTable, TypeBasicDatasetTypeCommonDataServiceForAppsEntity, TypeBasicDatasetTypeConcurObject, TypeBasicDatasetTypeCosmosDbMongoDbAPICollection, TypeBasicDatasetTypeCosmosDbSQLAPICollection, TypeBasicDatasetTypeCouchbaseTable, TypeBasicDatasetTypeCustomDataset, TypeBasicDatasetTypeDataset, TypeBasicDatasetTypeDb2Table, TypeBasicDatasetTypeDelimitedText, TypeBasicDatasetTypeDocumentDbCollection, TypeBasicDatasetTypeDrillTable, TypeBasicDatasetTypeDynamicsAXResource, TypeBasicDatasetTypeDynamicsCrmEntity, TypeBasicDatasetTypeDynamicsEntity, TypeBasicDatasetTypeEloquaObject, TypeBasicDatasetTypeExcel, TypeBasicDatasetTypeFileShare, TypeBasicDatasetTypeGoogleAdWordsObject, TypeBasicDatasetTypeGoogleBigQueryObject, TypeBasicDatasetTypeGreenplumTable, TypeBasicDatasetTypeHBaseObject, TypeBasicDatasetTypeHiveObject, TypeBasicDatasetTypeHTTPFile, TypeBasicDatasetTypeHubspotObject, TypeBasicDatasetTypeImpalaObject, TypeBasicDatasetTypeInformixTable, TypeBasicDatasetTypeJiraObject, TypeBasicDatasetTypeJSON, TypeBasicDatasetTypeMagentoObject, TypeBasicDatasetTypeMariaDBTable, TypeBasicDatasetTypeMarketoObject, TypeBasicDatasetTypeMicrosoftAccessTable, TypeBasicDatasetTypeMongoDbAtlasCollection, TypeBasicDatasetTypeMongoDbCollection, TypeBasicDatasetTypeMongoDbV2Collection, TypeBasicDatasetTypeMySQLTable, TypeBasicDatasetTypeNetezzaTable, TypeBasicDatasetTypeODataResource, TypeBasicDatasetTypeOdbcTable, TypeBasicDatasetTypeOffice365Table, TypeBasicDatasetTypeOracleServiceCloudObject, TypeBasicDatasetTypeOracleTable, TypeBasicDatasetTypeOrc, TypeBasicDatasetTypeParquet, TypeBasicDatasetTypePaypalObject, TypeBasicDatasetTypePhoenixObject, TypeBasicDatasetTypePostgreSQLTable, TypeBasicDatasetTypePrestoObject, TypeBasicDatasetTypeQuickBooksObject, TypeBasicDatasetTypeRelationalTable, TypeBasicDatasetTypeResponsysObject, TypeBasicDatasetTypeRestResource, TypeBasicDatasetTypeSalesforceMarketingCloudObject, TypeBasicDatasetTypeSalesforceObject, TypeBasicDatasetTypeSalesforceServiceCloudObject, TypeBasicDatasetTypeSapBwCube, TypeBasicDatasetTypeSapCloudForCustomerResource, TypeBasicDatasetTypeSapEccResource, TypeBasicDatasetTypeSapHanaTable, TypeBasicDatasetTypeSapOpenHubTable, TypeBasicDatasetTypeSapTableResource, TypeBasicDatasetTypeServiceNowObject, TypeBasicDatasetTypeSharePointOnlineListResource, TypeBasicDatasetTypeShopifyObject, TypeBasicDatasetTypeSnowflakeTable, TypeBasicDatasetTypeSparkObject, TypeBasicDatasetTypeSQLServerTable, TypeBasicDatasetTypeSquareObject, TypeBasicDatasetTypeSybaseTable, TypeBasicDatasetTypeTeradataTable, TypeBasicDatasetTypeVerticaTable, TypeBasicDatasetTypeWebTable, TypeBasicDatasetTypeXeroObject, TypeBasicDatasetTypeXML, TypeBasicDatasetTypeZohoObject} + return []TypeBasicDataset{TypeBasicDatasetTypeAmazonMWSObject, TypeBasicDatasetTypeAmazonRdsForOracleTable, TypeBasicDatasetTypeAmazonRedshiftTable, TypeBasicDatasetTypeAmazonS3Object, TypeBasicDatasetTypeAvro, TypeBasicDatasetTypeAzureBlob, TypeBasicDatasetTypeAzureBlobFSFile, TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset, TypeBasicDatasetTypeAzureDataExplorerTable, TypeBasicDatasetTypeAzureDataLakeStoreFile, TypeBasicDatasetTypeAzureMariaDBTable, TypeBasicDatasetTypeAzureMySQLTable, TypeBasicDatasetTypeAzurePostgreSQLTable, TypeBasicDatasetTypeAzureSearchIndex, TypeBasicDatasetTypeAzureSQLDWTable, TypeBasicDatasetTypeAzureSQLMITable, TypeBasicDatasetTypeAzureSQLTable, TypeBasicDatasetTypeAzureTable, TypeBasicDatasetTypeBinary, TypeBasicDatasetTypeCassandraTable, TypeBasicDatasetTypeCommonDataServiceForAppsEntity, TypeBasicDatasetTypeConcurObject, TypeBasicDatasetTypeCosmosDbMongoDbAPICollection, TypeBasicDatasetTypeCosmosDbSQLAPICollection, TypeBasicDatasetTypeCouchbaseTable, TypeBasicDatasetTypeCustomDataset, TypeBasicDatasetTypeDataset, TypeBasicDatasetTypeDb2Table, TypeBasicDatasetTypeDelimitedText, TypeBasicDatasetTypeDocumentDbCollection, TypeBasicDatasetTypeDrillTable, TypeBasicDatasetTypeDynamicsAXResource, TypeBasicDatasetTypeDynamicsCrmEntity, TypeBasicDatasetTypeDynamicsEntity, TypeBasicDatasetTypeEloquaObject, TypeBasicDatasetTypeExcel, TypeBasicDatasetTypeFileShare, TypeBasicDatasetTypeGoogleAdWordsObject, TypeBasicDatasetTypeGoogleBigQueryObject, TypeBasicDatasetTypeGreenplumTable, TypeBasicDatasetTypeHBaseObject, TypeBasicDatasetTypeHiveObject, TypeBasicDatasetTypeHTTPFile, TypeBasicDatasetTypeHubspotObject, TypeBasicDatasetTypeImpalaObject, TypeBasicDatasetTypeInformixTable, TypeBasicDatasetTypeJiraObject, TypeBasicDatasetTypeJSON, TypeBasicDatasetTypeMagentoObject, TypeBasicDatasetTypeMariaDBTable, TypeBasicDatasetTypeMarketoObject, TypeBasicDatasetTypeMicrosoftAccessTable, TypeBasicDatasetTypeMongoDbAtlasCollection, TypeBasicDatasetTypeMongoDbCollection, TypeBasicDatasetTypeMongoDbV2Collection, TypeBasicDatasetTypeMySQLTable, TypeBasicDatasetTypeNetezzaTable, TypeBasicDatasetTypeODataResource, TypeBasicDatasetTypeOdbcTable, TypeBasicDatasetTypeOffice365Table, TypeBasicDatasetTypeOracleServiceCloudObject, TypeBasicDatasetTypeOracleTable, TypeBasicDatasetTypeOrc, TypeBasicDatasetTypeParquet, TypeBasicDatasetTypePaypalObject, TypeBasicDatasetTypePhoenixObject, TypeBasicDatasetTypePostgreSQLTable, TypeBasicDatasetTypePrestoObject, TypeBasicDatasetTypeQuickBooksObject, TypeBasicDatasetTypeRelationalTable, TypeBasicDatasetTypeResponsysObject, TypeBasicDatasetTypeRestResource, TypeBasicDatasetTypeSalesforceMarketingCloudObject, TypeBasicDatasetTypeSalesforceObject, TypeBasicDatasetTypeSalesforceServiceCloudObject, TypeBasicDatasetTypeSapBwCube, TypeBasicDatasetTypeSapCloudForCustomerResource, TypeBasicDatasetTypeSapEccResource, TypeBasicDatasetTypeSapHanaTable, TypeBasicDatasetTypeSapOpenHubTable, TypeBasicDatasetTypeSapTableResource, TypeBasicDatasetTypeServiceNowObject, TypeBasicDatasetTypeSharePointOnlineListResource, TypeBasicDatasetTypeShopifyObject, TypeBasicDatasetTypeSnowflakeTable, TypeBasicDatasetTypeSparkObject, TypeBasicDatasetTypeSQLServerTable, TypeBasicDatasetTypeSquareObject, TypeBasicDatasetTypeSybaseTable, TypeBasicDatasetTypeTeradataTable, TypeBasicDatasetTypeVerticaTable, TypeBasicDatasetTypeWebTable, TypeBasicDatasetTypeXeroObject, TypeBasicDatasetTypeXML, TypeBasicDatasetTypeZohoObject} } // TypeBasicDatasetCompression enumerates the values for type basic dataset compression. @@ -2579,6 +2604,8 @@ type TypeBasicLinkedService string const ( // TypeBasicLinkedServiceTypeAmazonMWS ... TypeBasicLinkedServiceTypeAmazonMWS TypeBasicLinkedService = "AmazonMWS" + // TypeBasicLinkedServiceTypeAmazonRdsForOracle ... + TypeBasicLinkedServiceTypeAmazonRdsForOracle TypeBasicLinkedService = "AmazonRdsForOracle" // TypeBasicLinkedServiceTypeAmazonRedshift ... TypeBasicLinkedServiceTypeAmazonRedshift TypeBasicLinkedService = "AmazonRedshift" // TypeBasicLinkedServiceTypeAmazonS3 ... @@ -2783,7 +2810,7 @@ const ( // PossibleTypeBasicLinkedServiceValues returns an array of possible values for the TypeBasicLinkedService const type. func PossibleTypeBasicLinkedServiceValues() []TypeBasicLinkedService { - return []TypeBasicLinkedService{TypeBasicLinkedServiceTypeAmazonMWS, TypeBasicLinkedServiceTypeAmazonRedshift, TypeBasicLinkedServiceTypeAmazonS3, TypeBasicLinkedServiceTypeAmazonS3Compatible, TypeBasicLinkedServiceTypeAzureBatch, TypeBasicLinkedServiceTypeAzureBlobFS, TypeBasicLinkedServiceTypeAzureBlobStorage, TypeBasicLinkedServiceTypeAzureDatabricks, TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake, TypeBasicLinkedServiceTypeAzureDataExplorer, TypeBasicLinkedServiceTypeAzureDataLakeAnalytics, TypeBasicLinkedServiceTypeAzureDataLakeStore, TypeBasicLinkedServiceTypeAzureFileStorage, TypeBasicLinkedServiceTypeAzureFunction, TypeBasicLinkedServiceTypeAzureKeyVault, TypeBasicLinkedServiceTypeAzureMariaDB, TypeBasicLinkedServiceTypeAzureML, TypeBasicLinkedServiceTypeAzureMLService, TypeBasicLinkedServiceTypeAzureMySQL, TypeBasicLinkedServiceTypeAzurePostgreSQL, TypeBasicLinkedServiceTypeAzureSearch, TypeBasicLinkedServiceTypeAzureSQLDatabase, TypeBasicLinkedServiceTypeAzureSQLDW, TypeBasicLinkedServiceTypeAzureSQLMI, TypeBasicLinkedServiceTypeAzureStorage, TypeBasicLinkedServiceTypeAzureTableStorage, TypeBasicLinkedServiceTypeCassandra, TypeBasicLinkedServiceTypeCommonDataServiceForApps, TypeBasicLinkedServiceTypeConcur, TypeBasicLinkedServiceTypeCosmosDb, TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI, TypeBasicLinkedServiceTypeCouchbase, TypeBasicLinkedServiceTypeCustomDataSource, TypeBasicLinkedServiceTypeDb2, TypeBasicLinkedServiceTypeDrill, TypeBasicLinkedServiceTypeDynamics, TypeBasicLinkedServiceTypeDynamicsAX, TypeBasicLinkedServiceTypeDynamicsCrm, TypeBasicLinkedServiceTypeEloqua, TypeBasicLinkedServiceTypeFileServer, TypeBasicLinkedServiceTypeFtpServer, TypeBasicLinkedServiceTypeGoogleAdWords, TypeBasicLinkedServiceTypeGoogleBigQuery, TypeBasicLinkedServiceTypeGoogleCloudStorage, TypeBasicLinkedServiceTypeGreenplum, TypeBasicLinkedServiceTypeHBase, TypeBasicLinkedServiceTypeHdfs, TypeBasicLinkedServiceTypeHDInsight, TypeBasicLinkedServiceTypeHDInsightOnDemand, TypeBasicLinkedServiceTypeHive, TypeBasicLinkedServiceTypeHTTPServer, TypeBasicLinkedServiceTypeHubspot, TypeBasicLinkedServiceTypeImpala, TypeBasicLinkedServiceTypeInformix, TypeBasicLinkedServiceTypeJira, TypeBasicLinkedServiceTypeLinkedService, TypeBasicLinkedServiceTypeMagento, TypeBasicLinkedServiceTypeMariaDB, TypeBasicLinkedServiceTypeMarketo, TypeBasicLinkedServiceTypeMicrosoftAccess, TypeBasicLinkedServiceTypeMongoDb, TypeBasicLinkedServiceTypeMongoDbAtlas, TypeBasicLinkedServiceTypeMongoDbV2, TypeBasicLinkedServiceTypeMySQL, TypeBasicLinkedServiceTypeNetezza, TypeBasicLinkedServiceTypeOData, TypeBasicLinkedServiceTypeOdbc, TypeBasicLinkedServiceTypeOffice365, TypeBasicLinkedServiceTypeOracle, TypeBasicLinkedServiceTypeOracleCloudStorage, TypeBasicLinkedServiceTypeOracleServiceCloud, TypeBasicLinkedServiceTypePaypal, TypeBasicLinkedServiceTypePhoenix, TypeBasicLinkedServiceTypePostgreSQL, TypeBasicLinkedServiceTypePresto, TypeBasicLinkedServiceTypeQuickBooks, TypeBasicLinkedServiceTypeResponsys, TypeBasicLinkedServiceTypeRestService, TypeBasicLinkedServiceTypeSalesforce, TypeBasicLinkedServiceTypeSalesforceMarketingCloud, TypeBasicLinkedServiceTypeSalesforceServiceCloud, TypeBasicLinkedServiceTypeSapBW, TypeBasicLinkedServiceTypeSapCloudForCustomer, TypeBasicLinkedServiceTypeSapEcc, TypeBasicLinkedServiceTypeSapHana, TypeBasicLinkedServiceTypeSapOpenHub, TypeBasicLinkedServiceTypeSapTable, TypeBasicLinkedServiceTypeServiceNow, TypeBasicLinkedServiceTypeSftp, TypeBasicLinkedServiceTypeSharePointOnlineList, TypeBasicLinkedServiceTypeShopify, TypeBasicLinkedServiceTypeSnowflake, TypeBasicLinkedServiceTypeSpark, TypeBasicLinkedServiceTypeSQLServer, TypeBasicLinkedServiceTypeSquare, TypeBasicLinkedServiceTypeSybase, TypeBasicLinkedServiceTypeTeradata, TypeBasicLinkedServiceTypeVertica, TypeBasicLinkedServiceTypeWeb, TypeBasicLinkedServiceTypeXero, TypeBasicLinkedServiceTypeZoho} + return []TypeBasicLinkedService{TypeBasicLinkedServiceTypeAmazonMWS, TypeBasicLinkedServiceTypeAmazonRdsForOracle, TypeBasicLinkedServiceTypeAmazonRedshift, TypeBasicLinkedServiceTypeAmazonS3, TypeBasicLinkedServiceTypeAmazonS3Compatible, TypeBasicLinkedServiceTypeAzureBatch, TypeBasicLinkedServiceTypeAzureBlobFS, TypeBasicLinkedServiceTypeAzureBlobStorage, TypeBasicLinkedServiceTypeAzureDatabricks, TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake, TypeBasicLinkedServiceTypeAzureDataExplorer, TypeBasicLinkedServiceTypeAzureDataLakeAnalytics, TypeBasicLinkedServiceTypeAzureDataLakeStore, TypeBasicLinkedServiceTypeAzureFileStorage, TypeBasicLinkedServiceTypeAzureFunction, TypeBasicLinkedServiceTypeAzureKeyVault, TypeBasicLinkedServiceTypeAzureMariaDB, TypeBasicLinkedServiceTypeAzureML, TypeBasicLinkedServiceTypeAzureMLService, TypeBasicLinkedServiceTypeAzureMySQL, TypeBasicLinkedServiceTypeAzurePostgreSQL, TypeBasicLinkedServiceTypeAzureSearch, TypeBasicLinkedServiceTypeAzureSQLDatabase, TypeBasicLinkedServiceTypeAzureSQLDW, TypeBasicLinkedServiceTypeAzureSQLMI, TypeBasicLinkedServiceTypeAzureStorage, TypeBasicLinkedServiceTypeAzureTableStorage, TypeBasicLinkedServiceTypeCassandra, TypeBasicLinkedServiceTypeCommonDataServiceForApps, TypeBasicLinkedServiceTypeConcur, TypeBasicLinkedServiceTypeCosmosDb, TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI, TypeBasicLinkedServiceTypeCouchbase, TypeBasicLinkedServiceTypeCustomDataSource, TypeBasicLinkedServiceTypeDb2, TypeBasicLinkedServiceTypeDrill, TypeBasicLinkedServiceTypeDynamics, TypeBasicLinkedServiceTypeDynamicsAX, TypeBasicLinkedServiceTypeDynamicsCrm, TypeBasicLinkedServiceTypeEloqua, TypeBasicLinkedServiceTypeFileServer, TypeBasicLinkedServiceTypeFtpServer, TypeBasicLinkedServiceTypeGoogleAdWords, TypeBasicLinkedServiceTypeGoogleBigQuery, TypeBasicLinkedServiceTypeGoogleCloudStorage, TypeBasicLinkedServiceTypeGreenplum, TypeBasicLinkedServiceTypeHBase, TypeBasicLinkedServiceTypeHdfs, TypeBasicLinkedServiceTypeHDInsight, TypeBasicLinkedServiceTypeHDInsightOnDemand, TypeBasicLinkedServiceTypeHive, TypeBasicLinkedServiceTypeHTTPServer, TypeBasicLinkedServiceTypeHubspot, TypeBasicLinkedServiceTypeImpala, TypeBasicLinkedServiceTypeInformix, TypeBasicLinkedServiceTypeJira, TypeBasicLinkedServiceTypeLinkedService, TypeBasicLinkedServiceTypeMagento, TypeBasicLinkedServiceTypeMariaDB, TypeBasicLinkedServiceTypeMarketo, TypeBasicLinkedServiceTypeMicrosoftAccess, TypeBasicLinkedServiceTypeMongoDb, TypeBasicLinkedServiceTypeMongoDbAtlas, TypeBasicLinkedServiceTypeMongoDbV2, TypeBasicLinkedServiceTypeMySQL, TypeBasicLinkedServiceTypeNetezza, TypeBasicLinkedServiceTypeOData, TypeBasicLinkedServiceTypeOdbc, TypeBasicLinkedServiceTypeOffice365, TypeBasicLinkedServiceTypeOracle, TypeBasicLinkedServiceTypeOracleCloudStorage, TypeBasicLinkedServiceTypeOracleServiceCloud, TypeBasicLinkedServiceTypePaypal, TypeBasicLinkedServiceTypePhoenix, TypeBasicLinkedServiceTypePostgreSQL, TypeBasicLinkedServiceTypePresto, TypeBasicLinkedServiceTypeQuickBooks, TypeBasicLinkedServiceTypeResponsys, TypeBasicLinkedServiceTypeRestService, TypeBasicLinkedServiceTypeSalesforce, TypeBasicLinkedServiceTypeSalesforceMarketingCloud, TypeBasicLinkedServiceTypeSalesforceServiceCloud, TypeBasicLinkedServiceTypeSapBW, TypeBasicLinkedServiceTypeSapCloudForCustomer, TypeBasicLinkedServiceTypeSapEcc, TypeBasicLinkedServiceTypeSapHana, TypeBasicLinkedServiceTypeSapOpenHub, TypeBasicLinkedServiceTypeSapTable, TypeBasicLinkedServiceTypeServiceNow, TypeBasicLinkedServiceTypeSftp, TypeBasicLinkedServiceTypeSharePointOnlineList, TypeBasicLinkedServiceTypeShopify, TypeBasicLinkedServiceTypeSnowflake, TypeBasicLinkedServiceTypeSpark, TypeBasicLinkedServiceTypeSQLServer, TypeBasicLinkedServiceTypeSquare, TypeBasicLinkedServiceTypeSybase, TypeBasicLinkedServiceTypeTeradata, TypeBasicLinkedServiceTypeVertica, TypeBasicLinkedServiceTypeWeb, TypeBasicLinkedServiceTypeXero, TypeBasicLinkedServiceTypeZoho} } // TypeBasicSsisObjectMetadata enumerates the values for type basic ssis object metadata. diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/models.go b/services/datafactory/mgmt/2018-06-01/datafactory/models.go index c1a4f3932d1f..ca50cd8c4ba2 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/models.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/models.go @@ -34,6 +34,7 @@ type AccessPolicyResponse struct { // BasicActivity a pipeline activity. type BasicActivity interface { + AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) AsAzureFunctionActivity() (*AzureFunctionActivity, bool) AsDatabricksSparkPythonActivity() (*DatabricksSparkPythonActivity, bool) @@ -87,7 +88,7 @@ type Activity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -99,6 +100,10 @@ func unmarshalBasicActivity(body []byte) (BasicActivity, error) { } switch m["type"] { + case string(TypeBasicActivityTypeExecuteWranglingDataflow): + var ewda ExecuteWranglingDataflowActivity + err := json.Unmarshal(body, &ewda) + return ewda, err case string(TypeBasicActivityTypeExecuteDataFlow): var edfa ExecuteDataFlowActivity err := json.Unmarshal(body, &edfa) @@ -293,6 +298,11 @@ func (a Activity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for Activity. +func (a Activity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for Activity. func (a Activity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -970,7 +980,7 @@ type AmazonMWSLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -1402,6 +1412,11 @@ func (amls AmazonMWSLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinke return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService. +func (amls AmazonMWSLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService. func (amls AmazonMWSLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -1740,7 +1755,7 @@ type AmazonMWSObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -2091,6 +2106,11 @@ func (amod AmazonMWSObjectDataset) AsTeradataTableDataset() (*TeradataTableDatas return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset. +func (amod AmazonMWSObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset. func (amod AmazonMWSObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -2382,7 +2402,7 @@ type AmazonMWSSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -2480,6 +2500,11 @@ func (ams AmazonMWSSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AmazonMWSSource. +func (ams AmazonMWSSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AmazonMWSSource. func (ams AmazonMWSSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -2999,6 +3024,2037 @@ func (ams *AmazonMWSSource) UnmarshalJSON(body []byte) error { return nil } +// AmazonRdsForLinkedServiceTypeProperties amazonRdsForOracle database linked service properties. +type AmazonRdsForLinkedServiceTypeProperties struct { + // ConnectionString - The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + ConnectionString interface{} `json:"connectionString,omitempty"` + // Password - The Azure key vault secret reference of password in connection string. + Password BasicSecretBase `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 AmazonRdsForLinkedServiceTypeProperties struct. +func (arflstp *AmazonRdsForLinkedServiceTypeProperties) 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 { + var connectionString interface{} + err = json.Unmarshal(*v, &connectionString) + if err != nil { + return err + } + arflstp.ConnectionString = connectionString + } + case "password": + if v != nil { + password, err := unmarshalBasicSecretBase(*v) + if err != nil { + return err + } + arflstp.Password = password + } + case "encryptedCredential": + if v != nil { + var encryptedCredential interface{} + err = json.Unmarshal(*v, &encryptedCredential) + if err != nil { + return err + } + arflstp.EncryptedCredential = encryptedCredential + } + } + } + + return nil +} + +// AmazonRdsForOracleLinkedService amazonRdsForOracle database. +type AmazonRdsForOracleLinkedService struct { + // AmazonRdsForLinkedServiceTypeProperties - AmazonRdsForOracle database linked service properties. + *AmazonRdsForLinkedServiceTypeProperties `json:"typeProperties,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // ConnectVia - The integration runtime reference. + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + // Description - Linked service description. + Description *string `json:"description,omitempty"` + // Parameters - Parameters for linked service. + Parameters map[string]*ParameterSpecification `json:"parameters"` + // Annotations - List of tags that can be used for describing the linked service. + Annotations *[]interface{} `json:"annotations,omitempty"` + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + Type TypeBasicLinkedService `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) MarshalJSON() ([]byte, error) { + arfols.Type = TypeBasicLinkedServiceTypeAmazonRdsForOracle + objectMap := make(map[string]interface{}) + if arfols.AmazonRdsForLinkedServiceTypeProperties != nil { + objectMap["typeProperties"] = arfols.AmazonRdsForLinkedServiceTypeProperties + } + if arfols.ConnectVia != nil { + objectMap["connectVia"] = arfols.ConnectVia + } + if arfols.Description != nil { + objectMap["description"] = arfols.Description + } + if arfols.Parameters != nil { + objectMap["parameters"] = arfols.Parameters + } + if arfols.Annotations != nil { + objectMap["annotations"] = arfols.Annotations + } + if arfols.Type != "" { + objectMap["type"] = arfols.Type + } + for k, v := range arfols.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsSharePointOnlineListLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSharePointOnlineListLinkedService() (*SharePointOnlineListLinkedService, bool) { + return nil, false +} + +// AsSnowflakeLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSnowflakeLinkedService() (*SnowflakeLinkedService, bool) { + return nil, false +} + +// AsAzureFunctionLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureFunctionLinkedService() (*AzureFunctionLinkedService, bool) { + return nil, false +} + +// AsAzureDataExplorerLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureDataExplorerLinkedService() (*AzureDataExplorerLinkedService, bool) { + return nil, false +} + +// AsSapTableLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSapTableLinkedService() (*SapTableLinkedService, bool) { + return nil, false +} + +// AsGoogleAdWordsLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsGoogleAdWordsLinkedService() (*GoogleAdWordsLinkedService, bool) { + return nil, false +} + +// AsOracleServiceCloudLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsOracleServiceCloudLinkedService() (*OracleServiceCloudLinkedService, bool) { + return nil, false +} + +// AsDynamicsAXLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsDynamicsAXLinkedService() (*DynamicsAXLinkedService, bool) { + return nil, false +} + +// AsResponsysLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) { + return nil, false +} + +// AsAzureDatabricksDeltaLakeLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureDatabricksDeltaLakeLinkedService() (*AzureDatabricksDeltaLakeLinkedService, bool) { + return nil, false +} + +// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) { + return nil, false +} + +// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) { + return nil, false +} + +// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) { + return nil, false +} + +// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) { + return nil, false +} + +// AsNetezzaLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) { + return nil, false +} + +// AsVerticaLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) { + return nil, false +} + +// AsZohoLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) { + return nil, false +} + +// AsXeroLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) { + return nil, false +} + +// AsSquareLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) { + return nil, false +} + +// AsSparkLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) { + return nil, false +} + +// AsShopifyLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) { + return nil, false +} + +// AsServiceNowLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) { + return nil, false +} + +// AsQuickBooksLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) { + return nil, false +} + +// AsPrestoLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) { + return nil, false +} + +// AsPhoenixLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) { + return nil, false +} + +// AsPaypalLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) { + return nil, false +} + +// AsMarketoLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) { + return nil, false +} + +// AsAzureMariaDBLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureMariaDBLinkedService() (*AzureMariaDBLinkedService, bool) { + return nil, false +} + +// AsMariaDBLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) { + return nil, false +} + +// AsMagentoLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) { + return nil, false +} + +// AsJiraLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) { + return nil, false +} + +// AsImpalaLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) { + return nil, false +} + +// AsHubspotLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) { + return nil, false +} + +// AsHiveLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) { + return nil, false +} + +// AsHBaseLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) { + return nil, false +} + +// AsGreenplumLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) { + return nil, false +} + +// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) { + return nil, false +} + +// AsEloquaLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) { + return nil, false +} + +// AsDrillLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) { + return nil, false +} + +// AsCouchbaseLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) { + return nil, false +} + +// AsConcurLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) { + return nil, false +} + +// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) { + return nil, false +} + +// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) { + return nil, false +} + +// AsSapHanaLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) { + return nil, false +} + +// AsSapBWLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) { + return nil, false +} + +// AsSftpServerLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) { + return nil, false +} + +// AsFtpServerLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) { + return nil, false +} + +// AsHTTPLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) { + return nil, false +} + +// AsAzureSearchLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) { + return nil, false +} + +// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) { + return nil, false +} + +// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) { + return nil, false +} + +// AsAmazonS3LinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) { + return nil, false +} + +// AsRestServiceLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsRestServiceLinkedService() (*RestServiceLinkedService, bool) { + return nil, false +} + +// AsSapOpenHubLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSapOpenHubLinkedService() (*SapOpenHubLinkedService, bool) { + return nil, false +} + +// AsSapEccLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) { + return nil, false +} + +// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) { + return nil, false +} + +// AsSalesforceServiceCloudLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSalesforceServiceCloudLinkedService() (*SalesforceServiceCloudLinkedService, bool) { + return nil, false +} + +// AsSalesforceLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) { + return nil, false +} + +// AsOffice365LinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsOffice365LinkedService() (*Office365LinkedService, bool) { + return nil, false +} + +// AsAzureBlobFSLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureBlobFSLinkedService() (*AzureBlobFSLinkedService, bool) { + return nil, false +} + +// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) { + return nil, false +} + +// AsCosmosDbMongoDbAPILinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsCosmosDbMongoDbAPILinkedService() (*CosmosDbMongoDbAPILinkedService, bool) { + return nil, false +} + +// AsMongoDbV2LinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMongoDbV2LinkedService() (*MongoDbV2LinkedService, bool) { + return nil, false +} + +// AsMongoDbAtlasLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMongoDbAtlasLinkedService() (*MongoDbAtlasLinkedService, bool) { + return nil, false +} + +// AsMongoDbLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) { + return nil, false +} + +// AsCassandraLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) { + return nil, false +} + +// AsWebLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsWebLinkedService() (*WebLinkedService, bool) { + return nil, false +} + +// AsODataLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) { + return nil, false +} + +// AsHdfsLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) { + return nil, false +} + +// AsMicrosoftAccessLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMicrosoftAccessLinkedService() (*MicrosoftAccessLinkedService, bool) { + return nil, false +} + +// AsInformixLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsInformixLinkedService() (*InformixLinkedService, bool) { + return nil, false +} + +// AsOdbcLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) { + return nil, false +} + +// AsAzureMLServiceLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureMLServiceLinkedService() (*AzureMLServiceLinkedService, bool) { + return nil, false +} + +// AsAzureMLLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) { + return nil, false +} + +// AsTeradataLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) { + return nil, false +} + +// AsDb2LinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) { + return nil, false +} + +// AsSybaseLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) { + return nil, false +} + +// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) { + return nil, false +} + +// AsMySQLLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) { + return nil, false +} + +// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) { + return nil, false +} + +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return &arfols, true +} + +// AsOracleLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { + return nil, false +} + +// AsGoogleCloudStorageLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsGoogleCloudStorageLinkedService() (*GoogleCloudStorageLinkedService, bool) { + return nil, false +} + +// AsOracleCloudStorageLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsOracleCloudStorageLinkedService() (*OracleCloudStorageLinkedService, bool) { + return nil, false +} + +// AsAmazonS3CompatibleLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAmazonS3CompatibleLinkedService() (*AmazonS3CompatibleLinkedService, bool) { + return nil, false +} + +// AsAzureFileStorageLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureFileStorageLinkedService() (*AzureFileStorageLinkedService, bool) { + return nil, false +} + +// AsFileServerLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) { + return nil, false +} + +// AsHDInsightLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) { + return nil, false +} + +// AsCommonDataServiceForAppsLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsCommonDataServiceForAppsLinkedService() (*CommonDataServiceForAppsLinkedService, bool) { + return nil, false +} + +// AsDynamicsCrmLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsDynamicsCrmLinkedService() (*DynamicsCrmLinkedService, bool) { + return nil, false +} + +// AsDynamicsLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) { + return nil, false +} + +// AsCosmosDbLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) { + return nil, false +} + +// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) { + return nil, false +} + +// AsAzureBatchLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) { + return nil, false +} + +// AsAzureSQLMILinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureSQLMILinkedService() (*AzureSQLMILinkedService, bool) { + return nil, false +} + +// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) { + return nil, false +} + +// AsSQLServerLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) { + return nil, false +} + +// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) { + return nil, false +} + +// AsAzureTableStorageLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureTableStorageLinkedService() (*AzureTableStorageLinkedService, bool) { + return nil, false +} + +// AsAzureBlobStorageLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureBlobStorageLinkedService() (*AzureBlobStorageLinkedService, bool) { + return nil, false +} + +// AsAzureStorageLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) { + return nil, false +} + +// AsLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsLinkedService() (*LinkedService, bool) { + return nil, false +} + +// AsBasicLinkedService is the BasicLinkedService implementation for AmazonRdsForOracleLinkedService. +func (arfols AmazonRdsForOracleLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) { + return &arfols, true +} + +// UnmarshalJSON is the custom unmarshaler for AmazonRdsForOracleLinkedService struct. +func (arfols *AmazonRdsForOracleLinkedService) 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 "typeProperties": + if v != nil { + var amazonRdsForLinkedServiceTypeProperties AmazonRdsForLinkedServiceTypeProperties + err = json.Unmarshal(*v, &amazonRdsForLinkedServiceTypeProperties) + if err != nil { + return err + } + arfols.AmazonRdsForLinkedServiceTypeProperties = &amazonRdsForLinkedServiceTypeProperties + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if arfols.AdditionalProperties == nil { + arfols.AdditionalProperties = make(map[string]interface{}) + } + arfols.AdditionalProperties[k] = additionalProperties + } + case "connectVia": + if v != nil { + var connectVia IntegrationRuntimeReference + err = json.Unmarshal(*v, &connectVia) + if err != nil { + return err + } + arfols.ConnectVia = &connectVia + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + arfols.Description = &description + } + case "parameters": + if v != nil { + var parameters map[string]*ParameterSpecification + err = json.Unmarshal(*v, ¶meters) + if err != nil { + return err + } + arfols.Parameters = parameters + } + case "annotations": + if v != nil { + var annotations []interface{} + err = json.Unmarshal(*v, &annotations) + if err != nil { + return err + } + arfols.Annotations = &annotations + } + case "type": + if v != nil { + var typeVar TypeBasicLinkedService + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + arfols.Type = typeVar + } + } + } + + return nil +} + +// AmazonRdsForOraclePartitionSettings the settings that will be leveraged for AmazonRdsForOracle source +// partitioning. +type AmazonRdsForOraclePartitionSettings struct { + // PartitionNames - Names of the physical partitions of AmazonRdsForOracle table. + PartitionNames interface{} `json:"partitionNames,omitempty"` + // PartitionColumnName - The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). + PartitionColumnName interface{} `json:"partitionColumnName,omitempty"` + // PartitionUpperBound - The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). + PartitionUpperBound interface{} `json:"partitionUpperBound,omitempty"` + // PartitionLowerBound - The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). + PartitionLowerBound interface{} `json:"partitionLowerBound,omitempty"` +} + +// AmazonRdsForOracleSource a copy activity AmazonRdsForOracle source. +type AmazonRdsForOracleSource struct { + // OracleReaderQuery - AmazonRdsForOracle reader query. Type: string (or Expression with resultType string). + OracleReaderQuery interface{} `json:"oracleReaderQuery,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"` + // PartitionOption - The partition mechanism that will be used for AmazonRdsForOracle read in parallel. Type: string (or Expression with resultType string). + PartitionOption interface{} `json:"partitionOption,omitempty"` + // PartitionSettings - The settings that will be leveraged for AmazonRdsForOracle source partitioning. + PartitionSettings *AmazonRdsForOraclePartitionSettings `json:"partitionSettings,omitempty"` + // AdditionalColumns - Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). + AdditionalColumns interface{} `json:"additionalColumns,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // SourceRetryCount - Source retry count. Type: integer (or Expression with resultType integer). + SourceRetryCount interface{} `json:"sourceRetryCount,omitempty"` + // SourceRetryWait - Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + SourceRetryWait interface{} `json:"sourceRetryWait,omitempty"` + // MaxConcurrentConnections - The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). + MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` + // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). + DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + Type TypeBasicCopySource `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) MarshalJSON() ([]byte, error) { + arfos.Type = TypeBasicCopySourceTypeAmazonRdsForOracleSource + objectMap := make(map[string]interface{}) + if arfos.OracleReaderQuery != nil { + objectMap["oracleReaderQuery"] = arfos.OracleReaderQuery + } + if arfos.QueryTimeout != nil { + objectMap["queryTimeout"] = arfos.QueryTimeout + } + if arfos.PartitionOption != nil { + objectMap["partitionOption"] = arfos.PartitionOption + } + if arfos.PartitionSettings != nil { + objectMap["partitionSettings"] = arfos.PartitionSettings + } + if arfos.AdditionalColumns != nil { + objectMap["additionalColumns"] = arfos.AdditionalColumns + } + if arfos.SourceRetryCount != nil { + objectMap["sourceRetryCount"] = arfos.SourceRetryCount + } + if arfos.SourceRetryWait != nil { + objectMap["sourceRetryWait"] = arfos.SourceRetryWait + } + if arfos.MaxConcurrentConnections != nil { + objectMap["maxConcurrentConnections"] = arfos.MaxConcurrentConnections + } + if arfos.DisableMetricsCollection != nil { + objectMap["disableMetricsCollection"] = arfos.DisableMetricsCollection + } + if arfos.Type != "" { + objectMap["type"] = arfos.Type + } + for k, v := range arfos.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsSharePointOnlineListSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSharePointOnlineListSource() (*SharePointOnlineListSource, bool) { + return nil, false +} + +// AsAzureDatabricksDeltaLakeSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureDatabricksDeltaLakeSource() (*AzureDatabricksDeltaLakeSource, bool) { + return nil, false +} + +// AsSnowflakeSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSnowflakeSource() (*SnowflakeSource, bool) { + return nil, false +} + +// AsHTTPSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsHTTPSource() (*HTTPSource, bool) { + return nil, false +} + +// AsAzureBlobFSSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureBlobFSSource() (*AzureBlobFSSource, bool) { + return nil, false +} + +// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) { + return nil, false +} + +// AsOffice365Source is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsOffice365Source() (*Office365Source, bool) { + return nil, false +} + +// AsCosmosDbMongoDbAPISource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsCosmosDbMongoDbAPISource() (*CosmosDbMongoDbAPISource, bool) { + return nil, false +} + +// AsMongoDbV2Source is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMongoDbV2Source() (*MongoDbV2Source, bool) { + return nil, false +} + +// AsMongoDbAtlasSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMongoDbAtlasSource() (*MongoDbAtlasSource, bool) { + return nil, false +} + +// AsMongoDbSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMongoDbSource() (*MongoDbSource, bool) { + return nil, false +} + +// AsWebSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsWebSource() (*WebSource, bool) { + return nil, false +} + +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return &arfos, true +} + +// AsOracleSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsOracleSource() (*OracleSource, bool) { + return nil, false +} + +// AsAzureDataExplorerSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureDataExplorerSource() (*AzureDataExplorerSource, bool) { + return nil, false +} + +// AsHdfsSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsHdfsSource() (*HdfsSource, bool) { + return nil, false +} + +// AsFileSystemSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsFileSystemSource() (*FileSystemSource, bool) { + return nil, false +} + +// AsRestSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsRestSource() (*RestSource, bool) { + return nil, false +} + +// AsSalesforceServiceCloudSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSalesforceServiceCloudSource() (*SalesforceServiceCloudSource, bool) { + return nil, false +} + +// AsODataSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsODataSource() (*ODataSource, bool) { + return nil, false +} + +// AsMicrosoftAccessSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMicrosoftAccessSource() (*MicrosoftAccessSource, bool) { + return nil, false +} + +// AsRelationalSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsRelationalSource() (*RelationalSource, bool) { + return nil, false +} + +// AsCommonDataServiceForAppsSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsCommonDataServiceForAppsSource() (*CommonDataServiceForAppsSource, bool) { + return nil, false +} + +// AsDynamicsCrmSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDynamicsCrmSource() (*DynamicsCrmSource, bool) { + return nil, false +} + +// AsDynamicsSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDynamicsSource() (*DynamicsSource, bool) { + return nil, false +} + +// AsCosmosDbSQLAPISource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsCosmosDbSQLAPISource() (*CosmosDbSQLAPISource, bool) { + return nil, false +} + +// AsDocumentDbCollectionSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) { + return nil, false +} + +// AsBlobSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsBlobSource() (*BlobSource, bool) { + return nil, false +} + +// AsAmazonRedshiftSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) { + return nil, false +} + +// AsGoogleAdWordsSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsGoogleAdWordsSource() (*GoogleAdWordsSource, bool) { + return nil, false +} + +// AsOracleServiceCloudSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsOracleServiceCloudSource() (*OracleServiceCloudSource, bool) { + return nil, false +} + +// AsDynamicsAXSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDynamicsAXSource() (*DynamicsAXSource, bool) { + return nil, false +} + +// AsResponsysSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsResponsysSource() (*ResponsysSource, bool) { + return nil, false +} + +// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) { + return nil, false +} + +// AsVerticaSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsVerticaSource() (*VerticaSource, bool) { + return nil, false +} + +// AsNetezzaSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsNetezzaSource() (*NetezzaSource, bool) { + return nil, false +} + +// AsZohoSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsZohoSource() (*ZohoSource, bool) { + return nil, false +} + +// AsXeroSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsXeroSource() (*XeroSource, bool) { + return nil, false +} + +// AsSquareSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSquareSource() (*SquareSource, bool) { + return nil, false +} + +// AsSparkSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSparkSource() (*SparkSource, bool) { + return nil, false +} + +// AsShopifySource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsShopifySource() (*ShopifySource, bool) { + return nil, false +} + +// AsServiceNowSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsServiceNowSource() (*ServiceNowSource, bool) { + return nil, false +} + +// AsQuickBooksSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsQuickBooksSource() (*QuickBooksSource, bool) { + return nil, false +} + +// AsPrestoSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsPrestoSource() (*PrestoSource, bool) { + return nil, false +} + +// AsPhoenixSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsPhoenixSource() (*PhoenixSource, bool) { + return nil, false +} + +// AsPaypalSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsPaypalSource() (*PaypalSource, bool) { + return nil, false +} + +// AsMarketoSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMarketoSource() (*MarketoSource, bool) { + return nil, false +} + +// AsAzureMariaDBSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureMariaDBSource() (*AzureMariaDBSource, bool) { + return nil, false +} + +// AsMariaDBSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMariaDBSource() (*MariaDBSource, bool) { + return nil, false +} + +// AsMagentoSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMagentoSource() (*MagentoSource, bool) { + return nil, false +} + +// AsJiraSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsJiraSource() (*JiraSource, bool) { + return nil, false +} + +// AsImpalaSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsImpalaSource() (*ImpalaSource, bool) { + return nil, false +} + +// AsHubspotSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsHubspotSource() (*HubspotSource, bool) { + return nil, false +} + +// AsHiveSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsHiveSource() (*HiveSource, bool) { + return nil, false +} + +// AsHBaseSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsHBaseSource() (*HBaseSource, bool) { + return nil, false +} + +// AsGreenplumSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsGreenplumSource() (*GreenplumSource, bool) { + return nil, false +} + +// AsGoogleBigQuerySource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) { + return nil, false +} + +// AsEloquaSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsEloquaSource() (*EloquaSource, bool) { + return nil, false +} + +// AsDrillSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDrillSource() (*DrillSource, bool) { + return nil, false +} + +// AsCouchbaseSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsCouchbaseSource() (*CouchbaseSource, bool) { + return nil, false +} + +// AsConcurSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsConcurSource() (*ConcurSource, bool) { + return nil, false +} + +// AsAzurePostgreSQLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) { + return nil, false +} + +// AsAmazonMWSSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) { + return nil, false +} + +// AsCassandraSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsCassandraSource() (*CassandraSource, bool) { + return nil, false +} + +// AsTeradataSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsTeradataSource() (*TeradataSource, bool) { + return nil, false +} + +// AsAzureMySQLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) { + return nil, false +} + +// AsSQLDWSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSQLDWSource() (*SQLDWSource, bool) { + return nil, false +} + +// AsSQLMISource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSQLMISource() (*SQLMISource, bool) { + return nil, false +} + +// AsAzureSQLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureSQLSource() (*AzureSQLSource, bool) { + return nil, false +} + +// AsSQLServerSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSQLServerSource() (*SQLServerSource, bool) { + return nil, false +} + +// AsSQLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSQLSource() (*SQLSource, bool) { + return nil, false +} + +// AsSapTableSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSapTableSource() (*SapTableSource, bool) { + return nil, false +} + +// AsSapOpenHubSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSapOpenHubSource() (*SapOpenHubSource, bool) { + return nil, false +} + +// AsSapHanaSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSapHanaSource() (*SapHanaSource, bool) { + return nil, false +} + +// AsSapEccSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSapEccSource() (*SapEccSource, bool) { + return nil, false +} + +// AsSapCloudForCustomerSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) { + return nil, false +} + +// AsSalesforceSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSalesforceSource() (*SalesforceSource, bool) { + return nil, false +} + +// AsSapBwSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSapBwSource() (*SapBwSource, bool) { + return nil, false +} + +// AsSybaseSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsSybaseSource() (*SybaseSource, bool) { + return nil, false +} + +// AsPostgreSQLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsPostgreSQLSource() (*PostgreSQLSource, bool) { + return nil, false +} + +// AsMySQLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsMySQLSource() (*MySQLSource, bool) { + return nil, false +} + +// AsOdbcSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsOdbcSource() (*OdbcSource, bool) { + return nil, false +} + +// AsDb2Source is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDb2Source() (*Db2Source, bool) { + return nil, false +} + +// AsInformixSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsInformixSource() (*InformixSource, bool) { + return nil, false +} + +// AsAzureTableSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAzureTableSource() (*AzureTableSource, bool) { + return nil, false +} + +// AsTabularSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsTabularSource() (*TabularSource, bool) { + return nil, false +} + +// AsBasicTabularSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsBasicTabularSource() (BasicTabularSource, bool) { + return nil, false +} + +// AsBinarySource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsBinarySource() (*BinarySource, bool) { + return nil, false +} + +// AsOrcSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsOrcSource() (*OrcSource, bool) { + return nil, false +} + +// AsXMLSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsXMLSource() (*XMLSource, bool) { + return nil, false +} + +// AsJSONSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsJSONSource() (*JSONSource, bool) { + return nil, false +} + +// AsDelimitedTextSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsDelimitedTextSource() (*DelimitedTextSource, bool) { + return nil, false +} + +// AsParquetSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsParquetSource() (*ParquetSource, bool) { + return nil, false +} + +// AsExcelSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsExcelSource() (*ExcelSource, bool) { + return nil, false +} + +// AsAvroSource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsAvroSource() (*AvroSource, bool) { + return nil, false +} + +// AsCopySource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsCopySource() (*CopySource, bool) { + return nil, false +} + +// AsBasicCopySource is the BasicCopySource implementation for AmazonRdsForOracleSource. +func (arfos AmazonRdsForOracleSource) AsBasicCopySource() (BasicCopySource, bool) { + return &arfos, true +} + +// UnmarshalJSON is the custom unmarshaler for AmazonRdsForOracleSource struct. +func (arfos *AmazonRdsForOracleSource) 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 "oracleReaderQuery": + if v != nil { + var oracleReaderQuery interface{} + err = json.Unmarshal(*v, &oracleReaderQuery) + if err != nil { + return err + } + arfos.OracleReaderQuery = oracleReaderQuery + } + case "queryTimeout": + if v != nil { + var queryTimeout interface{} + err = json.Unmarshal(*v, &queryTimeout) + if err != nil { + return err + } + arfos.QueryTimeout = queryTimeout + } + case "partitionOption": + if v != nil { + var partitionOption interface{} + err = json.Unmarshal(*v, &partitionOption) + if err != nil { + return err + } + arfos.PartitionOption = partitionOption + } + case "partitionSettings": + if v != nil { + var partitionSettings AmazonRdsForOraclePartitionSettings + err = json.Unmarshal(*v, &partitionSettings) + if err != nil { + return err + } + arfos.PartitionSettings = &partitionSettings + } + case "additionalColumns": + if v != nil { + var additionalColumns interface{} + err = json.Unmarshal(*v, &additionalColumns) + if err != nil { + return err + } + arfos.AdditionalColumns = additionalColumns + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if arfos.AdditionalProperties == nil { + arfos.AdditionalProperties = make(map[string]interface{}) + } + arfos.AdditionalProperties[k] = additionalProperties + } + case "sourceRetryCount": + if v != nil { + var sourceRetryCount interface{} + err = json.Unmarshal(*v, &sourceRetryCount) + if err != nil { + return err + } + arfos.SourceRetryCount = sourceRetryCount + } + case "sourceRetryWait": + if v != nil { + var sourceRetryWait interface{} + err = json.Unmarshal(*v, &sourceRetryWait) + if err != nil { + return err + } + arfos.SourceRetryWait = sourceRetryWait + } + case "maxConcurrentConnections": + if v != nil { + var maxConcurrentConnections interface{} + err = json.Unmarshal(*v, &maxConcurrentConnections) + if err != nil { + return err + } + arfos.MaxConcurrentConnections = maxConcurrentConnections + } + case "disableMetricsCollection": + if v != nil { + var disableMetricsCollection interface{} + err = json.Unmarshal(*v, &disableMetricsCollection) + if err != nil { + return err + } + arfos.DisableMetricsCollection = disableMetricsCollection + } + case "type": + if v != nil { + var typeVar TypeBasicCopySource + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + arfos.Type = typeVar + } + } + } + + return nil +} + +// AmazonRdsForOracleTableDataset the AmazonRdsForOracle database dataset. +type AmazonRdsForOracleTableDataset struct { + // AmazonRdsForOracleTableDatasetTypeProperties - AmazonRdsForOracle dataset properties. + *AmazonRdsForOracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Description - Dataset description. + Description *string `json:"description,omitempty"` + // Structure - Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + Structure interface{} `json:"structure,omitempty"` + // Schema - Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + Schema interface{} `json:"schema,omitempty"` + // LinkedServiceName - Linked service reference. + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + // Parameters - Parameters for dataset. + Parameters map[string]*ParameterSpecification `json:"parameters"` + // Annotations - List of tags that can be used for describing the Dataset. + Annotations *[]interface{} `json:"annotations,omitempty"` + // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + Folder *DatasetFolder `json:"folder,omitempty"` + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + Type TypeBasicDataset `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) MarshalJSON() ([]byte, error) { + arfotd.Type = TypeBasicDatasetTypeAmazonRdsForOracleTable + objectMap := make(map[string]interface{}) + if arfotd.AmazonRdsForOracleTableDatasetTypeProperties != nil { + objectMap["typeProperties"] = arfotd.AmazonRdsForOracleTableDatasetTypeProperties + } + if arfotd.Description != nil { + objectMap["description"] = arfotd.Description + } + if arfotd.Structure != nil { + objectMap["structure"] = arfotd.Structure + } + if arfotd.Schema != nil { + objectMap["schema"] = arfotd.Schema + } + if arfotd.LinkedServiceName != nil { + objectMap["linkedServiceName"] = arfotd.LinkedServiceName + } + if arfotd.Parameters != nil { + objectMap["parameters"] = arfotd.Parameters + } + if arfotd.Annotations != nil { + objectMap["annotations"] = arfotd.Annotations + } + if arfotd.Folder != nil { + objectMap["folder"] = arfotd.Folder + } + if arfotd.Type != "" { + objectMap["type"] = arfotd.Type + } + for k, v := range arfotd.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsAzureDatabricksDeltaLakeDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureDatabricksDeltaLakeDataset() (*AzureDatabricksDeltaLakeDataset, bool) { + return nil, false +} + +// AsSharePointOnlineListResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSharePointOnlineListResourceDataset() (*SharePointOnlineListResourceDataset, bool) { + return nil, false +} + +// AsSnowflakeDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSnowflakeDataset() (*SnowflakeDataset, bool) { + return nil, false +} + +// AsGoogleAdWordsObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsGoogleAdWordsObjectDataset() (*GoogleAdWordsObjectDataset, bool) { + return nil, false +} + +// AsAzureDataExplorerTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureDataExplorerTableDataset() (*AzureDataExplorerTableDataset, bool) { + return nil, false +} + +// AsOracleServiceCloudObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsOracleServiceCloudObjectDataset() (*OracleServiceCloudObjectDataset, bool) { + return nil, false +} + +// AsDynamicsAXResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDynamicsAXResourceDataset() (*DynamicsAXResourceDataset, bool) { + return nil, false +} + +// AsResponsysObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) { + return nil, false +} + +// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) { + return nil, false +} + +// AsVerticaTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) { + return nil, false +} + +// AsNetezzaTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) { + return nil, false +} + +// AsZohoObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) { + return nil, false +} + +// AsXeroObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) { + return nil, false +} + +// AsSquareObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) { + return nil, false +} + +// AsSparkObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) { + return nil, false +} + +// AsShopifyObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) { + return nil, false +} + +// AsServiceNowObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) { + return nil, false +} + +// AsQuickBooksObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) { + return nil, false +} + +// AsPrestoObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) { + return nil, false +} + +// AsPhoenixObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) { + return nil, false +} + +// AsPaypalObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) { + return nil, false +} + +// AsMarketoObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) { + return nil, false +} + +// AsAzureMariaDBTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureMariaDBTableDataset() (*AzureMariaDBTableDataset, bool) { + return nil, false +} + +// AsMariaDBTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) { + return nil, false +} + +// AsMagentoObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) { + return nil, false +} + +// AsJiraObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) { + return nil, false +} + +// AsImpalaObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) { + return nil, false +} + +// AsHubspotObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) { + return nil, false +} + +// AsHiveObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) { + return nil, false +} + +// AsHBaseObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) { + return nil, false +} + +// AsGreenplumTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) { + return nil, false +} + +// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) { + return nil, false +} + +// AsEloquaObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) { + return nil, false +} + +// AsDrillTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) { + return nil, false +} + +// AsCouchbaseTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) { + return nil, false +} + +// AsConcurObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) { + return nil, false +} + +// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) { + return nil, false +} + +// AsAmazonMWSObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) { + return nil, false +} + +// AsHTTPDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsHTTPDataset() (*HTTPDataset, bool) { + return nil, false +} + +// AsAzureSearchIndexDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) { + return nil, false +} + +// AsWebTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsWebTableDataset() (*WebTableDataset, bool) { + return nil, false +} + +// AsSapTableResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSapTableResourceDataset() (*SapTableResourceDataset, bool) { + return nil, false +} + +// AsRestResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsRestResourceDataset() (*RestResourceDataset, bool) { + return nil, false +} + +// AsSQLServerTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) { + return nil, false +} + +// AsSapOpenHubTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSapOpenHubTableDataset() (*SapOpenHubTableDataset, bool) { + return nil, false +} + +// AsSapHanaTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSapHanaTableDataset() (*SapHanaTableDataset, bool) { + return nil, false +} + +// AsSapEccResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) { + return nil, false +} + +// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) { + return nil, false +} + +// AsSapBwCubeDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSapBwCubeDataset() (*SapBwCubeDataset, bool) { + return nil, false +} + +// AsSybaseTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSybaseTableDataset() (*SybaseTableDataset, bool) { + return nil, false +} + +// AsSalesforceServiceCloudObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSalesforceServiceCloudObjectDataset() (*SalesforceServiceCloudObjectDataset, bool) { + return nil, false +} + +// AsSalesforceObjectDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) { + return nil, false +} + +// AsMicrosoftAccessTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMicrosoftAccessTableDataset() (*MicrosoftAccessTableDataset, bool) { + return nil, false +} + +// AsPostgreSQLTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsPostgreSQLTableDataset() (*PostgreSQLTableDataset, bool) { + return nil, false +} + +// AsMySQLTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMySQLTableDataset() (*MySQLTableDataset, bool) { + return nil, false +} + +// AsOdbcTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsOdbcTableDataset() (*OdbcTableDataset, bool) { + return nil, false +} + +// AsInformixTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsInformixTableDataset() (*InformixTableDataset, bool) { + return nil, false +} + +// AsRelationalTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) { + return nil, false +} + +// AsDb2TableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDb2TableDataset() (*Db2TableDataset, bool) { + return nil, false +} + +// AsAmazonRedshiftTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAmazonRedshiftTableDataset() (*AmazonRedshiftTableDataset, bool) { + return nil, false +} + +// AsAzureMySQLTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) { + return nil, false +} + +// AsTeradataTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { + return nil, false +} + +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return &arfotd, true +} + +// AsOracleTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { + return nil, false +} + +// AsODataResourceDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) { + return nil, false +} + +// AsCosmosDbMongoDbAPICollectionDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsCosmosDbMongoDbAPICollectionDataset() (*CosmosDbMongoDbAPICollectionDataset, bool) { + return nil, false +} + +// AsMongoDbV2CollectionDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMongoDbV2CollectionDataset() (*MongoDbV2CollectionDataset, bool) { + return nil, false +} + +// AsMongoDbAtlasCollectionDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMongoDbAtlasCollectionDataset() (*MongoDbAtlasCollectionDataset, bool) { + return nil, false +} + +// AsMongoDbCollectionDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) { + return nil, false +} + +// AsFileShareDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsFileShareDataset() (*FileShareDataset, bool) { + return nil, false +} + +// AsOffice365Dataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsOffice365Dataset() (*Office365Dataset, bool) { + return nil, false +} + +// AsAzureBlobFSDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureBlobFSDataset() (*AzureBlobFSDataset, bool) { + return nil, false +} + +// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) { + return nil, false +} + +// AsCommonDataServiceForAppsEntityDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsCommonDataServiceForAppsEntityDataset() (*CommonDataServiceForAppsEntityDataset, bool) { + return nil, false +} + +// AsDynamicsCrmEntityDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDynamicsCrmEntityDataset() (*DynamicsCrmEntityDataset, bool) { + return nil, false +} + +// AsDynamicsEntityDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) { + return nil, false +} + +// AsDocumentDbCollectionDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) { + return nil, false +} + +// AsCosmosDbSQLAPICollectionDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsCosmosDbSQLAPICollectionDataset() (*CosmosDbSQLAPICollectionDataset, bool) { + return nil, false +} + +// AsCustomDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsCustomDataset() (*CustomDataset, bool) { + return nil, false +} + +// AsCassandraTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) { + return nil, false +} + +// AsAzureSQLDWTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) { + return nil, false +} + +// AsAzureSQLMITableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureSQLMITableDataset() (*AzureSQLMITableDataset, bool) { + return nil, false +} + +// AsAzureSQLTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) { + return nil, false +} + +// AsAzureTableDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) { + return nil, false +} + +// AsAzureBlobDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) { + return nil, false +} + +// AsBinaryDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsBinaryDataset() (*BinaryDataset, bool) { + return nil, false +} + +// AsOrcDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsOrcDataset() (*OrcDataset, bool) { + return nil, false +} + +// AsXMLDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsXMLDataset() (*XMLDataset, bool) { + return nil, false +} + +// AsJSONDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsJSONDataset() (*JSONDataset, bool) { + return nil, false +} + +// AsDelimitedTextDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDelimitedTextDataset() (*DelimitedTextDataset, bool) { + return nil, false +} + +// AsParquetDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsParquetDataset() (*ParquetDataset, bool) { + return nil, false +} + +// AsExcelDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsExcelDataset() (*ExcelDataset, bool) { + return nil, false +} + +// AsAvroDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAvroDataset() (*AvroDataset, bool) { + return nil, false +} + +// AsAmazonS3Dataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) { + return nil, false +} + +// AsDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsDataset() (*Dataset, bool) { + return nil, false +} + +// AsBasicDataset is the BasicDataset implementation for AmazonRdsForOracleTableDataset. +func (arfotd AmazonRdsForOracleTableDataset) AsBasicDataset() (BasicDataset, bool) { + return &arfotd, true +} + +// UnmarshalJSON is the custom unmarshaler for AmazonRdsForOracleTableDataset struct. +func (arfotd *AmazonRdsForOracleTableDataset) 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 "typeProperties": + if v != nil { + var amazonRdsForOracleTableDatasetTypeProperties AmazonRdsForOracleTableDatasetTypeProperties + err = json.Unmarshal(*v, &amazonRdsForOracleTableDatasetTypeProperties) + if err != nil { + return err + } + arfotd.AmazonRdsForOracleTableDatasetTypeProperties = &amazonRdsForOracleTableDatasetTypeProperties + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if arfotd.AdditionalProperties == nil { + arfotd.AdditionalProperties = make(map[string]interface{}) + } + arfotd.AdditionalProperties[k] = additionalProperties + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + arfotd.Description = &description + } + case "structure": + if v != nil { + var structure interface{} + err = json.Unmarshal(*v, &structure) + if err != nil { + return err + } + arfotd.Structure = structure + } + case "schema": + if v != nil { + var schema interface{} + err = json.Unmarshal(*v, &schema) + if err != nil { + return err + } + arfotd.Schema = schema + } + case "linkedServiceName": + if v != nil { + var linkedServiceName LinkedServiceReference + err = json.Unmarshal(*v, &linkedServiceName) + if err != nil { + return err + } + arfotd.LinkedServiceName = &linkedServiceName + } + case "parameters": + if v != nil { + var parameters map[string]*ParameterSpecification + err = json.Unmarshal(*v, ¶meters) + if err != nil { + return err + } + arfotd.Parameters = parameters + } + case "annotations": + if v != nil { + var annotations []interface{} + err = json.Unmarshal(*v, &annotations) + if err != nil { + return err + } + arfotd.Annotations = &annotations + } + case "folder": + if v != nil { + var folder DatasetFolder + err = json.Unmarshal(*v, &folder) + if err != nil { + return err + } + arfotd.Folder = &folder + } + case "type": + if v != nil { + var typeVar TypeBasicDataset + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + arfotd.Type = typeVar + } + } + } + + return nil +} + +// AmazonRdsForOracleTableDatasetTypeProperties amazonRdsForOracle dataset properties. +type AmazonRdsForOracleTableDatasetTypeProperties struct { + // Schema - The schema name of the AmazonRdsForOracle database. Type: string (or Expression with resultType string). + Schema interface{} `json:"schema,omitempty"` + // Table - The table name of the AmazonRdsForOracle database. Type: string (or Expression with resultType string). + Table interface{} `json:"table,omitempty"` +} + // AmazonRedshiftLinkedService linked service for Amazon Redshift. type AmazonRedshiftLinkedService struct { // AmazonRedshiftLinkedServiceTypeProperties - Amazon Redshift linked service properties. @@ -3013,7 +5069,7 @@ type AmazonRedshiftLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -3445,6 +5501,11 @@ func (arls AmazonRedshiftLinkedService) AsAzureMySQLLinkedService() (*AzureMySQL return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService. +func (arls AmazonRedshiftLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService. func (arls AmazonRedshiftLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -3740,7 +5801,7 @@ type AmazonRedshiftSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -3841,6 +5902,11 @@ func (ars AmazonRedshiftSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AmazonRedshiftSource. +func (ars AmazonRedshiftSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AmazonRedshiftSource. func (ars AmazonRedshiftSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -4389,7 +6455,7 @@ type AmazonRedshiftTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -4740,6 +6806,11 @@ func (artd AmazonRedshiftTableDataset) AsTeradataTableDataset() (*TeradataTableD return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AmazonRedshiftTableDataset. +func (artd AmazonRedshiftTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AmazonRedshiftTableDataset. func (artd AmazonRedshiftTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -5037,7 +7108,7 @@ type AmazonS3CompatibleLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -5469,6 +7540,11 @@ func (ascls AmazonS3CompatibleLinkedService) AsAzureMySQLLinkedService() (*Azure return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AmazonS3CompatibleLinkedService. +func (ascls AmazonS3CompatibleLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AmazonS3CompatibleLinkedService. func (ascls AmazonS3CompatibleLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -6241,7 +8317,7 @@ type AmazonS3Dataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -6592,6 +8668,11 @@ func (asd AmazonS3Dataset) AsTeradataTableDataset() (*TeradataTableDataset, bool return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AmazonS3Dataset. +func (asd AmazonS3Dataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AmazonS3Dataset. func (asd AmazonS3Dataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -6984,7 +9065,7 @@ type AmazonS3LinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -7416,6 +9497,11 @@ func (asls AmazonS3LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService. +func (asls AmazonS3LinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService. func (asls AmazonS3LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -8192,7 +10278,7 @@ type AppendVariableActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -8224,6 +10310,11 @@ func (ava AppendVariableActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for AppendVariableActivity. +func (ava AppendVariableActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for AppendVariableActivity. func (ava AppendVariableActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -8545,7 +10636,7 @@ type AvroDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -8896,6 +10987,11 @@ func (ad AvroDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AvroDataset. +func (ad AvroDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AvroDataset. func (ad AvroDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -9726,7 +11822,7 @@ type AvroSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -9819,6 +11915,11 @@ func (as AvroSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AvroSource. +func (as AvroSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AvroSource. func (as AvroSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -10580,7 +12681,7 @@ type AzureBatchLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -11012,6 +13113,11 @@ func (abls AzureBatchLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService. +func (abls AzureBatchLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService. func (abls AzureBatchLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -11318,7 +13424,7 @@ type AzureBlobDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -11669,6 +13775,11 @@ func (abd AzureBlobDataset) AsTeradataTableDataset() (*TeradataTableDataset, boo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureBlobDataset. +func (abd AzureBlobDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureBlobDataset. func (abd AzureBlobDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -12056,7 +14167,7 @@ type AzureBlobFSDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -12407,6 +14518,11 @@ func (abfd AzureBlobFSDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureBlobFSDataset. +func (abfd AzureBlobFSDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureBlobFSDataset. func (abfd AzureBlobFSDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -12755,7 +14871,7 @@ type AzureBlobFSLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -13187,6 +15303,11 @@ func (abfls AzureBlobFSLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureBlobFSLinkedService. +func (abfls AzureBlobFSLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureBlobFSLinkedService. func (abfls AzureBlobFSLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -14336,7 +16457,7 @@ type AzureBlobFSSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -14434,6 +16555,11 @@ func (abfs AzureBlobFSSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureBlobFSSource. +func (abfs AzureBlobFSSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureBlobFSSource. func (abfs AzureBlobFSSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -15120,7 +17246,7 @@ type AzureBlobStorageLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -15552,6 +17678,11 @@ func (absls AzureBlobStorageLinkedService) AsAzureMySQLLinkedService() (*AzureMy return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureBlobStorageLinkedService. +func (absls AzureBlobStorageLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureBlobStorageLinkedService. func (absls AzureBlobStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -16540,7 +18671,7 @@ type AzureDatabricksDeltaLakeDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -16891,6 +19022,11 @@ func (addld AzureDatabricksDeltaLakeDataset) AsTeradataTableDataset() (*Teradata return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureDatabricksDeltaLakeDataset. +func (addld AzureDatabricksDeltaLakeDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureDatabricksDeltaLakeDataset. func (addld AzureDatabricksDeltaLakeDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -17396,7 +19532,7 @@ type AzureDatabricksDeltaLakeLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -17828,6 +19964,11 @@ func (addlls AzureDatabricksDeltaLakeLinkedService) AsAzureMySQLLinkedService() return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureDatabricksDeltaLakeLinkedService. +func (addlls AzureDatabricksDeltaLakeLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureDatabricksDeltaLakeLinkedService. func (addlls AzureDatabricksDeltaLakeLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -18409,7 +20550,7 @@ type AzureDatabricksDeltaLakeSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -18504,6 +20645,11 @@ func (addls AzureDatabricksDeltaLakeSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureDatabricksDeltaLakeSource. +func (addls AzureDatabricksDeltaLakeSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureDatabricksDeltaLakeSource. func (addls AzureDatabricksDeltaLakeSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -19091,7 +21237,7 @@ type AzureDatabricksLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -19523,6 +21669,11 @@ func (adls AzureDatabricksLinkedService) AsAzureMySQLLinkedService() (*AzureMySQ return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService. +func (adls AzureDatabricksLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService. func (adls AzureDatabricksLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -20020,7 +22171,7 @@ type AzureDataExplorerCommandActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -20058,6 +22209,11 @@ func (adeca AzureDataExplorerCommandActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for AzureDataExplorerCommandActivity. +func (adeca AzureDataExplorerCommandActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for AzureDataExplorerCommandActivity. func (adeca AzureDataExplorerCommandActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -20385,7 +22541,7 @@ type AzureDataExplorerLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -20817,6 +22973,11 @@ func (adels AzureDataExplorerLinkedService) AsAzureMySQLLinkedService() (*AzureM return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureDataExplorerLinkedService. +func (adels AzureDataExplorerLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureDataExplorerLinkedService. func (adels AzureDataExplorerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -21500,7 +23661,7 @@ type AzureDataExplorerSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -21601,6 +23762,11 @@ func (ades AzureDataExplorerSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureDataExplorerSource. +func (ades AzureDataExplorerSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureDataExplorerSource. func (ades AzureDataExplorerSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -22149,7 +24315,7 @@ type AzureDataExplorerTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -22500,6 +24666,11 @@ func (adetd AzureDataExplorerTableDataset) AsTeradataTableDataset() (*TeradataTa return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureDataExplorerTableDataset. +func (adetd AzureDataExplorerTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureDataExplorerTableDataset. func (adetd AzureDataExplorerTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -22787,7 +24958,7 @@ type AzureDataLakeAnalyticsLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -23219,6 +25390,11 @@ func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureMySQLLinkedService() (* return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService. +func (adlals AzureDataLakeAnalyticsLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService. func (adlals AzureDataLakeAnalyticsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -23536,7 +25712,7 @@ type AzureDataLakeStoreDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -23887,6 +26063,11 @@ func (adlsd AzureDataLakeStoreDataset) AsTeradataTableDataset() (*TeradataTableD return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset. +func (adlsd AzureDataLakeStoreDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset. func (adlsd AzureDataLakeStoreDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -24235,7 +26416,7 @@ type AzureDataLakeStoreLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -24667,6 +26848,11 @@ func (adlsls AzureDataLakeStoreLinkedService) AsAzureMySQLLinkedService() (*Azur return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService. +func (adlsls AzureDataLakeStoreLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService. func (adlsls AzureDataLakeStoreLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -25848,7 +28034,7 @@ type AzureDataLakeStoreSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -25940,6 +28126,11 @@ func (adlss AzureDataLakeStoreSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureDataLakeStoreSource. +func (adlss AzureDataLakeStoreSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureDataLakeStoreSource. func (adlss AzureDataLakeStoreSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -26608,7 +28799,7 @@ type AzureFileStorageLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -27040,6 +29231,11 @@ func (afsls AzureFileStorageLinkedService) AsAzureMySQLLinkedService() (*AzureMy return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureFileStorageLinkedService. +func (afsls AzureFileStorageLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureFileStorageLinkedService. func (afsls AzureFileStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -27976,7 +30172,7 @@ type AzureFunctionActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -28014,6 +30210,11 @@ func (afa AzureFunctionActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for AzureFunctionActivity. +func (afa AzureFunctionActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for AzureFunctionActivity. func (afa AzureFunctionActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -28339,7 +30540,7 @@ type AzureFunctionLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -28771,6 +30972,11 @@ func (afls AzureFunctionLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLL return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureFunctionLinkedService. +func (afls AzureFunctionLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureFunctionLinkedService. func (afls AzureFunctionLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -29060,7 +31266,7 @@ type AzureKeyVaultLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -29492,6 +31698,11 @@ func (akvls AzureKeyVaultLinkedService) AsAzureMySQLLinkedService() (*AzureMySQL return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService. +func (akvls AzureKeyVaultLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService. func (akvls AzureKeyVaultLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -29756,7 +31967,7 @@ type AzureMariaDBLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -30188,6 +32399,11 @@ func (amdls AzureMariaDBLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLL return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureMariaDBLinkedService. +func (amdls AzureMariaDBLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureMariaDBLinkedService. func (amdls AzureMariaDBLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -30407,7 +32623,7 @@ type AzureMariaDBSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -30505,6 +32721,11 @@ func (amds AzureMariaDBSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureMariaDBSource. +func (amds AzureMariaDBSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureMariaDBSource. func (amds AzureMariaDBSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -31044,7 +33265,7 @@ type AzureMariaDBTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -31395,6 +33616,11 @@ func (amdtd AzureMariaDBTableDataset) AsTeradataTableDataset() (*TeradataTableDa return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureMariaDBTableDataset. +func (amdtd AzureMariaDBTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureMariaDBTableDataset. func (amdtd AzureMariaDBTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -31686,7 +33912,7 @@ type AzureMLBatchExecutionActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -31724,6 +33950,11 @@ func (ambea AzureMLBatchExecutionActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity. +func (ambea AzureMLBatchExecutionActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity. func (ambea AzureMLBatchExecutionActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -32066,7 +34297,7 @@ type AzureMLExecutePipelineActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -32104,6 +34335,11 @@ func (amepa AzureMLExecutePipelineActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for AzureMLExecutePipelineActivity. +func (amepa AzureMLExecutePipelineActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for AzureMLExecutePipelineActivity. func (amepa AzureMLExecutePipelineActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -32437,7 +34673,7 @@ type AzureMLLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -32869,6 +35105,11 @@ func (amls AzureMLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureMLLinkedService. +func (amls AzureMLLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureMLLinkedService. func (amls AzureMLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -33179,7 +35420,7 @@ type AzureMLServiceLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -33611,6 +35852,11 @@ func (amsls AzureMLServiceLinkedService) AsAzureMySQLLinkedService() (*AzureMySQ return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureMLServiceLinkedService. +func (amsls AzureMLServiceLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureMLServiceLinkedService. func (amsls AzureMLServiceLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -33915,7 +36161,7 @@ type AzureMLUpdateResourceActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -33953,6 +36199,11 @@ func (amura AzureMLUpdateResourceActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity. +func (amura AzureMLUpdateResourceActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity. func (amura AzureMLUpdateResourceActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -34284,7 +36535,7 @@ type AzureMySQLLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -34716,6 +36967,11 @@ func (amsls AzureMySQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return &amsls, true } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService. +func (amsls AzureMySQLLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService. func (amsls AzureMySQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -35295,7 +37551,7 @@ type AzureMySQLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -35393,6 +37649,11 @@ func (amss AzureMySQLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureMySQLSource. +func (amss AzureMySQLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureMySQLSource. func (amss AzureMySQLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -35932,7 +38193,7 @@ type AzureMySQLTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -36283,6 +38544,11 @@ func (amstd AzureMySQLTableDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureMySQLTableDataset. +func (amstd AzureMySQLTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureMySQLTableDataset. func (amstd AzureMySQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -36578,7 +38844,7 @@ type AzurePostgreSQLLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -37010,6 +39276,11 @@ func (apsls AzurePostgreSQLLinkedService) AsAzureMySQLLinkedService() (*AzureMyS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService. +func (apsls AzurePostgreSQLLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService. func (apsls AzurePostgreSQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -37589,7 +39860,7 @@ type AzurePostgreSQLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -37687,6 +39958,11 @@ func (apss AzurePostgreSQLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzurePostgreSQLSource. +func (apss AzurePostgreSQLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzurePostgreSQLSource. func (apss AzurePostgreSQLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -38226,7 +40502,7 @@ type AzurePostgreSQLTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -38577,6 +40853,11 @@ func (apstd AzurePostgreSQLTableDataset) AsTeradataTableDataset() (*TeradataTabl return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset. +func (apstd AzurePostgreSQLTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset. func (apstd AzurePostgreSQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -39226,7 +41507,7 @@ type AzureSearchIndexDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -39577,6 +41858,11 @@ func (asid AzureSearchIndexDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureSearchIndexDataset. +func (asid AzureSearchIndexDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureSearchIndexDataset. func (asid AzureSearchIndexDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -40230,7 +42516,7 @@ type AzureSearchLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -40662,6 +42948,11 @@ func (asls AzureSearchLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService. +func (asls AzureSearchLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService. func (asls AzureSearchLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -40918,7 +43209,7 @@ type AzureSQLDatabaseLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -41350,6 +43641,11 @@ func (asdls AzureSQLDatabaseLinkedService) AsAzureMySQLLinkedService() (*AzureMy return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService. +func (asdls AzureSQLDatabaseLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService. func (asdls AzureSQLDatabaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -41672,7 +43968,7 @@ type AzureSQLDWLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -42104,6 +44400,11 @@ func (asdls AzureSQLDWLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService. +func (asdls AzureSQLDWLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService. func (asdls AzureSQLDWLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -42421,7 +44722,7 @@ type AzureSQLDWTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -42772,6 +45073,11 @@ func (asdtd AzureSQLDWTableDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset. +func (asdtd AzureSQLDWTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset. func (asdtd AzureSQLDWTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -43069,7 +45375,7 @@ type AzureSQLMILinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -43501,6 +45807,11 @@ func (asmls AzureSQLMILinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureSQLMILinkedService. +func (asmls AzureSQLMILinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureSQLMILinkedService. func (asmls AzureSQLMILinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -43829,7 +46140,7 @@ type AzureSQLMITableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -44180,6 +46491,11 @@ func (asmtd AzureSQLMITableDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureSQLMITableDataset. +func (asmtd AzureSQLMITableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureSQLMITableDataset. func (asmtd AzureSQLMITableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -44963,7 +47279,7 @@ type AzureSQLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -45076,6 +47392,11 @@ func (ass AzureSQLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureSQLSource. +func (ass AzureSQLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureSQLSource. func (ass AzureSQLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -45660,7 +47981,7 @@ type AzureSQLTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -46011,6 +48332,11 @@ func (astd AzureSQLTableDataset) AsTeradataTableDataset() (*TeradataTableDataset return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureSQLTableDataset. +func (astd AzureSQLTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureSQLTableDataset. func (astd AzureSQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -46308,7 +48634,7 @@ type AzureStorageLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -46740,6 +49066,11 @@ func (asls AzureStorageLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService. +func (asls AzureStorageLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService. func (asls AzureStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -46965,7 +49296,7 @@ type AzureTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -47316,6 +49647,11 @@ func (atd AzureTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for AzureTableDataset. +func (atd AzureTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for AzureTableDataset. func (atd AzureTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -48017,7 +50353,7 @@ type AzureTableSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -48118,6 +50454,11 @@ func (ats AzureTableSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for AzureTableSource. +func (ats AzureTableSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for AzureTableSource. func (ats AzureTableSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -48660,7 +51001,7 @@ type AzureTableStorageLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -49092,6 +51433,11 @@ func (atsls AzureTableStorageLinkedService) AsAzureMySQLLinkedService() (*AzureM return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for AzureTableStorageLinkedService. +func (atsls AzureTableStorageLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for AzureTableStorageLinkedService. func (atsls AzureTableStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -49303,7 +51649,7 @@ type BinaryDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -49654,6 +52000,11 @@ func (bd BinaryDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for BinaryDataset. +func (bd BinaryDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for BinaryDataset. func (bd BinaryDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -50437,7 +52788,7 @@ type BinarySource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -50530,6 +52881,11 @@ func (bs BinarySource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for BinarySource. +func (bs BinarySource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for BinarySource. func (bs BinarySource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -51666,7 +54022,7 @@ type BlobSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -51764,6 +54120,11 @@ func (bs BlobSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for BlobSource. +func (bs BlobSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for BlobSource. func (bs BlobSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -52486,7 +54847,7 @@ type CassandraLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -52918,6 +55279,11 @@ func (cls CassandraLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for CassandraLinkedService. +func (cls CassandraLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for CassandraLinkedService. func (cls CassandraLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -53213,7 +55579,7 @@ type CassandraSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -53314,6 +55680,11 @@ func (cs CassandraSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for CassandraSource. +func (cs CassandraSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for CassandraSource. func (cs CassandraSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -53862,7 +56233,7 @@ type CassandraTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -54213,6 +56584,11 @@ func (ctd CassandraTableDataset) AsTeradataTableDataset() (*TeradataTableDataset return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for CassandraTableDataset. +func (ctd CassandraTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for CassandraTableDataset. func (ctd CassandraTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -54896,7 +57272,7 @@ type CommonDataServiceForAppsEntityDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -55247,6 +57623,11 @@ func (cdsfaed CommonDataServiceForAppsEntityDataset) AsTeradataTableDataset() (* return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for CommonDataServiceForAppsEntityDataset. +func (cdsfaed CommonDataServiceForAppsEntityDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for CommonDataServiceForAppsEntityDataset. func (cdsfaed CommonDataServiceForAppsEntityDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -55541,7 +57922,7 @@ type CommonDataServiceForAppsLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -55973,6 +58354,11 @@ func (cdsfals CommonDataServiceForAppsLinkedService) AsAzureMySQLLinkedService() return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for CommonDataServiceForAppsLinkedService. +func (cdsfals CommonDataServiceForAppsLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for CommonDataServiceForAppsLinkedService. func (cdsfals CommonDataServiceForAppsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -56718,7 +59104,7 @@ type CommonDataServiceForAppsSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -56813,6 +59199,11 @@ func (cdsfas CommonDataServiceForAppsSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for CommonDataServiceForAppsSource. +func (cdsfas CommonDataServiceForAppsSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for CommonDataServiceForAppsSource. func (cdsfas CommonDataServiceForAppsSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -57556,7 +59947,7 @@ type ConcurLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -57988,6 +60379,11 @@ func (cls ConcurLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ConcurLinkedService. +func (cls ConcurLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ConcurLinkedService. func (cls ConcurLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -58305,7 +60701,7 @@ type ConcurObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -58656,6 +61052,11 @@ func (cod ConcurObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ConcurObjectDataset. +func (cod ConcurObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ConcurObjectDataset. func (cod ConcurObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -58947,7 +61348,7 @@ type ConcurSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -59045,6 +61446,11 @@ func (cs ConcurSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ConcurSource. +func (cs ConcurSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ConcurSource. func (cs ConcurSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -59608,7 +62014,7 @@ type ControlActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -59714,6 +62120,11 @@ func (ca ControlActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ControlActivity. +func (ca ControlActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ControlActivity. func (ca ControlActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -60008,7 +62419,7 @@ type CopyActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -60052,6 +62463,11 @@ func (ca CopyActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for CopyActivity. +func (ca CopyActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for CopyActivity. func (ca CopyActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -61152,6 +63568,7 @@ type BasicCopySource interface { AsMongoDbAtlasSource() (*MongoDbAtlasSource, bool) AsMongoDbSource() (*MongoDbSource, bool) AsWebSource() (*WebSource, bool) + AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) AsOracleSource() (*OracleSource, bool) AsAzureDataExplorerSource() (*AzureDataExplorerSource, bool) AsHdfsSource() (*HdfsSource, bool) @@ -61249,7 +63666,7 @@ type CopySource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -61309,6 +63726,10 @@ func unmarshalBasicCopySource(body []byte) (BasicCopySource, error) { var ws WebSource err := json.Unmarshal(body, &ws) return ws, err + case string(TypeBasicCopySourceTypeAmazonRdsForOracleSource): + var arfos AmazonRdsForOracleSource + err := json.Unmarshal(body, &arfos) + return arfos, err case string(TypeBasicCopySourceTypeOracleSource): var osVar OracleSource err := json.Unmarshal(body, &osVar) @@ -61743,6 +64164,11 @@ func (cs CopySource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for CopySource. +func (cs CopySource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for CopySource. func (cs CopySource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -62364,7 +64790,7 @@ type CosmosDbLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -62796,6 +65222,11 @@ func (cdls CosmosDbLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService. +func (cdls CosmosDbLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService. func (cdls CosmosDbLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -63145,7 +65576,7 @@ type CosmosDbMongoDbAPICollectionDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -63496,6 +65927,11 @@ func (cdmdacd CosmosDbMongoDbAPICollectionDataset) AsTeradataTableDataset() (*Te return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for CosmosDbMongoDbAPICollectionDataset. +func (cdmdacd CosmosDbMongoDbAPICollectionDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for CosmosDbMongoDbAPICollectionDataset. func (cdmdacd CosmosDbMongoDbAPICollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -63789,7 +66225,7 @@ type CosmosDbMongoDbAPILinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -64221,6 +66657,11 @@ func (cdmdals CosmosDbMongoDbAPILinkedService) AsAzureMySQLLinkedService() (*Azu return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for CosmosDbMongoDbAPILinkedService. +func (cdmdals CosmosDbMongoDbAPILinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for CosmosDbMongoDbAPILinkedService. func (cdmdals CosmosDbMongoDbAPILinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -64804,7 +67245,7 @@ type CosmosDbMongoDbAPISource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -64908,6 +67349,11 @@ func (cdmdas CosmosDbMongoDbAPISource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for CosmosDbMongoDbAPISource. +func (cdmdas CosmosDbMongoDbAPISource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for CosmosDbMongoDbAPISource. func (cdmdas CosmosDbMongoDbAPISource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -65465,7 +67911,7 @@ type CosmosDbSQLAPICollectionDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -65816,6 +68262,11 @@ func (cdsacd CosmosDbSQLAPICollectionDataset) AsTeradataTableDataset() (*Teradat return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for CosmosDbSQLAPICollectionDataset. +func (cdsacd CosmosDbSQLAPICollectionDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for CosmosDbSQLAPICollectionDataset. func (cdsacd CosmosDbSQLAPICollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -66477,7 +68928,7 @@ type CosmosDbSQLAPISource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -66581,6 +69032,11 @@ func (cdsas CosmosDbSQLAPISource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for CosmosDbSQLAPISource. +func (cdsas CosmosDbSQLAPISource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for CosmosDbSQLAPISource. func (cdsas CosmosDbSQLAPISource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -67132,7 +69588,7 @@ type CouchbaseLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -67564,6 +70020,11 @@ func (cls CouchbaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService. +func (cls CouchbaseLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService. func (cls CouchbaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -67783,7 +70244,7 @@ type CouchbaseSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -67881,6 +70342,11 @@ func (cs CouchbaseSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for CouchbaseSource. +func (cs CouchbaseSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for CouchbaseSource. func (cs CouchbaseSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -68420,7 +70886,7 @@ type CouchbaseTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -68771,6 +71237,11 @@ func (ctd CouchbaseTableDataset) AsTeradataTableDataset() (*TeradataTableDataset return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for CouchbaseTableDataset. +func (ctd CouchbaseTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for CouchbaseTableDataset. func (ctd CouchbaseTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -69407,7 +71878,7 @@ type CustomActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -69445,6 +71916,11 @@ func (ca CustomActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for CustomActivity. +func (ca CustomActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for CustomActivity. func (ca CustomActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -69817,7 +72293,7 @@ type CustomDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -70168,6 +72644,11 @@ func (cd CustomDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for CustomDataset. +func (cd CustomDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for CustomDataset. func (cd CustomDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -70455,7 +72936,7 @@ type CustomDataSourceLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -70887,6 +73368,11 @@ func (cdsls CustomDataSourceLinkedService) AsAzureMySQLLinkedService() (*AzureMy return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService. +func (cdsls CustomDataSourceLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService. func (cdsls CustomDataSourceLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -71391,7 +73877,7 @@ type DatabricksNotebookActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -71429,6 +73915,11 @@ func (dna DatabricksNotebookActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for DatabricksNotebookActivity. +func (dna DatabricksNotebookActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for DatabricksNotebookActivity. func (dna DatabricksNotebookActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -71771,7 +74262,7 @@ type DatabricksSparkJarActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -71809,6 +74300,11 @@ func (dsja DatabricksSparkJarActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for DatabricksSparkJarActivity. +func (dsja DatabricksSparkJarActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for DatabricksSparkJarActivity. func (dsja DatabricksSparkJarActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -72136,7 +74632,7 @@ type DatabricksSparkPythonActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -72174,6 +74670,11 @@ func (dspa DatabricksSparkPythonActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for DatabricksSparkPythonActivity. +func (dspa DatabricksSparkPythonActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for DatabricksSparkPythonActivity. func (dspa DatabricksSparkPythonActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -72485,6 +74986,7 @@ type DatabricksSparkPythonActivityTypeProperties struct { // BasicDataFlow azure Data Factory nested object which contains a flow with data movements and transformations. type BasicDataFlow interface { + AsWranglingDataFlow() (*WranglingDataFlow, bool) AsMappingDataFlow() (*MappingDataFlow, bool) AsDataFlow() (*DataFlow, bool) } @@ -72497,7 +74999,7 @@ type DataFlow struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this data flow is in. If not specified, Data flow will appear at the root level. Folder *DataFlowFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDataFlowTypeDataFlow', 'TypeBasicDataFlowTypeMappingDataFlow' + // Type - Possible values include: 'TypeBasicDataFlowTypeDataFlow', 'TypeBasicDataFlowTypeWranglingDataFlow', 'TypeBasicDataFlowTypeMappingDataFlow' Type TypeBasicDataFlow `json:"type,omitempty"` } @@ -72509,6 +75011,10 @@ func unmarshalBasicDataFlow(body []byte) (BasicDataFlow, error) { } switch m["type"] { + case string(TypeBasicDataFlowTypeWranglingDataFlow): + var wdf WranglingDataFlow + err := json.Unmarshal(body, &wdf) + return wdf, err case string(TypeBasicDataFlowTypeMappingDataFlow): var mdf MappingDataFlow err := json.Unmarshal(body, &mdf) @@ -72557,6 +75063,11 @@ func (df DataFlow) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsWranglingDataFlow is the BasicDataFlow implementation for DataFlow. +func (df DataFlow) AsWranglingDataFlow() (*WranglingDataFlow, bool) { + return nil, false +} + // AsMappingDataFlow is the BasicDataFlow implementation for DataFlow. func (df DataFlow) AsMappingDataFlow() (*MappingDataFlow, bool) { return nil, false @@ -73430,7 +75941,7 @@ type DataLakeAnalyticsUSQLActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -73468,6 +75979,11 @@ func (dlaua DataLakeAnalyticsUSQLActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity. +func (dlaua DataLakeAnalyticsUSQLActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity. func (dlaua DataLakeAnalyticsUSQLActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -73877,6 +76393,7 @@ type BasicDataset interface { AsAmazonRedshiftTableDataset() (*AmazonRedshiftTableDataset, bool) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) AsTeradataTableDataset() (*TeradataTableDataset, bool) + AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) AsOracleTableDataset() (*OracleTableDataset, bool) AsODataResourceDataset() (*ODataResourceDataset, bool) AsCosmosDbMongoDbAPICollectionDataset() (*CosmosDbMongoDbAPICollectionDataset, bool) @@ -73930,7 +76447,7 @@ type Dataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -74190,6 +76707,10 @@ func unmarshalBasicDataset(body []byte) (BasicDataset, error) { var ttd TeradataTableDataset err := json.Unmarshal(body, &ttd) return ttd, err + case string(TypeBasicDatasetTypeAmazonRdsForOracleTable): + var arfotd AmazonRdsForOracleTableDataset + err := json.Unmarshal(body, &arfotd) + return arfotd, err case string(TypeBasicDatasetTypeOracleTable): var otd OracleTableDataset err := json.Unmarshal(body, &otd) @@ -74683,6 +77204,11 @@ func (d Dataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for Dataset. +func (d Dataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for Dataset. func (d Dataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -76600,7 +79126,7 @@ type Db2LinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -77032,6 +79558,11 @@ func (d2ls Db2LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for Db2LinkedService. +func (d2ls Db2LinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for Db2LinkedService. func (d2ls Db2LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -77358,7 +79889,7 @@ type Db2Source struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -77456,6 +79987,11 @@ func (d2s Db2Source) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for Db2Source. +func (d2s Db2Source) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for Db2Source. func (d2s Db2Source) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -77995,7 +80531,7 @@ type Db2TableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -78346,6 +80882,11 @@ func (d2td Db2TableDataset) AsTeradataTableDataset() (*TeradataTableDataset, boo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for Db2TableDataset. +func (d2td Db2TableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for Db2TableDataset. func (d2td Db2TableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -78647,7 +81188,7 @@ type DeleteActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -78685,6 +81226,11 @@ func (da DeleteActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for DeleteActivity. +func (da DeleteActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for DeleteActivity. func (da DeleteActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -79094,7 +81640,7 @@ type DelimitedTextDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -79445,6 +81991,11 @@ func (dtd DelimitedTextDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for DelimitedTextDataset. +func (dtd DelimitedTextDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for DelimitedTextDataset. func (dtd DelimitedTextDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -80347,7 +82898,7 @@ type DelimitedTextSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -80443,6 +82994,11 @@ func (dts DelimitedTextSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for DelimitedTextSource. +func (dts DelimitedTextSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for DelimitedTextSource. func (dts DelimitedTextSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -81239,7 +83795,7 @@ type DocumentDbCollectionDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -81590,6 +84146,11 @@ func (ddcd DocumentDbCollectionDataset) AsTeradataTableDataset() (*TeradataTable return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset. +func (ddcd DocumentDbCollectionDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset. func (ddcd DocumentDbCollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -82263,7 +84824,7 @@ type DocumentDbCollectionSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -82364,6 +84925,11 @@ func (ddcs DocumentDbCollectionSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for DocumentDbCollectionSource. +func (ddcs DocumentDbCollectionSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for DocumentDbCollectionSource. func (ddcs DocumentDbCollectionSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -82916,7 +85482,7 @@ type DrillLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -83348,6 +85914,11 @@ func (dls DrillLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServ return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for DrillLinkedService. +func (dls DrillLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for DrillLinkedService. func (dls DrillLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -83567,7 +86138,7 @@ type DrillSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -83665,6 +86236,11 @@ func (ds DrillSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for DrillSource. +func (ds DrillSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for DrillSource. func (ds DrillSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -84204,7 +86780,7 @@ type DrillTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -84555,6 +87131,11 @@ func (dtd DrillTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for DrillTableDataset. +func (dtd DrillTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for DrillTableDataset. func (dtd DrillTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -84870,7 +87451,7 @@ type DynamicsAXLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -85302,6 +87883,11 @@ func (dals DynamicsAXLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for DynamicsAXLinkedService. +func (dals DynamicsAXLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for DynamicsAXLinkedService. func (dals DynamicsAXLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -85597,7 +88183,7 @@ type DynamicsAXResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -85948,6 +88534,11 @@ func (dard DynamicsAXResourceDataset) AsTeradataTableDataset() (*TeradataTableDa return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for DynamicsAXResourceDataset. +func (dard DynamicsAXResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for DynamicsAXResourceDataset. func (dard DynamicsAXResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -86247,7 +88838,7 @@ type DynamicsAXSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -86348,6 +88939,11 @@ func (das DynamicsAXSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for DynamicsAXSource. +func (das DynamicsAXSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for DynamicsAXSource. func (das DynamicsAXSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -86896,7 +89492,7 @@ type DynamicsCrmEntityDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -87247,6 +89843,11 @@ func (dced DynamicsCrmEntityDataset) AsTeradataTableDataset() (*TeradataTableDat return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for DynamicsCrmEntityDataset. +func (dced DynamicsCrmEntityDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for DynamicsCrmEntityDataset. func (dced DynamicsCrmEntityDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -87540,7 +90141,7 @@ type DynamicsCrmLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -87972,6 +90573,11 @@ func (dcls DynamicsCrmLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for DynamicsCrmLinkedService. +func (dcls DynamicsCrmLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for DynamicsCrmLinkedService. func (dcls DynamicsCrmLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -88716,7 +91322,7 @@ type DynamicsCrmSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -88811,6 +91417,11 @@ func (dcs DynamicsCrmSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for DynamicsCrmSource. +func (dcs DynamicsCrmSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for DynamicsCrmSource. func (dcs DynamicsCrmSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -89341,7 +91952,7 @@ type DynamicsEntityDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -89692,6 +92303,11 @@ func (ded DynamicsEntityDataset) AsTeradataTableDataset() (*TeradataTableDataset return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for DynamicsEntityDataset. +func (ded DynamicsEntityDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for DynamicsEntityDataset. func (ded DynamicsEntityDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -89985,7 +92601,7 @@ type DynamicsLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -90417,6 +93033,11 @@ func (dls DynamicsLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for DynamicsLinkedService. +func (dls DynamicsLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for DynamicsLinkedService. func (dls DynamicsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -91161,7 +93782,7 @@ type DynamicsSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -91256,6 +93877,11 @@ func (ds DynamicsSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for DynamicsSource. +func (ds DynamicsSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for DynamicsSource. func (ds DynamicsSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -91780,7 +94406,7 @@ type EloquaLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -92212,6 +94838,11 @@ func (els EloquaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for EloquaLinkedService. +func (els EloquaLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for EloquaLinkedService. func (els EloquaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -92518,7 +95149,7 @@ type EloquaObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -92869,6 +95500,11 @@ func (eod EloquaObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for EloquaObjectDataset. +func (eod EloquaObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for EloquaObjectDataset. func (eod EloquaObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -93160,7 +95796,7 @@ type EloquaSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -93258,6 +95894,11 @@ func (es EloquaSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for EloquaSource. +func (es EloquaSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for EloquaSource. func (es EloquaSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -93909,7 +96550,7 @@ type ExcelDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -94260,6 +96901,11 @@ func (ed ExcelDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ExcelDataset. +func (ed ExcelDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ExcelDataset. func (ed ExcelDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -94643,7 +97289,7 @@ type ExcelSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -94736,6 +97382,11 @@ func (es ExcelSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ExcelSource. +func (es ExcelSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ExcelSource. func (es ExcelSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -95263,7 +97914,7 @@ type ExecuteDataFlowActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -95301,6 +97952,11 @@ func (edfa ExecuteDataFlowActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ExecuteDataFlowActivity. +func (edfa ExecuteDataFlowActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ExecuteDataFlowActivity. func (edfa ExecuteDataFlowActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return &edfa, true @@ -95640,7 +98296,7 @@ type ExecutePipelineActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -95672,6 +98328,11 @@ func (epa ExecutePipelineActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ExecutePipelineActivity. +func (epa ExecutePipelineActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ExecutePipelineActivity. func (epa ExecutePipelineActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -95978,6 +98639,56 @@ func (epatp ExecutePipelineActivityTypeProperties) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } +// ExecutePowerQueryActivityTypeProperties execute power query data flow activity properties. +type ExecutePowerQueryActivityTypeProperties struct { + // Sinks - List of Power Query activity sinks mapped to a queryName. + Sinks map[string]*PowerQuerySink `json:"sinks"` + // DataFlow - Data flow reference. + DataFlow *DataFlowReference `json:"dataFlow,omitempty"` + // Staging - Staging info for execute data flow activity. + Staging *DataFlowStagingInfo `json:"staging,omitempty"` + // IntegrationRuntime - The integration runtime reference. + IntegrationRuntime *IntegrationRuntimeReference `json:"integrationRuntime,omitempty"` + // Compute - Compute properties for data flow activity. + Compute *ExecuteDataFlowActivityTypePropertiesCompute `json:"compute,omitempty"` + // TraceLevel - Trace level setting used for data flow monitoring output. Supported values are: 'coarse', 'fine', and 'none'. Type: string (or Expression with resultType string) + TraceLevel interface{} `json:"traceLevel,omitempty"` + // ContinueOnError - Continue on error setting used for data flow execution. Enables processing to continue if a sink fails. Type: boolean (or Expression with resultType boolean) + ContinueOnError interface{} `json:"continueOnError,omitempty"` + // RunConcurrently - Concurrent run setting used for data flow execution. Allows sinks with the same save order to be processed concurrently. Type: boolean (or Expression with resultType boolean) + RunConcurrently interface{} `json:"runConcurrently,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExecutePowerQueryActivityTypeProperties. +func (epqatp ExecutePowerQueryActivityTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if epqatp.Sinks != nil { + objectMap["sinks"] = epqatp.Sinks + } + if epqatp.DataFlow != nil { + objectMap["dataFlow"] = epqatp.DataFlow + } + if epqatp.Staging != nil { + objectMap["staging"] = epqatp.Staging + } + if epqatp.IntegrationRuntime != nil { + objectMap["integrationRuntime"] = epqatp.IntegrationRuntime + } + if epqatp.Compute != nil { + objectMap["compute"] = epqatp.Compute + } + if epqatp.TraceLevel != nil { + objectMap["traceLevel"] = epqatp.TraceLevel + } + if epqatp.ContinueOnError != nil { + objectMap["continueOnError"] = epqatp.ContinueOnError + } + if epqatp.RunConcurrently != nil { + objectMap["runConcurrently"] = epqatp.RunConcurrently + } + return json.Marshal(objectMap) +} + // ExecuteSSISPackageActivity execute SSIS package activity. type ExecuteSSISPackageActivity struct { // ExecuteSSISPackageActivityTypeProperties - Execute SSIS package activity properties. @@ -95996,7 +98707,7 @@ type ExecuteSSISPackageActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -96034,6 +98745,11 @@ func (espa ExecuteSSISPackageActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ExecuteSSISPackageActivity. +func (espa ExecuteSSISPackageActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ExecuteSSISPackageActivity. func (espa ExecuteSSISPackageActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -96403,6 +99119,352 @@ func (espatp ExecuteSSISPackageActivityTypeProperties) MarshalJSON() ([]byte, er return json.Marshal(objectMap) } +// ExecuteWranglingDataflowActivity execute power query activity. +type ExecuteWranglingDataflowActivity struct { + // ExecutePowerQueryActivityTypeProperties - Execute power query activity properties. + *ExecutePowerQueryActivityTypeProperties `json:"typeProperties,omitempty"` + // Policy - Activity policy. + Policy *ActivityPolicy `json:"policy,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Name - Activity name. + Name *string `json:"name,omitempty"` + // Description - Activity description. + Description *string `json:"description,omitempty"` + // DependsOn - Activity depends on condition. + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + // UserProperties - Activity user properties. + UserProperties *[]UserProperty `json:"userProperties,omitempty"` + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + Type TypeBasicActivity `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) MarshalJSON() ([]byte, error) { + ewda.Type = TypeBasicActivityTypeExecuteWranglingDataflow + objectMap := make(map[string]interface{}) + if ewda.ExecutePowerQueryActivityTypeProperties != nil { + objectMap["typeProperties"] = ewda.ExecutePowerQueryActivityTypeProperties + } + if ewda.Policy != nil { + objectMap["policy"] = ewda.Policy + } + if ewda.Name != nil { + objectMap["name"] = ewda.Name + } + if ewda.Description != nil { + objectMap["description"] = ewda.Description + } + if ewda.DependsOn != nil { + objectMap["dependsOn"] = ewda.DependsOn + } + if ewda.UserProperties != nil { + objectMap["userProperties"] = ewda.UserProperties + } + if ewda.Type != "" { + objectMap["type"] = ewda.Type + } + for k, v := range ewda.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return &ewda, true +} + +// AsExecuteDataFlowActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { + return nil, false +} + +// AsAzureFunctionActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsAzureFunctionActivity() (*AzureFunctionActivity, bool) { + return nil, false +} + +// AsDatabricksSparkPythonActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsDatabricksSparkPythonActivity() (*DatabricksSparkPythonActivity, bool) { + return nil, false +} + +// AsDatabricksSparkJarActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsDatabricksSparkJarActivity() (*DatabricksSparkJarActivity, bool) { + return nil, false +} + +// AsDatabricksNotebookActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) { + return nil, false +} + +// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) { + return nil, false +} + +// AsAzureMLExecutePipelineActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsAzureMLExecutePipelineActivity() (*AzureMLExecutePipelineActivity, bool) { + return nil, false +} + +// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) { + return nil, false +} + +// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) { + return nil, false +} + +// AsGetMetadataActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) { + return nil, false +} + +// AsWebActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsWebActivity() (*WebActivity, bool) { + return nil, false +} + +// AsLookupActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsLookupActivity() (*LookupActivity, bool) { + return nil, false +} + +// AsAzureDataExplorerCommandActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsAzureDataExplorerCommandActivity() (*AzureDataExplorerCommandActivity, bool) { + return nil, false +} + +// AsDeleteActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsDeleteActivity() (*DeleteActivity, bool) { + return nil, false +} + +// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) { + return nil, false +} + +// AsCustomActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsCustomActivity() (*CustomActivity, bool) { + return nil, false +} + +// AsExecuteSSISPackageActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) { + return nil, false +} + +// AsHDInsightSparkActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) { + return nil, false +} + +// AsHDInsightStreamingActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) { + return nil, false +} + +// AsHDInsightMapReduceActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) { + return nil, false +} + +// AsHDInsightPigActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) { + return nil, false +} + +// AsHDInsightHiveActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) { + return nil, false +} + +// AsCopyActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsCopyActivity() (*CopyActivity, bool) { + return nil, false +} + +// AsExecutionActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsExecutionActivity() (*ExecutionActivity, bool) { + return nil, false +} + +// AsBasicExecutionActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) { + return nil, false +} + +// AsWebHookActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsWebHookActivity() (*WebHookActivity, bool) { + return nil, false +} + +// AsAppendVariableActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsAppendVariableActivity() (*AppendVariableActivity, bool) { + return nil, false +} + +// AsSetVariableActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsSetVariableActivity() (*SetVariableActivity, bool) { + return nil, false +} + +// AsFilterActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsFilterActivity() (*FilterActivity, bool) { + return nil, false +} + +// AsValidationActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsValidationActivity() (*ValidationActivity, bool) { + return nil, false +} + +// AsUntilActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsUntilActivity() (*UntilActivity, bool) { + return nil, false +} + +// AsWaitActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsWaitActivity() (*WaitActivity, bool) { + return nil, false +} + +// AsForEachActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsForEachActivity() (*ForEachActivity, bool) { + return nil, false +} + +// AsSwitchActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsSwitchActivity() (*SwitchActivity, bool) { + return nil, false +} + +// AsIfConditionActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsIfConditionActivity() (*IfConditionActivity, bool) { + return nil, false +} + +// AsExecutePipelineActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) { + return nil, false +} + +// AsControlActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsControlActivity() (*ControlActivity, bool) { + return nil, false +} + +// AsBasicControlActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsBasicControlActivity() (BasicControlActivity, bool) { + return nil, false +} + +// AsActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsActivity() (*Activity, bool) { + return nil, false +} + +// AsBasicActivity is the BasicActivity implementation for ExecuteWranglingDataflowActivity. +func (ewda ExecuteWranglingDataflowActivity) AsBasicActivity() (BasicActivity, bool) { + return &ewda, true +} + +// UnmarshalJSON is the custom unmarshaler for ExecuteWranglingDataflowActivity struct. +func (ewda *ExecuteWranglingDataflowActivity) 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 "typeProperties": + if v != nil { + var executePowerQueryActivityTypeProperties ExecutePowerQueryActivityTypeProperties + err = json.Unmarshal(*v, &executePowerQueryActivityTypeProperties) + if err != nil { + return err + } + ewda.ExecutePowerQueryActivityTypeProperties = &executePowerQueryActivityTypeProperties + } + case "policy": + if v != nil { + var policy ActivityPolicy + err = json.Unmarshal(*v, &policy) + if err != nil { + return err + } + ewda.Policy = &policy + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if ewda.AdditionalProperties == nil { + ewda.AdditionalProperties = make(map[string]interface{}) + } + ewda.AdditionalProperties[k] = additionalProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ewda.Name = &name + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + ewda.Description = &description + } + case "dependsOn": + if v != nil { + var dependsOn []ActivityDependency + err = json.Unmarshal(*v, &dependsOn) + if err != nil { + return err + } + ewda.DependsOn = &dependsOn + } + case "userProperties": + if v != nil { + var userProperties []UserProperty + err = json.Unmarshal(*v, &userProperties) + if err != nil { + return err + } + ewda.UserProperties = &userProperties + } + case "type": + if v != nil { + var typeVar TypeBasicActivity + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ewda.Type = typeVar + } + } + } + + return nil +} + // BasicExecutionActivity base class for all execution activities. type BasicExecutionActivity interface { AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) @@ -96447,7 +99509,7 @@ type ExecutionActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -96607,6 +99669,11 @@ func (ea ExecutionActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ExecutionActivity. +func (ea ExecutionActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ExecutionActivity. func (ea ExecutionActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -97833,7 +100900,7 @@ type FileServerLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -98265,6 +101332,11 @@ func (fsls FileServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for FileServerLinkedService. +func (fsls FileServerLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for FileServerLinkedService. func (fsls FileServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -99137,7 +102209,7 @@ type FileShareDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -99488,6 +102560,11 @@ func (fsd FileShareDataset) AsTeradataTableDataset() (*TeradataTableDataset, boo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for FileShareDataset. +func (fsd FileShareDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for FileShareDataset. func (fsd FileShareDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -100231,7 +103308,7 @@ type FileSystemSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -100326,6 +103403,11 @@ func (fss FileSystemSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for FileSystemSource. +func (fss FileSystemSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for FileSystemSource. func (fss FileSystemSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -100850,7 +103932,7 @@ type FilterActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -100882,6 +103964,11 @@ func (fa FilterActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for FilterActivity. +func (fa FilterActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for FilterActivity. func (fa FilterActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -101185,7 +104272,7 @@ type ForEachActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -101217,6 +104304,11 @@ func (fea ForEachActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ForEachActivity. +func (fea ForEachActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ForEachActivity. func (fea ForEachActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -102146,7 +105238,7 @@ type FtpServerLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -102578,6 +105670,11 @@ func (fsls FtpServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinke return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for FtpServerLinkedService. +func (fsls FtpServerLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for FtpServerLinkedService. func (fsls FtpServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -103115,7 +106212,7 @@ type GetMetadataActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -103153,6 +106250,11 @@ func (gma GetMetadataActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for GetMetadataActivity. +func (gma GetMetadataActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for GetMetadataActivity. func (gma GetMetadataActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -103568,7 +106670,7 @@ type GoogleAdWordsLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -104000,6 +107102,11 @@ func (gawls GoogleAdWordsLinkedService) AsAzureMySQLLinkedService() (*AzureMySQL return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for GoogleAdWordsLinkedService. +func (gawls GoogleAdWordsLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for GoogleAdWordsLinkedService. func (gawls GoogleAdWordsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -104348,7 +107455,7 @@ type GoogleAdWordsObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -104699,6 +107806,11 @@ func (gawod GoogleAdWordsObjectDataset) AsTeradataTableDataset() (*TeradataTable return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for GoogleAdWordsObjectDataset. +func (gawod GoogleAdWordsObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for GoogleAdWordsObjectDataset. func (gawod GoogleAdWordsObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -104990,7 +108102,7 @@ type GoogleAdWordsSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -105088,6 +108200,11 @@ func (gaws GoogleAdWordsSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for GoogleAdWordsSource. +func (gaws GoogleAdWordsSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for GoogleAdWordsSource. func (gaws GoogleAdWordsSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -105631,7 +108748,7 @@ type GoogleBigQueryLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -106063,6 +109180,11 @@ func (gbqls GoogleBigQueryLinkedService) AsAzureMySQLLinkedService() (*AzureMySQ return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService. +func (gbqls GoogleBigQueryLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService. func (gbqls GoogleBigQueryLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -106423,7 +109545,7 @@ type GoogleBigQueryObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -106774,6 +109896,11 @@ func (gbqod GoogleBigQueryObjectDataset) AsTeradataTableDataset() (*TeradataTabl return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset. +func (gbqod GoogleBigQueryObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset. func (gbqod GoogleBigQueryObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -107065,7 +110192,7 @@ type GoogleBigQuerySource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -107163,6 +110290,11 @@ func (gbqs GoogleBigQuerySource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for GoogleBigQuerySource. +func (gbqs GoogleBigQuerySource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for GoogleBigQuerySource. func (gbqs GoogleBigQuerySource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -107696,7 +110828,7 @@ type GoogleCloudStorageLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -108128,6 +111260,11 @@ func (gcsls GoogleCloudStorageLinkedService) AsAzureMySQLLinkedService() (*Azure return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for GoogleCloudStorageLinkedService. +func (gcsls GoogleCloudStorageLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for GoogleCloudStorageLinkedService. func (gcsls GoogleCloudStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -108893,7 +112030,7 @@ type GreenplumLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -109325,6 +112462,11 @@ func (gls GreenplumLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for GreenplumLinkedService. +func (gls GreenplumLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for GreenplumLinkedService. func (gls GreenplumLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -109544,7 +112686,7 @@ type GreenplumSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -109642,6 +112784,11 @@ func (gs GreenplumSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for GreenplumSource. +func (gs GreenplumSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for GreenplumSource. func (gs GreenplumSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -110181,7 +113328,7 @@ type GreenplumTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -110532,6 +113679,11 @@ func (gtd GreenplumTableDataset) AsTeradataTableDataset() (*TeradataTableDataset return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for GreenplumTableDataset. +func (gtd GreenplumTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for GreenplumTableDataset. func (gtd GreenplumTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -110819,7 +113971,7 @@ type HBaseLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -111251,6 +114403,11 @@ func (hbls HBaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HBaseLinkedService. +func (hbls HBaseLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HBaseLinkedService. func (hbls HBaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -111601,7 +114758,7 @@ type HBaseObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -111952,6 +115109,11 @@ func (hbod HBaseObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for HBaseObjectDataset. +func (hbod HBaseObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for HBaseObjectDataset. func (hbod HBaseObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -112243,7 +115405,7 @@ type HBaseSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -112341,6 +115503,11 @@ func (hbs HBaseSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for HBaseSource. +func (hbs HBaseSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for HBaseSource. func (hbs HBaseSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -112874,7 +116041,7 @@ type HdfsLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -113306,6 +116473,11 @@ func (hls HdfsLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HdfsLinkedService. +func (hls HdfsLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HdfsLinkedService. func (hls HdfsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -114046,7 +117218,7 @@ type HdfsSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -114141,6 +117313,11 @@ func (hs HdfsSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for HdfsSource. +func (hs HdfsSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for HdfsSource. func (hs HdfsSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -114669,7 +117846,7 @@ type HDInsightHiveActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -114707,6 +117884,11 @@ func (hiha HDInsightHiveActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for HDInsightHiveActivity. +func (hiha HDInsightHiveActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for HDInsightHiveActivity. func (hiha HDInsightHiveActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -115070,7 +118252,7 @@ type HDInsightLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -115502,6 +118684,11 @@ func (hils HDInsightLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinke return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HDInsightLinkedService. +func (hils HDInsightLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HDInsightLinkedService. func (hils HDInsightLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -115817,7 +119004,7 @@ type HDInsightMapReduceActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -115855,6 +119042,11 @@ func (himra HDInsightMapReduceActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for HDInsightMapReduceActivity. +func (himra HDInsightMapReduceActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for HDInsightMapReduceActivity. func (himra HDInsightMapReduceActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -116218,7 +119410,7 @@ type HDInsightOnDemandLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -116650,6 +119842,11 @@ func (hiodls HDInsightOnDemandLinkedService) AsAzureMySQLLinkedService() (*Azure return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService. +func (hiodls HDInsightOnDemandLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService. func (hiodls HDInsightOnDemandLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -117249,7 +120446,7 @@ type HDInsightPigActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -117287,6 +120484,11 @@ func (hipa HDInsightPigActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for HDInsightPigActivity. +func (hipa HDInsightPigActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for HDInsightPigActivity. func (hipa HDInsightPigActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -117644,7 +120846,7 @@ type HDInsightSparkActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -117682,6 +120884,11 @@ func (hisa HDInsightSparkActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for HDInsightSparkActivity. +func (hisa HDInsightSparkActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for HDInsightSparkActivity. func (hisa HDInsightSparkActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -118049,7 +121256,7 @@ type HDInsightStreamingActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -118087,6 +121294,11 @@ func (hisa HDInsightStreamingActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for HDInsightStreamingActivity. +func (hisa HDInsightStreamingActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for HDInsightStreamingActivity. func (hisa HDInsightStreamingActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -118480,7 +121692,7 @@ type HiveLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -118912,6 +122124,11 @@ func (hls HiveLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HiveLinkedService. +func (hls HiveLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HiveLinkedService. func (hls HiveLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -119328,7 +122545,7 @@ type HiveObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -119679,6 +122896,11 @@ func (hod HiveObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for HiveObjectDataset. +func (hod HiveObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for HiveObjectDataset. func (hod HiveObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -119970,7 +123192,7 @@ type HiveSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -120068,6 +123290,11 @@ func (hs HiveSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for HiveSource. +func (hs HiveSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for HiveSource. func (hs HiveSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -120607,7 +123834,7 @@ type HTTPDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -120958,6 +124185,11 @@ func (hd HTTPDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for HTTPDataset. +func (hd HTTPDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for HTTPDataset. func (hd HTTPDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -121330,7 +124562,7 @@ type HTTPLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -121762,6 +124994,11 @@ func (hls HTTPLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HTTPLinkedService. +func (hls HTTPLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HTTPLinkedService. func (hls HTTPLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -122502,7 +125739,7 @@ type HTTPSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -122594,6 +125831,11 @@ func (hs HTTPSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for HTTPSource. +func (hs HTTPSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for HTTPSource. func (hs HTTPSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -123109,7 +126351,7 @@ type HubspotLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -123541,6 +126783,11 @@ func (hls HubspotLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for HubspotLinkedService. +func (hls HubspotLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for HubspotLinkedService. func (hls HubspotLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -123856,7 +127103,7 @@ type HubspotObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -124207,6 +127454,11 @@ func (hod HubspotObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for HubspotObjectDataset. +func (hod HubspotObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for HubspotObjectDataset. func (hod HubspotObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -124498,7 +127750,7 @@ type HubspotSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -124596,6 +127848,11 @@ func (hs HubspotSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for HubspotSource. +func (hs HubspotSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for HubspotSource. func (hs HubspotSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -125131,7 +128388,7 @@ type IfConditionActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -125163,6 +128420,11 @@ func (ica IfConditionActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for IfConditionActivity. +func (ica IfConditionActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for IfConditionActivity. func (ica IfConditionActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -125518,7 +128780,7 @@ type ImpalaLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -125950,6 +129212,11 @@ func (ils ImpalaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ImpalaLinkedService. +func (ils ImpalaLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ImpalaLinkedService. func (ils ImpalaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -126300,7 +129567,7 @@ type ImpalaObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -126651,6 +129918,11 @@ func (iod ImpalaObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ImpalaObjectDataset. +func (iod ImpalaObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ImpalaObjectDataset. func (iod ImpalaObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -126942,7 +130214,7 @@ type ImpalaSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -127040,6 +130312,11 @@ func (is ImpalaSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ImpalaSource. +func (is ImpalaSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ImpalaSource. func (is ImpalaSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -127698,7 +130975,7 @@ type InformixLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -128130,6 +131407,11 @@ func (ils InformixLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for InformixLinkedService. +func (ils InformixLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for InformixLinkedService. func (ils InformixLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -128782,7 +132064,7 @@ type InformixSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -128880,6 +132162,11 @@ func (is InformixSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for InformixSource. +func (is InformixSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for InformixSource. func (is InformixSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -129419,7 +132706,7 @@ type InformixTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -129770,6 +133057,11 @@ func (itd InformixTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for InformixTableDataset. +func (itd InformixTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for InformixTableDataset. func (itd InformixTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -131750,7 +135042,7 @@ type JiraLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -132182,6 +135474,11 @@ func (jls JiraLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for JiraLinkedService. +func (jls JiraLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for JiraLinkedService. func (jls JiraLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -132499,7 +135796,7 @@ type JiraObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -132850,6 +136147,11 @@ func (jod JiraObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for JiraObjectDataset. +func (jod JiraObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for JiraObjectDataset. func (jod JiraObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -133141,7 +136443,7 @@ type JiraSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -133239,6 +136541,11 @@ func (js JiraSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for JiraSource. +func (js JiraSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for JiraSource. func (js JiraSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -133778,7 +137085,7 @@ type JSONDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -134129,6 +137436,11 @@ func (jd JSONDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for JSONDataset. +func (jd JSONDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for JSONDataset. func (jd JSONDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -135129,7 +138441,7 @@ type JSONSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -135225,6 +138537,11 @@ func (js JSONSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for JSONSource. +func (js JSONSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for JSONSource. func (js JSONSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -136165,6 +139482,7 @@ type BasicLinkedService interface { AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) AsMySQLLinkedService() (*MySQLLinkedService, bool) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) + AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) AsOracleLinkedService() (*OracleLinkedService, bool) AsGoogleCloudStorageLinkedService() (*GoogleCloudStorageLinkedService, bool) AsOracleCloudStorageLinkedService() (*OracleCloudStorageLinkedService, bool) @@ -136201,7 +139519,7 @@ type LinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -136533,6 +139851,10 @@ func unmarshalBasicLinkedService(body []byte) (BasicLinkedService, error) { var amsls AzureMySQLLinkedService err := json.Unmarshal(body, &amsls) return amsls, err + case string(TypeBasicLinkedServiceTypeAmazonRdsForOracle): + var arfols AmazonRdsForOracleLinkedService + err := json.Unmarshal(body, &arfols) + return arfols, err case string(TypeBasicLinkedServiceTypeOracle): var ols OracleLinkedService err := json.Unmarshal(body, &ols) @@ -137063,6 +140385,11 @@ func (ls LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, b return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for LinkedService. +func (ls LinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for LinkedService. func (ls LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -137684,7 +141011,7 @@ type LookupActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -137722,6 +141049,11 @@ func (la LookupActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for LookupActivity. +func (la LookupActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for LookupActivity. func (la LookupActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -138086,7 +141418,7 @@ type MagentoLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -138518,6 +141850,11 @@ func (mls MagentoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MagentoLinkedService. +func (mls MagentoLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MagentoLinkedService. func (mls MagentoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -138813,7 +142150,7 @@ type MagentoObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -139164,6 +142501,11 @@ func (mod MagentoObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MagentoObjectDataset. +func (mod MagentoObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MagentoObjectDataset. func (mod MagentoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -139455,7 +142797,7 @@ type MagentoSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -139553,6 +142895,11 @@ func (ms MagentoSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MagentoSource. +func (ms MagentoSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MagentoSource. func (ms MagentoSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -141096,7 +144443,7 @@ type MappingDataFlow struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this data flow is in. If not specified, Data flow will appear at the root level. Folder *DataFlowFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDataFlowTypeDataFlow', 'TypeBasicDataFlowTypeMappingDataFlow' + // Type - Possible values include: 'TypeBasicDataFlowTypeDataFlow', 'TypeBasicDataFlowTypeWranglingDataFlow', 'TypeBasicDataFlowTypeMappingDataFlow' Type TypeBasicDataFlow `json:"type,omitempty"` } @@ -141122,6 +144469,11 @@ func (mdf MappingDataFlow) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsWranglingDataFlow is the BasicDataFlow implementation for MappingDataFlow. +func (mdf MappingDataFlow) AsWranglingDataFlow() (*WranglingDataFlow, bool) { + return nil, false +} + // AsMappingDataFlow is the BasicDataFlow implementation for MappingDataFlow. func (mdf MappingDataFlow) AsMappingDataFlow() (*MappingDataFlow, bool) { return &mdf, true @@ -141223,7 +144575,7 @@ type MariaDBLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -141655,6 +145007,11 @@ func (mdls MariaDBLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MariaDBLinkedService. +func (mdls MariaDBLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MariaDBLinkedService. func (mdls MariaDBLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -141874,7 +145231,7 @@ type MariaDBSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -141972,6 +145329,11 @@ func (mds MariaDBSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MariaDBSource. +func (mds MariaDBSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MariaDBSource. func (mds MariaDBSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -142511,7 +145873,7 @@ type MariaDBTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -142862,6 +146224,11 @@ func (mdtd MariaDBTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MariaDBTableDataset. +func (mdtd MariaDBTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MariaDBTableDataset. func (mdtd MariaDBTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -143149,7 +146516,7 @@ type MarketoLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -143581,6 +146948,11 @@ func (mls MarketoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MarketoLinkedService. +func (mls MarketoLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MarketoLinkedService. func (mls MarketoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -143887,7 +147259,7 @@ type MarketoObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -144238,6 +147610,11 @@ func (mod MarketoObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MarketoObjectDataset. +func (mod MarketoObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MarketoObjectDataset. func (mod MarketoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -144529,7 +147906,7 @@ type MarketoSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -144627,6 +148004,11 @@ func (ms MarketoSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MarketoSource. +func (ms MarketoSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MarketoSource. func (ms MarketoSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -145168,7 +148550,7 @@ type MicrosoftAccessLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -145600,6 +148982,11 @@ func (mals MicrosoftAccessLinkedService) AsAzureMySQLLinkedService() (*AzureMySQ return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MicrosoftAccessLinkedService. +func (mals MicrosoftAccessLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MicrosoftAccessLinkedService. func (mals MicrosoftAccessLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -146250,7 +149637,7 @@ type MicrosoftAccessSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -146345,6 +149732,11 @@ func (mas MicrosoftAccessSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MicrosoftAccessSource. +func (mas MicrosoftAccessSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MicrosoftAccessSource. func (mas MicrosoftAccessSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -146875,7 +150267,7 @@ type MicrosoftAccessTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -147226,6 +150618,11 @@ func (matd MicrosoftAccessTableDataset) AsTeradataTableDataset() (*TeradataTable return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MicrosoftAccessTableDataset. +func (matd MicrosoftAccessTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MicrosoftAccessTableDataset. func (matd MicrosoftAccessTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -147525,7 +150922,7 @@ type MongoDbAtlasCollectionDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -147876,6 +151273,11 @@ func (mdacd MongoDbAtlasCollectionDataset) AsTeradataTableDataset() (*TeradataTa return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MongoDbAtlasCollectionDataset. +func (mdacd MongoDbAtlasCollectionDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MongoDbAtlasCollectionDataset. func (mdacd MongoDbAtlasCollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -148169,7 +151571,7 @@ type MongoDbAtlasLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -148601,6 +152003,11 @@ func (mdals MongoDbAtlasLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLL return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MongoDbAtlasLinkedService. +func (mdals MongoDbAtlasLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MongoDbAtlasLinkedService. func (mdals MongoDbAtlasLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -149182,7 +152589,7 @@ type MongoDbAtlasSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -149286,6 +152693,11 @@ func (mdas MongoDbAtlasSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MongoDbAtlasSource. +func (mdas MongoDbAtlasSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MongoDbAtlasSource. func (mdas MongoDbAtlasSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -149843,7 +153255,7 @@ type MongoDbCollectionDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -150194,6 +153606,11 @@ func (mdcd MongoDbCollectionDataset) AsTeradataTableDataset() (*TeradataTableDat return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MongoDbCollectionDataset. +func (mdcd MongoDbCollectionDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MongoDbCollectionDataset. func (mdcd MongoDbCollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -150585,7 +154002,7 @@ type MongoDbLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -151017,6 +154434,11 @@ func (mdls MongoDbLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MongoDbLinkedService. +func (mdls MongoDbLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MongoDbLinkedService. func (mdls MongoDbLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -151352,7 +154774,7 @@ type MongoDbSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -151447,6 +154869,11 @@ func (mds MongoDbSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MongoDbSource. +func (mds MongoDbSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MongoDbSource. func (mds MongoDbSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -151977,7 +155404,7 @@ type MongoDbV2CollectionDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -152328,6 +155755,11 @@ func (mdvcd MongoDbV2CollectionDataset) AsTeradataTableDataset() (*TeradataTable return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MongoDbV2CollectionDataset. +func (mdvcd MongoDbV2CollectionDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MongoDbV2CollectionDataset. func (mdvcd MongoDbV2CollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -152621,7 +156053,7 @@ type MongoDbV2LinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -153053,6 +156485,11 @@ func (mdvls MongoDbV2LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MongoDbV2LinkedService. +func (mdvls MongoDbV2LinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MongoDbV2LinkedService. func (mdvls MongoDbV2LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -153634,7 +157071,7 @@ type MongoDbV2Source struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -153738,6 +157175,11 @@ func (mdvs MongoDbV2Source) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MongoDbV2Source. +func (mdvs MongoDbV2Source) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MongoDbV2Source. func (mdvs MongoDbV2Source) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -154512,7 +157954,7 @@ type MySQLLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -154944,6 +158386,11 @@ func (msls MySQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for MySQLLinkedService. +func (msls MySQLLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for MySQLLinkedService. func (msls MySQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -155163,7 +158610,7 @@ type MySQLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -155261,6 +158708,11 @@ func (mss MySQLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for MySQLSource. +func (mss MySQLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for MySQLSource. func (mss MySQLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -155800,7 +159252,7 @@ type MySQLTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -156151,6 +159603,11 @@ func (mstd MySQLTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, b return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for MySQLTableDataset. +func (mstd MySQLTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for MySQLTableDataset. func (mstd MySQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -156444,7 +159901,7 @@ type NetezzaLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -156876,6 +160333,11 @@ func (nls NetezzaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for NetezzaLinkedService. +func (nls NetezzaLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for NetezzaLinkedService. func (nls NetezzaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -157109,7 +160571,7 @@ type NetezzaSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -157213,6 +160675,11 @@ func (ns NetezzaSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for NetezzaSource. +func (ns NetezzaSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for NetezzaSource. func (ns NetezzaSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -157770,7 +161237,7 @@ type NetezzaTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -158121,6 +161588,11 @@ func (ntd NetezzaTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for NetezzaTableDataset. +func (ntd NetezzaTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for NetezzaTableDataset. func (ntd NetezzaTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -158418,7 +161890,7 @@ type ODataLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -158850,6 +162322,11 @@ func (odls ODataLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ODataLinkedService. +func (odls ODataLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ODataLinkedService. func (odls ODataLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -159230,7 +162707,7 @@ type ODataResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -159581,6 +163058,11 @@ func (odrd ODataResourceDataset) AsTeradataTableDataset() (*TeradataTableDataset return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ODataResourceDataset. +func (odrd ODataResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ODataResourceDataset. func (odrd ODataResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -159878,7 +163360,7 @@ type ODataSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -159976,6 +163458,11 @@ func (ods ODataSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ODataSource. +func (ods ODataSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ODataSource. func (ods ODataSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -160509,7 +163996,7 @@ type OdbcLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -160941,6 +164428,11 @@ func (ols OdbcLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for OdbcLinkedService. +func (ols OdbcLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for OdbcLinkedService. func (ols OdbcLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -161593,7 +165085,7 @@ type OdbcSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -161691,6 +165183,11 @@ func (osVar OdbcSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for OdbcSource. +func (osVar OdbcSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for OdbcSource. func (osVar OdbcSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -162230,7 +165727,7 @@ type OdbcTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -162581,6 +166078,11 @@ func (otd OdbcTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, boo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for OdbcTableDataset. +func (otd OdbcTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for OdbcTableDataset. func (otd OdbcTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -162880,7 +166382,7 @@ type Office365Dataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -163231,6 +166733,11 @@ func (o3d Office365Dataset) AsTeradataTableDataset() (*TeradataTableDataset, boo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for Office365Dataset. +func (o3d Office365Dataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for Office365Dataset. func (o3d Office365Dataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -163526,7 +167033,7 @@ type Office365LinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -163958,6 +167465,11 @@ func (o3ls Office365LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinke return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for Office365LinkedService. +func (o3ls Office365LinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for Office365LinkedService. func (o3ls Office365LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -164246,7 +167758,7 @@ type Office365Source struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -164353,6 +167865,11 @@ func (o3s Office365Source) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for Office365Source. +func (o3s Office365Source) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for Office365Source. func (o3s Office365Source) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -165231,7 +168748,7 @@ type OracleCloudStorageLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -165663,6 +169180,11 @@ func (ocsls OracleCloudStorageLinkedService) AsAzureMySQLLinkedService() (*Azure return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for OracleCloudStorageLinkedService. +func (ocsls OracleCloudStorageLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for OracleCloudStorageLinkedService. func (ocsls OracleCloudStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -166418,7 +169940,7 @@ type OracleLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -166850,6 +170372,11 @@ func (ols OracleLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for OracleLinkedService. +func (ols OracleLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for OracleLinkedService. func (ols OracleLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return &ols, true @@ -167077,7 +170604,7 @@ type OracleServiceCloudLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -167509,6 +171036,11 @@ func (oscls OracleServiceCloudLinkedService) AsAzureMySQLLinkedService() (*Azure return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for OracleServiceCloudLinkedService. +func (oscls OracleServiceCloudLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for OracleServiceCloudLinkedService. func (oscls OracleServiceCloudLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -167815,7 +171347,7 @@ type OracleServiceCloudObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -168166,6 +171698,11 @@ func (oscod OracleServiceCloudObjectDataset) AsTeradataTableDataset() (*Teradata return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for OracleServiceCloudObjectDataset. +func (oscod OracleServiceCloudObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for OracleServiceCloudObjectDataset. func (oscod OracleServiceCloudObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -168457,7 +171994,7 @@ type OracleServiceCloudSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -168555,6 +172092,11 @@ func (oscs OracleServiceCloudSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for OracleServiceCloudSource. +func (oscs OracleServiceCloudSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for OracleServiceCloudSource. func (oscs OracleServiceCloudSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -169456,7 +172998,7 @@ type OracleSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -169560,6 +173102,11 @@ func (osVar OracleSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for OracleSource. +func (osVar OracleSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for OracleSource. func (osVar OracleSource) AsOracleSource() (*OracleSource, bool) { return &osVar, true @@ -170117,7 +173664,7 @@ type OracleTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -170468,6 +174015,11 @@ func (otd OracleTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, b return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for OracleTableDataset. +func (otd OracleTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for OracleTableDataset. func (otd OracleTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return &otd, true @@ -170771,7 +174323,7 @@ type OrcDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -171122,6 +174674,11 @@ func (od OrcDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for OrcDataset. +func (od OrcDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for OrcDataset. func (od OrcDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -171942,7 +175499,7 @@ type OrcSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -172035,6 +175592,11 @@ func (osVar OrcSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for OrcSource. +func (osVar OrcSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for OrcSource. func (osVar OrcSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -172700,7 +176262,7 @@ type ParquetDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -173051,6 +176613,11 @@ func (pd ParquetDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ParquetDataset. +func (pd ParquetDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ParquetDataset. func (pd ParquetDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -173871,7 +177438,7 @@ type ParquetSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -173964,6 +177531,11 @@ func (ps ParquetSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ParquetSource. +func (ps ParquetSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ParquetSource. func (ps ParquetSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -174607,7 +178179,7 @@ type PaypalLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -175039,6 +178611,11 @@ func (pls PaypalLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for PaypalLinkedService. +func (pls PaypalLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for PaypalLinkedService. func (pls PaypalLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -175345,7 +178922,7 @@ type PaypalObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -175696,6 +179273,11 @@ func (pod PaypalObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for PaypalObjectDataset. +func (pod PaypalObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for PaypalObjectDataset. func (pod PaypalObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -175987,7 +179569,7 @@ type PaypalSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -176085,6 +179667,11 @@ func (ps PaypalSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for PaypalSource. +func (ps PaypalSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for PaypalSource. func (ps PaypalSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -176628,7 +180215,7 @@ type PhoenixLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -177060,6 +180647,11 @@ func (pls PhoenixLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for PhoenixLinkedService. +func (pls PhoenixLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for PhoenixLinkedService. func (pls PhoenixLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -177421,7 +181013,7 @@ type PhoenixObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -177772,6 +181364,11 @@ func (pod PhoenixObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for PhoenixObjectDataset. +func (pod PhoenixObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for PhoenixObjectDataset. func (pod PhoenixObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -178063,7 +181660,7 @@ type PhoenixSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -178161,6 +181758,11 @@ func (ps PhoenixSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for PhoenixSource. +func (ps PhoenixSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for PhoenixSource. func (ps PhoenixSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -179444,7 +183046,7 @@ type PostgreSQLLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -179876,6 +183478,11 @@ func (psls PostgreSQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService. +func (psls PostgreSQLLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService. func (psls PostgreSQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -180095,7 +183702,7 @@ type PostgreSQLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -180193,6 +183800,11 @@ func (pss PostgreSQLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for PostgreSQLSource. +func (pss PostgreSQLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for PostgreSQLSource. func (pss PostgreSQLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -180732,7 +184344,7 @@ type PostgreSQLTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -181083,6 +184695,11 @@ func (pstd PostgreSQLTableDataset) AsTeradataTableDataset() (*TeradataTableDatas return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for PostgreSQLTableDataset. +func (pstd PostgreSQLTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for PostgreSQLTableDataset. func (pstd PostgreSQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -181366,6 +184983,46 @@ type PostgreSQLTableDatasetTypeProperties struct { Schema interface{} `json:"schema,omitempty"` } +// PowerQuerySink power query sink. +type PowerQuerySink struct { + // Script - sink script. + Script *string `json:"script,omitempty"` + // Dataset - Dataset reference. + Dataset *DatasetReference `json:"dataset,omitempty"` + // LinkedService - Linked service reference. + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + // SchemaLinkedService - Schema linked service reference. + SchemaLinkedService *LinkedServiceReference `json:"schemaLinkedService,omitempty"` + // Name - Transformation name. + Name *string `json:"name,omitempty"` + // Description - Transformation description. + Description *string `json:"description,omitempty"` +} + +// PowerQuerySource power query source. +type PowerQuerySource struct { + // Script - source script. + Script *string `json:"script,omitempty"` + // Dataset - Dataset reference. + Dataset *DatasetReference `json:"dataset,omitempty"` + // LinkedService - Linked service reference. + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + // SchemaLinkedService - Schema linked service reference. + SchemaLinkedService *LinkedServiceReference `json:"schemaLinkedService,omitempty"` + // Name - Transformation name. + Name *string `json:"name,omitempty"` + // Description - Transformation description. + Description *string `json:"description,omitempty"` +} + +// PowerQueryTypeProperties power Query data flow type properties. +type PowerQueryTypeProperties struct { + // Sources - List of sources in Power Query. + Sources *[]PowerQuerySource `json:"sources,omitempty"` + // Script - Power query mashup script. + Script *string `json:"script,omitempty"` +} + // PrestoDatasetTypeProperties presto Dataset Properties type PrestoDatasetTypeProperties struct { // TableName - This property will be retired. Please consider using schema + table properties instead. @@ -181390,7 +185047,7 @@ type PrestoLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -181822,6 +185479,11 @@ func (pls PrestoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for PrestoLinkedService. +func (pls PrestoLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for PrestoLinkedService. func (pls PrestoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -182205,7 +185867,7 @@ type PrestoObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -182556,6 +186218,11 @@ func (pod PrestoObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for PrestoObjectDataset. +func (pod PrestoObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for PrestoObjectDataset. func (pod PrestoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -182847,7 +186514,7 @@ type PrestoSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -182945,6 +186612,11 @@ func (ps PrestoSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for PrestoSource. +func (ps PrestoSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for PrestoSource. func (ps PrestoSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -183905,7 +187577,7 @@ type QuickBooksLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -184337,6 +188009,11 @@ func (qbls QuickBooksLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService. +func (qbls QuickBooksLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService. func (qbls QuickBooksLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -184663,7 +188340,7 @@ type QuickBooksObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -185014,6 +188691,11 @@ func (qbod QuickBooksObjectDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for QuickBooksObjectDataset. +func (qbod QuickBooksObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for QuickBooksObjectDataset. func (qbod QuickBooksObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -185305,7 +188987,7 @@ type QuickBooksSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -185403,6 +189085,11 @@ func (qbs QuickBooksSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for QuickBooksSource. +func (qbs QuickBooksSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for QuickBooksSource. func (qbs QuickBooksSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -186200,7 +189887,7 @@ type RelationalSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -186295,6 +189982,11 @@ func (rs RelationalSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for RelationalSource. +func (rs RelationalSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for RelationalSource. func (rs RelationalSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -186825,7 +190517,7 @@ type RelationalTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -187176,6 +190868,11 @@ func (rtd RelationalTableDataset) AsTeradataTableDataset() (*TeradataTableDatase return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for RelationalTableDataset. +func (rtd RelationalTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for RelationalTableDataset. func (rtd RelationalTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -187696,7 +191393,7 @@ type ResponsysLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -188128,6 +191825,11 @@ func (rls ResponsysLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ResponsysLinkedService. +func (rls ResponsysLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ResponsysLinkedService. func (rls ResponsysLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -188434,7 +192136,7 @@ type ResponsysObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -188785,6 +192487,11 @@ func (rod ResponsysObjectDataset) AsTeradataTableDataset() (*TeradataTableDatase return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ResponsysObjectDataset. +func (rod ResponsysObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ResponsysObjectDataset. func (rod ResponsysObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -189076,7 +192783,7 @@ type ResponsysSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -189174,6 +192881,11 @@ func (rs ResponsysSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ResponsysSource. +func (rs ResponsysSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ResponsysSource. func (rs ResponsysSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -189713,7 +193425,7 @@ type RestResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -190064,6 +193776,11 @@ func (rrd RestResourceDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for RestResourceDataset. +func (rrd RestResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for RestResourceDataset. func (rrd RestResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -190365,7 +194082,7 @@ type RestServiceLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -190797,6 +194514,11 @@ func (rsls RestServiceLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for RestServiceLinkedService. +func (rsls RestServiceLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for RestServiceLinkedService. func (rsls RestServiceLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -191590,7 +195312,7 @@ type RestSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -191700,6 +195422,11 @@ func (rs RestSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for RestSource. +func (rs RestSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for RestSource. func (rs RestSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -192309,7 +196036,7 @@ type SalesforceLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -192741,6 +196468,11 @@ func (sls SalesforceLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinke return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SalesforceLinkedService. +func (sls SalesforceLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SalesforceLinkedService. func (sls SalesforceLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -193029,7 +196761,7 @@ type SalesforceMarketingCloudLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -193461,6 +197193,11 @@ func (smcls SalesforceMarketingCloudLinkedService) AsAzureMySQLLinkedService() ( return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService. +func (smcls SalesforceMarketingCloudLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService. func (smcls SalesforceMarketingCloudLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -193768,7 +197505,7 @@ type SalesforceMarketingCloudObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -194119,6 +197856,11 @@ func (smcod SalesforceMarketingCloudObjectDataset) AsTeradataTableDataset() (*Te return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset. +func (smcod SalesforceMarketingCloudObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset. func (smcod SalesforceMarketingCloudObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -194410,7 +198152,7 @@ type SalesforceMarketingCloudSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -194508,6 +198250,11 @@ func (smcs SalesforceMarketingCloudSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SalesforceMarketingCloudSource. +func (smcs SalesforceMarketingCloudSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SalesforceMarketingCloudSource. func (smcs SalesforceMarketingCloudSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -195047,7 +198794,7 @@ type SalesforceObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -195398,6 +199145,11 @@ func (sod SalesforceObjectDataset) AsTeradataTableDataset() (*TeradataTableDatas return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SalesforceObjectDataset. +func (sod SalesforceObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SalesforceObjectDataset. func (sod SalesforceObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -195691,7 +199443,7 @@ type SalesforceServiceCloudLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -196123,6 +199875,11 @@ func (sscls SalesforceServiceCloudLinkedService) AsAzureMySQLLinkedService() (*A return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SalesforceServiceCloudLinkedService. +func (sscls SalesforceServiceCloudLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SalesforceServiceCloudLinkedService. func (sscls SalesforceServiceCloudLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -196428,7 +200185,7 @@ type SalesforceServiceCloudObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -196779,6 +200536,11 @@ func (sscod SalesforceServiceCloudObjectDataset) AsTeradataTableDataset() (*Tera return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SalesforceServiceCloudObjectDataset. +func (sscod SalesforceServiceCloudObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SalesforceServiceCloudObjectDataset. func (sscod SalesforceServiceCloudObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -197464,7 +201226,7 @@ type SalesforceServiceCloudSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -197562,6 +201324,11 @@ func (sscs SalesforceServiceCloudSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SalesforceServiceCloudSource. +func (sscs SalesforceServiceCloudSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SalesforceServiceCloudSource. func (sscs SalesforceServiceCloudSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -198489,7 +202256,7 @@ type SalesforceSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -198590,6 +202357,11 @@ func (ss SalesforceSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SalesforceSource. +func (ss SalesforceSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SalesforceSource. func (ss SalesforceSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -199136,7 +202908,7 @@ type SapBwCubeDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -199484,6 +203256,11 @@ func (sbcd SapBwCubeDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SapBwCubeDataset. +func (sbcd SapBwCubeDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SapBwCubeDataset. func (sbcd SapBwCubeDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -199762,7 +203539,7 @@ type SapBWLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -200194,6 +203971,11 @@ func (sbls SapBWLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SapBWLinkedService. +func (sbls SapBWLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SapBWLinkedService. func (sbls SapBWLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -200487,7 +204269,7 @@ type SapBwSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -200585,6 +204367,11 @@ func (sbs SapBwSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SapBwSource. +func (sbs SapBwSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SapBwSource. func (sbs SapBwSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -201118,7 +204905,7 @@ type SapCloudForCustomerLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -201550,6 +205337,11 @@ func (scfcls SapCloudForCustomerLinkedService) AsAzureMySQLLinkedService() (*Azu return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService. +func (scfcls SapCloudForCustomerLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService. func (scfcls SapCloudForCustomerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -201823,7 +205615,7 @@ type SapCloudForCustomerResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -202174,6 +205966,11 @@ func (scfcrd SapCloudForCustomerResourceDataset) AsTeradataTableDataset() (*Tera return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset. +func (scfcrd SapCloudForCustomerResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset. func (scfcrd SapCloudForCustomerResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -202848,7 +206645,7 @@ type SapCloudForCustomerSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -202949,6 +206746,11 @@ func (scfcs SapCloudForCustomerSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SapCloudForCustomerSource. +func (scfcs SapCloudForCustomerSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SapCloudForCustomerSource. func (scfcs SapCloudForCustomerSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -203491,7 +207293,7 @@ type SapEccLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -203923,6 +207725,11 @@ func (sels SapEccLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SapEccLinkedService. +func (sels SapEccLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SapEccLinkedService. func (sels SapEccLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -204196,7 +208003,7 @@ type SapEccResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -204547,6 +208354,11 @@ func (serd SapEccResourceDataset) AsTeradataTableDataset() (*TeradataTableDatase return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SapEccResourceDataset. +func (serd SapEccResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SapEccResourceDataset. func (serd SapEccResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -204846,7 +208658,7 @@ type SapEccSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -204947,6 +208759,11 @@ func (ses SapEccSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SapEccSource. +func (ses SapEccSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SapEccSource. func (ses SapEccSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -205489,7 +209306,7 @@ type SapHanaLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -205921,6 +209738,11 @@ func (shls SapHanaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedS return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SapHanaLinkedService. +func (shls SapHanaLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SapHanaLinkedService. func (shls SapHanaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -206226,7 +210048,7 @@ type SapHanaSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -206333,6 +210155,11 @@ func (shs SapHanaSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SapHanaSource. +func (shs SapHanaSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SapHanaSource. func (shs SapHanaSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -206899,7 +210726,7 @@ type SapHanaTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -207250,6 +211077,11 @@ func (shtd SapHanaTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SapHanaTableDataset. +func (shtd SapHanaTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SapHanaTableDataset. func (shtd SapHanaTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -207545,7 +211377,7 @@ type SapOpenHubLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -207977,6 +211809,11 @@ func (sohls SapOpenHubLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLin return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SapOpenHubLinkedService. +func (sohls SapOpenHubLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SapOpenHubLinkedService. func (sohls SapOpenHubLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -208332,7 +212169,7 @@ type SapOpenHubSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -208439,6 +212276,11 @@ func (sohs SapOpenHubSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SapOpenHubSource. +func (sohs SapOpenHubSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SapOpenHubSource. func (sohs SapOpenHubSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -209005,7 +212847,7 @@ type SapOpenHubTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -209356,6 +213198,11 @@ func (sohtd SapOpenHubTableDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SapOpenHubTableDataset. +func (sohtd SapOpenHubTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SapOpenHubTableDataset. func (sohtd SapOpenHubTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -209653,7 +213500,7 @@ type SapTableLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -210085,6 +213932,11 @@ func (stls SapTableLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SapTableLinkedService. +func (stls SapTableLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SapTableLinkedService. func (stls SapTableLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -210502,7 +214354,7 @@ type SapTableResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -210853,6 +214705,11 @@ func (strd SapTableResourceDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SapTableResourceDataset. +func (strd SapTableResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SapTableResourceDataset. func (strd SapTableResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -211166,7 +215023,7 @@ type SapTableSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -211288,6 +215145,11 @@ func (sts SapTableSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SapTableSource. +func (sts SapTableSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SapTableSource. func (sts SapTableSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -212739,7 +216601,7 @@ type ServiceNowLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -213171,6 +217033,11 @@ func (snls ServiceNowLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService. +func (snls ServiceNowLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService. func (snls ServiceNowLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -213509,7 +217376,7 @@ type ServiceNowObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -213860,6 +217727,11 @@ func (snod ServiceNowObjectDataset) AsTeradataTableDataset() (*TeradataTableData return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ServiceNowObjectDataset. +func (snod ServiceNowObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ServiceNowObjectDataset. func (snod ServiceNowObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -214151,7 +218023,7 @@ type ServiceNowSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -214249,6 +218121,11 @@ func (sns ServiceNowSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ServiceNowSource. +func (sns ServiceNowSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ServiceNowSource. func (sns ServiceNowSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -214911,7 +218788,7 @@ type SetVariableActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -214943,6 +218820,11 @@ func (sva SetVariableActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for SetVariableActivity. +func (sva SetVariableActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for SetVariableActivity. func (sva SetVariableActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -215692,7 +219574,7 @@ type SftpServerLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -216124,6 +220006,11 @@ func (ssls SftpServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SftpServerLinkedService. +func (ssls SftpServerLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SftpServerLinkedService. func (ssls SftpServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -216639,7 +220526,7 @@ type SharePointOnlineListLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -217071,6 +220958,11 @@ func (spolls SharePointOnlineListLinkedService) AsAzureMySQLLinkedService() (*Az return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SharePointOnlineListLinkedService. +func (spolls SharePointOnlineListLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SharePointOnlineListLinkedService. func (spolls SharePointOnlineListLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -217355,7 +221247,7 @@ type SharePointOnlineListResourceDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -217706,6 +221598,11 @@ func (spolrd SharePointOnlineListResourceDataset) AsTeradataTableDataset() (*Ter return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SharePointOnlineListResourceDataset. +func (spolrd SharePointOnlineListResourceDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SharePointOnlineListResourceDataset. func (spolrd SharePointOnlineListResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -217995,7 +221892,7 @@ type SharePointOnlineListSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -218090,6 +221987,11 @@ func (spols SharePointOnlineListSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SharePointOnlineListSource. +func (spols SharePointOnlineListSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SharePointOnlineListSource. func (spols SharePointOnlineListSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -218614,7 +222516,7 @@ type ShopifyLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -219046,6 +222948,11 @@ func (sls ShopifyLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ShopifyLinkedService. +func (sls ShopifyLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ShopifyLinkedService. func (sls ShopifyLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -219341,7 +223248,7 @@ type ShopifyObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -219692,6 +223599,11 @@ func (sod ShopifyObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ShopifyObjectDataset. +func (sod ShopifyObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ShopifyObjectDataset. func (sod ShopifyObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -219983,7 +223895,7 @@ type ShopifySource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -220081,6 +223993,11 @@ func (ss ShopifySource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ShopifySource. +func (ss ShopifySource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ShopifySource. func (ss ShopifySource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -220628,7 +224545,7 @@ type SnowflakeDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -220979,6 +224896,11 @@ func (sd SnowflakeDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SnowflakeDataset. +func (sd SnowflakeDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SnowflakeDataset. func (sd SnowflakeDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -221484,7 +225406,7 @@ type SnowflakeLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -221916,6 +225838,11 @@ func (sls SnowflakeLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinked return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SnowflakeLinkedService. +func (sls SnowflakeLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SnowflakeLinkedService. func (sls SnowflakeLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -222507,7 +226434,7 @@ type SnowflakeSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -222602,6 +226529,11 @@ func (ss SnowflakeSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SnowflakeSource. +func (ss SnowflakeSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SnowflakeSource. func (ss SnowflakeSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -223136,7 +227068,7 @@ type SparkLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -223568,6 +227500,11 @@ func (sls SparkLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServ return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SparkLinkedService. +func (sls SparkLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SparkLinkedService. func (sls SparkLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -223951,7 +227888,7 @@ type SparkObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -224302,6 +228239,11 @@ func (sod SparkObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, b return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SparkObjectDataset. +func (sod SparkObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SparkObjectDataset. func (sod SparkObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -224593,7 +228535,7 @@ type SparkSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -224691,6 +228633,11 @@ func (ss SparkSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SparkSource. +func (ss SparkSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SparkSource. func (ss SparkSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -225759,7 +229706,7 @@ type SQLDWSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -225869,6 +229816,11 @@ func (sds SQLDWSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SQLDWSource. +func (sds SQLDWSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SQLDWSource. func (sds SQLDWSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -226932,7 +230884,7 @@ type SQLMISource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -227045,6 +230997,11 @@ func (sms SQLMISource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SQLMISource. +func (sms SQLMISource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SQLMISource. func (sms SQLMISource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -227633,7 +231590,7 @@ type SQLServerLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -228065,6 +232022,11 @@ func (ssls SQLServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinke return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SQLServerLinkedService. +func (ssls SQLServerLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SQLServerLinkedService. func (ssls SQLServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -228829,7 +232791,7 @@ type SQLServerSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -228942,6 +232904,11 @@ func (sss SQLServerSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SQLServerSource. +func (sss SQLServerSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SQLServerSource. func (sss SQLServerSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -229524,7 +233491,7 @@ type SQLServerStoredProcedureActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -229562,6 +233529,11 @@ func (ssspa SQLServerStoredProcedureActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity. +func (ssspa SQLServerStoredProcedureActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity. func (ssspa SQLServerStoredProcedureActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -229901,7 +233873,7 @@ type SQLServerTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -230252,6 +234224,11 @@ func (sstd SQLServerTableDataset) AsTeradataTableDataset() (*TeradataTableDatase return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SQLServerTableDataset. +func (sstd SQLServerTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SQLServerTableDataset. func (sstd SQLServerTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -231035,7 +235012,7 @@ type SQLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -231148,6 +235125,11 @@ func (ss SQLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SQLSource. +func (ss SQLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SQLSource. func (ss SQLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -231736,7 +235718,7 @@ type SquareLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -232168,6 +236150,11 @@ func (sls SquareLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SquareLinkedService. +func (sls SquareLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SquareLinkedService. func (sls SquareLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -232496,7 +236483,7 @@ type SquareObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -232847,6 +236834,11 @@ func (sod SquareObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SquareObjectDataset. +func (sod SquareObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SquareObjectDataset. func (sod SquareObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -233138,7 +237130,7 @@ type SquareSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -233236,6 +237228,11 @@ func (ss SquareSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SquareSource. +func (ss SquareSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SquareSource. func (ss SquareSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -235216,7 +239213,7 @@ type SwitchActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -235248,6 +239245,11 @@ func (sa SwitchActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for SwitchActivity. +func (sa SwitchActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for SwitchActivity. func (sa SwitchActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -235634,7 +239636,7 @@ type SybaseLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -236066,6 +240068,11 @@ func (sls SybaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSer return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for SybaseLinkedService. +func (sls SybaseLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for SybaseLinkedService. func (sls SybaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -236370,7 +240377,7 @@ type SybaseSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -236468,6 +240475,11 @@ func (ss SybaseSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for SybaseSource. +func (ss SybaseSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for SybaseSource. func (ss SybaseSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -237007,7 +241019,7 @@ type SybaseTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -237358,6 +241370,11 @@ func (std SybaseTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, b return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for SybaseTableDataset. +func (std SybaseTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for SybaseTableDataset. func (std SybaseTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -237715,7 +241732,7 @@ type TabularSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -238071,6 +242088,11 @@ func (ts TabularSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for TabularSource. +func (ts TabularSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for TabularSource. func (ts TabularSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -238957,7 +242979,7 @@ type TeradataLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -239389,6 +243411,11 @@ func (TLSVar TeradataLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLink return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for TeradataLinkedService. +func (TLSVar TeradataLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for TeradataLinkedService. func (TLSVar TeradataLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -239696,7 +243723,7 @@ type TeradataSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -239800,6 +243827,11 @@ func (ts TeradataSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for TeradataSource. +func (ts TeradataSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for TeradataSource. func (ts TeradataSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -240357,7 +244389,7 @@ type TeradataTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -240708,6 +244740,11 @@ func (ttd TeradataTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, return &ttd, true } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for TeradataTableDataset. +func (ttd TeradataTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for TeradataTableDataset. func (ttd TeradataTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -242565,7 +246602,7 @@ type UntilActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -242597,6 +246634,11 @@ func (ua UntilActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for UntilActivity. +func (ua UntilActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for UntilActivity. func (ua UntilActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -242979,7 +247021,7 @@ type ValidationActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -243011,6 +247053,11 @@ func (va ValidationActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for ValidationActivity. +func (va ValidationActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for ValidationActivity. func (va ValidationActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -243338,7 +247385,7 @@ type VerticaLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -243770,6 +247817,11 @@ func (vls VerticaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedSe return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for VerticaLinkedService. +func (vls VerticaLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for VerticaLinkedService. func (vls VerticaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -243989,7 +248041,7 @@ type VerticaSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -244087,6 +248139,11 @@ func (vs VerticaSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for VerticaSource. +func (vs VerticaSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for VerticaSource. func (vs VerticaSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -244626,7 +248683,7 @@ type VerticaTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -244977,6 +249034,11 @@ func (vtd VerticaTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for VerticaTableDataset. +func (vtd VerticaTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for VerticaTableDataset. func (vtd VerticaTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -245264,7 +249326,7 @@ type WaitActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -245296,6 +249358,11 @@ func (wa WaitActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for WaitActivity. +func (wa WaitActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for WaitActivity. func (wa WaitActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -245601,7 +249668,7 @@ type WebActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -245639,6 +249706,11 @@ func (wa WebActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for WebActivity. +func (wa WebActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for WebActivity. func (wa WebActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -246321,7 +250393,7 @@ type WebHookActivity struct { DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` // UserProperties - Activity user properties. UserProperties *[]UserProperty `json:"userProperties,omitempty"` - // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' + // Type - Possible values include: 'TypeBasicActivityTypeActivity', 'TypeBasicActivityTypeExecuteWranglingDataflow', 'TypeBasicActivityTypeExecuteDataFlow', 'TypeBasicActivityTypeAzureFunctionActivity', 'TypeBasicActivityTypeDatabricksSparkPython', 'TypeBasicActivityTypeDatabricksSparkJar', 'TypeBasicActivityTypeDatabricksNotebook', 'TypeBasicActivityTypeDataLakeAnalyticsUSQL', 'TypeBasicActivityTypeAzureMLExecutePipeline', 'TypeBasicActivityTypeAzureMLUpdateResource', 'TypeBasicActivityTypeAzureMLBatchExecution', 'TypeBasicActivityTypeGetMetadata', 'TypeBasicActivityTypeWebActivity', 'TypeBasicActivityTypeLookup', 'TypeBasicActivityTypeAzureDataExplorerCommand', 'TypeBasicActivityTypeDelete', 'TypeBasicActivityTypeSQLServerStoredProcedure', 'TypeBasicActivityTypeCustom', 'TypeBasicActivityTypeExecuteSSISPackage', 'TypeBasicActivityTypeHDInsightSpark', 'TypeBasicActivityTypeHDInsightStreaming', 'TypeBasicActivityTypeHDInsightMapReduce', 'TypeBasicActivityTypeHDInsightPig', 'TypeBasicActivityTypeHDInsightHive', 'TypeBasicActivityTypeCopy', 'TypeBasicActivityTypeExecution', 'TypeBasicActivityTypeWebHook', 'TypeBasicActivityTypeAppendVariable', 'TypeBasicActivityTypeSetVariable', 'TypeBasicActivityTypeFilter', 'TypeBasicActivityTypeValidation', 'TypeBasicActivityTypeUntil', 'TypeBasicActivityTypeWait', 'TypeBasicActivityTypeForEach', 'TypeBasicActivityTypeSwitch', 'TypeBasicActivityTypeIfCondition', 'TypeBasicActivityTypeExecutePipeline', 'TypeBasicActivityTypeContainer' Type TypeBasicActivity `json:"type,omitempty"` } @@ -246353,6 +250425,11 @@ func (wha WebHookActivity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsExecuteWranglingDataflowActivity is the BasicActivity implementation for WebHookActivity. +func (wha WebHookActivity) AsExecuteWranglingDataflowActivity() (*ExecuteWranglingDataflowActivity, bool) { + return nil, false +} + // AsExecuteDataFlowActivity is the BasicActivity implementation for WebHookActivity. func (wha WebHookActivity) AsExecuteDataFlowActivity() (*ExecuteDataFlowActivity, bool) { return nil, false @@ -246666,7 +250743,7 @@ type WebLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -247096,6 +251173,11 @@ func (wls WebLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServic return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for WebLinkedService. +func (wls WebLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for WebLinkedService. func (wls WebLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -247401,7 +251483,7 @@ type WebSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -247493,6 +251575,11 @@ func (ws WebSource) AsWebSource() (*WebSource, bool) { return &ws, true } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for WebSource. +func (ws WebSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for WebSource. func (ws WebSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -248014,7 +252101,7 @@ type WebTableDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -248365,6 +252452,11 @@ func (wtd WebTableDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for WebTableDataset. +func (wtd WebTableDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for WebTableDataset. func (wtd WebTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -248646,6 +252738,122 @@ type WebTableDatasetTypeProperties struct { Path interface{} `json:"path,omitempty"` } +// WranglingDataFlow power Query data flow. +type WranglingDataFlow struct { + // PowerQueryTypeProperties - PowerQuery data flow type properties. + *PowerQueryTypeProperties `json:"typeProperties,omitempty"` + // Description - The description of the data flow. + Description *string `json:"description,omitempty"` + // Annotations - List of tags that can be used for describing the data flow. + Annotations *[]interface{} `json:"annotations,omitempty"` + // Folder - The folder that this data flow is in. If not specified, Data flow will appear at the root level. + Folder *DataFlowFolder `json:"folder,omitempty"` + // Type - Possible values include: 'TypeBasicDataFlowTypeDataFlow', 'TypeBasicDataFlowTypeWranglingDataFlow', 'TypeBasicDataFlowTypeMappingDataFlow' + Type TypeBasicDataFlow `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for WranglingDataFlow. +func (wdf WranglingDataFlow) MarshalJSON() ([]byte, error) { + wdf.Type = TypeBasicDataFlowTypeWranglingDataFlow + objectMap := make(map[string]interface{}) + if wdf.PowerQueryTypeProperties != nil { + objectMap["typeProperties"] = wdf.PowerQueryTypeProperties + } + if wdf.Description != nil { + objectMap["description"] = wdf.Description + } + if wdf.Annotations != nil { + objectMap["annotations"] = wdf.Annotations + } + if wdf.Folder != nil { + objectMap["folder"] = wdf.Folder + } + if wdf.Type != "" { + objectMap["type"] = wdf.Type + } + return json.Marshal(objectMap) +} + +// AsWranglingDataFlow is the BasicDataFlow implementation for WranglingDataFlow. +func (wdf WranglingDataFlow) AsWranglingDataFlow() (*WranglingDataFlow, bool) { + return &wdf, true +} + +// AsMappingDataFlow is the BasicDataFlow implementation for WranglingDataFlow. +func (wdf WranglingDataFlow) AsMappingDataFlow() (*MappingDataFlow, bool) { + return nil, false +} + +// AsDataFlow is the BasicDataFlow implementation for WranglingDataFlow. +func (wdf WranglingDataFlow) AsDataFlow() (*DataFlow, bool) { + return nil, false +} + +// AsBasicDataFlow is the BasicDataFlow implementation for WranglingDataFlow. +func (wdf WranglingDataFlow) AsBasicDataFlow() (BasicDataFlow, bool) { + return &wdf, true +} + +// UnmarshalJSON is the custom unmarshaler for WranglingDataFlow struct. +func (wdf *WranglingDataFlow) 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 "typeProperties": + if v != nil { + var powerQueryTypeProperties PowerQueryTypeProperties + err = json.Unmarshal(*v, &powerQueryTypeProperties) + if err != nil { + return err + } + wdf.PowerQueryTypeProperties = &powerQueryTypeProperties + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + wdf.Description = &description + } + case "annotations": + if v != nil { + var annotations []interface{} + err = json.Unmarshal(*v, &annotations) + if err != nil { + return err + } + wdf.Annotations = &annotations + } + case "folder": + if v != nil { + var folder DataFlowFolder + err = json.Unmarshal(*v, &folder) + if err != nil { + return err + } + wdf.Folder = &folder + } + case "type": + if v != nil { + var typeVar TypeBasicDataFlow + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wdf.Type = typeVar + } + } + } + + return nil +} + // XeroLinkedService xero Service linked service. type XeroLinkedService struct { // XeroLinkedServiceTypeProperties - Xero Service linked service properties. @@ -248660,7 +252868,7 @@ type XeroLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -249092,6 +253300,11 @@ func (xls XeroLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for XeroLinkedService. +func (xls XeroLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for XeroLinkedService. func (xls XeroLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -249409,7 +253622,7 @@ type XeroObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -249760,6 +253973,11 @@ func (xod XeroObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for XeroObjectDataset. +func (xod XeroObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for XeroObjectDataset. func (xod XeroObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -250051,7 +254269,7 @@ type XeroSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -250149,6 +254367,11 @@ func (xs XeroSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for XeroSource. +func (xs XeroSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for XeroSource. func (xs XeroSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -250688,7 +254911,7 @@ type XMLDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -251039,6 +255262,11 @@ func (xd XMLDataset) AsTeradataTableDataset() (*TeradataTableDataset, bool) { return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for XMLDataset. +func (xd XMLDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for XMLDataset. func (xd XMLDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -251545,7 +255773,7 @@ type XMLSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -251641,6 +255869,11 @@ func (xs XMLSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for XMLSource. +func (xs XMLSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for XMLSource. func (xs XMLSource) AsOracleSource() (*OracleSource, bool) { return nil, false @@ -252269,7 +256502,7 @@ type ZohoLinkedService struct { Parameters map[string]*ParameterSpecification `json:"parameters"` // Annotations - List of tags that can be used for describing the linked service. Annotations *[]interface{} `json:"annotations,omitempty"` - // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' + // Type - Possible values include: 'TypeBasicLinkedServiceTypeLinkedService', 'TypeBasicLinkedServiceTypeSharePointOnlineList', 'TypeBasicLinkedServiceTypeSnowflake', 'TypeBasicLinkedServiceTypeAzureFunction', 'TypeBasicLinkedServiceTypeAzureDataExplorer', 'TypeBasicLinkedServiceTypeSapTable', 'TypeBasicLinkedServiceTypeGoogleAdWords', 'TypeBasicLinkedServiceTypeOracleServiceCloud', 'TypeBasicLinkedServiceTypeDynamicsAX', 'TypeBasicLinkedServiceTypeResponsys', 'TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake', 'TypeBasicLinkedServiceTypeAzureDatabricks', 'TypeBasicLinkedServiceTypeAzureDataLakeAnalytics', 'TypeBasicLinkedServiceTypeHDInsightOnDemand', 'TypeBasicLinkedServiceTypeSalesforceMarketingCloud', 'TypeBasicLinkedServiceTypeNetezza', 'TypeBasicLinkedServiceTypeVertica', 'TypeBasicLinkedServiceTypeZoho', 'TypeBasicLinkedServiceTypeXero', 'TypeBasicLinkedServiceTypeSquare', 'TypeBasicLinkedServiceTypeSpark', 'TypeBasicLinkedServiceTypeShopify', 'TypeBasicLinkedServiceTypeServiceNow', 'TypeBasicLinkedServiceTypeQuickBooks', 'TypeBasicLinkedServiceTypePresto', 'TypeBasicLinkedServiceTypePhoenix', 'TypeBasicLinkedServiceTypePaypal', 'TypeBasicLinkedServiceTypeMarketo', 'TypeBasicLinkedServiceTypeAzureMariaDB', 'TypeBasicLinkedServiceTypeMariaDB', 'TypeBasicLinkedServiceTypeMagento', 'TypeBasicLinkedServiceTypeJira', 'TypeBasicLinkedServiceTypeImpala', 'TypeBasicLinkedServiceTypeHubspot', 'TypeBasicLinkedServiceTypeHive', 'TypeBasicLinkedServiceTypeHBase', 'TypeBasicLinkedServiceTypeGreenplum', 'TypeBasicLinkedServiceTypeGoogleBigQuery', 'TypeBasicLinkedServiceTypeEloqua', 'TypeBasicLinkedServiceTypeDrill', 'TypeBasicLinkedServiceTypeCouchbase', 'TypeBasicLinkedServiceTypeConcur', 'TypeBasicLinkedServiceTypeAzurePostgreSQL', 'TypeBasicLinkedServiceTypeAmazonMWS', 'TypeBasicLinkedServiceTypeSapHana', 'TypeBasicLinkedServiceTypeSapBW', 'TypeBasicLinkedServiceTypeSftp', 'TypeBasicLinkedServiceTypeFtpServer', 'TypeBasicLinkedServiceTypeHTTPServer', 'TypeBasicLinkedServiceTypeAzureSearch', 'TypeBasicLinkedServiceTypeCustomDataSource', 'TypeBasicLinkedServiceTypeAmazonRedshift', 'TypeBasicLinkedServiceTypeAmazonS3', 'TypeBasicLinkedServiceTypeRestService', 'TypeBasicLinkedServiceTypeSapOpenHub', 'TypeBasicLinkedServiceTypeSapEcc', 'TypeBasicLinkedServiceTypeSapCloudForCustomer', 'TypeBasicLinkedServiceTypeSalesforceServiceCloud', 'TypeBasicLinkedServiceTypeSalesforce', 'TypeBasicLinkedServiceTypeOffice365', 'TypeBasicLinkedServiceTypeAzureBlobFS', 'TypeBasicLinkedServiceTypeAzureDataLakeStore', 'TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI', 'TypeBasicLinkedServiceTypeMongoDbV2', 'TypeBasicLinkedServiceTypeMongoDbAtlas', 'TypeBasicLinkedServiceTypeMongoDb', 'TypeBasicLinkedServiceTypeCassandra', 'TypeBasicLinkedServiceTypeWeb', 'TypeBasicLinkedServiceTypeOData', 'TypeBasicLinkedServiceTypeHdfs', 'TypeBasicLinkedServiceTypeMicrosoftAccess', 'TypeBasicLinkedServiceTypeInformix', 'TypeBasicLinkedServiceTypeOdbc', 'TypeBasicLinkedServiceTypeAzureMLService', 'TypeBasicLinkedServiceTypeAzureML', 'TypeBasicLinkedServiceTypeTeradata', 'TypeBasicLinkedServiceTypeDb2', 'TypeBasicLinkedServiceTypeSybase', 'TypeBasicLinkedServiceTypePostgreSQL', 'TypeBasicLinkedServiceTypeMySQL', 'TypeBasicLinkedServiceTypeAzureMySQL', 'TypeBasicLinkedServiceTypeAmazonRdsForOracle', 'TypeBasicLinkedServiceTypeOracle', 'TypeBasicLinkedServiceTypeGoogleCloudStorage', 'TypeBasicLinkedServiceTypeOracleCloudStorage', 'TypeBasicLinkedServiceTypeAmazonS3Compatible', 'TypeBasicLinkedServiceTypeAzureFileStorage', 'TypeBasicLinkedServiceTypeFileServer', 'TypeBasicLinkedServiceTypeHDInsight', 'TypeBasicLinkedServiceTypeCommonDataServiceForApps', 'TypeBasicLinkedServiceTypeDynamicsCrm', 'TypeBasicLinkedServiceTypeDynamics', 'TypeBasicLinkedServiceTypeCosmosDb', 'TypeBasicLinkedServiceTypeAzureKeyVault', 'TypeBasicLinkedServiceTypeAzureBatch', 'TypeBasicLinkedServiceTypeAzureSQLMI', 'TypeBasicLinkedServiceTypeAzureSQLDatabase', 'TypeBasicLinkedServiceTypeSQLServer', 'TypeBasicLinkedServiceTypeAzureSQLDW', 'TypeBasicLinkedServiceTypeAzureTableStorage', 'TypeBasicLinkedServiceTypeAzureBlobStorage', 'TypeBasicLinkedServiceTypeAzureStorage' Type TypeBasicLinkedService `json:"type,omitempty"` } @@ -252701,6 +256934,11 @@ func (zls ZohoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedServi return nil, false } +// AsAmazonRdsForOracleLinkedService is the BasicLinkedService implementation for ZohoLinkedService. +func (zls ZohoLinkedService) AsAmazonRdsForOracleLinkedService() (*AmazonRdsForOracleLinkedService, bool) { + return nil, false +} + // AsOracleLinkedService is the BasicLinkedService implementation for ZohoLinkedService. func (zls ZohoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) { return nil, false @@ -253007,7 +257245,7 @@ type ZohoObjectDataset struct { Annotations *[]interface{} `json:"annotations,omitempty"` // Folder - The folder that this Dataset is in. If not specified, Dataset will appear at the root level. Folder *DatasetFolder `json:"folder,omitempty"` - // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' + // Type - Possible values include: 'TypeBasicDatasetTypeDataset', 'TypeBasicDatasetTypeAzureDatabricksDeltaLakeDataset', 'TypeBasicDatasetTypeSharePointOnlineListResource', 'TypeBasicDatasetTypeSnowflakeTable', 'TypeBasicDatasetTypeGoogleAdWordsObject', 'TypeBasicDatasetTypeAzureDataExplorerTable', 'TypeBasicDatasetTypeOracleServiceCloudObject', 'TypeBasicDatasetTypeDynamicsAXResource', 'TypeBasicDatasetTypeResponsysObject', 'TypeBasicDatasetTypeSalesforceMarketingCloudObject', 'TypeBasicDatasetTypeVerticaTable', 'TypeBasicDatasetTypeNetezzaTable', 'TypeBasicDatasetTypeZohoObject', 'TypeBasicDatasetTypeXeroObject', 'TypeBasicDatasetTypeSquareObject', 'TypeBasicDatasetTypeSparkObject', 'TypeBasicDatasetTypeShopifyObject', 'TypeBasicDatasetTypeServiceNowObject', 'TypeBasicDatasetTypeQuickBooksObject', 'TypeBasicDatasetTypePrestoObject', 'TypeBasicDatasetTypePhoenixObject', 'TypeBasicDatasetTypePaypalObject', 'TypeBasicDatasetTypeMarketoObject', 'TypeBasicDatasetTypeAzureMariaDBTable', 'TypeBasicDatasetTypeMariaDBTable', 'TypeBasicDatasetTypeMagentoObject', 'TypeBasicDatasetTypeJiraObject', 'TypeBasicDatasetTypeImpalaObject', 'TypeBasicDatasetTypeHubspotObject', 'TypeBasicDatasetTypeHiveObject', 'TypeBasicDatasetTypeHBaseObject', 'TypeBasicDatasetTypeGreenplumTable', 'TypeBasicDatasetTypeGoogleBigQueryObject', 'TypeBasicDatasetTypeEloquaObject', 'TypeBasicDatasetTypeDrillTable', 'TypeBasicDatasetTypeCouchbaseTable', 'TypeBasicDatasetTypeConcurObject', 'TypeBasicDatasetTypeAzurePostgreSQLTable', 'TypeBasicDatasetTypeAmazonMWSObject', 'TypeBasicDatasetTypeHTTPFile', 'TypeBasicDatasetTypeAzureSearchIndex', 'TypeBasicDatasetTypeWebTable', 'TypeBasicDatasetTypeSapTableResource', 'TypeBasicDatasetTypeRestResource', 'TypeBasicDatasetTypeSQLServerTable', 'TypeBasicDatasetTypeSapOpenHubTable', 'TypeBasicDatasetTypeSapHanaTable', 'TypeBasicDatasetTypeSapEccResource', 'TypeBasicDatasetTypeSapCloudForCustomerResource', 'TypeBasicDatasetTypeSapBwCube', 'TypeBasicDatasetTypeSybaseTable', 'TypeBasicDatasetTypeSalesforceServiceCloudObject', 'TypeBasicDatasetTypeSalesforceObject', 'TypeBasicDatasetTypeMicrosoftAccessTable', 'TypeBasicDatasetTypePostgreSQLTable', 'TypeBasicDatasetTypeMySQLTable', 'TypeBasicDatasetTypeOdbcTable', 'TypeBasicDatasetTypeInformixTable', 'TypeBasicDatasetTypeRelationalTable', 'TypeBasicDatasetTypeDb2Table', 'TypeBasicDatasetTypeAmazonRedshiftTable', 'TypeBasicDatasetTypeAzureMySQLTable', 'TypeBasicDatasetTypeTeradataTable', 'TypeBasicDatasetTypeAmazonRdsForOracleTable', 'TypeBasicDatasetTypeOracleTable', 'TypeBasicDatasetTypeODataResource', 'TypeBasicDatasetTypeCosmosDbMongoDbAPICollection', 'TypeBasicDatasetTypeMongoDbV2Collection', 'TypeBasicDatasetTypeMongoDbAtlasCollection', 'TypeBasicDatasetTypeMongoDbCollection', 'TypeBasicDatasetTypeFileShare', 'TypeBasicDatasetTypeOffice365Table', 'TypeBasicDatasetTypeAzureBlobFSFile', 'TypeBasicDatasetTypeAzureDataLakeStoreFile', 'TypeBasicDatasetTypeCommonDataServiceForAppsEntity', 'TypeBasicDatasetTypeDynamicsCrmEntity', 'TypeBasicDatasetTypeDynamicsEntity', 'TypeBasicDatasetTypeDocumentDbCollection', 'TypeBasicDatasetTypeCosmosDbSQLAPICollection', 'TypeBasicDatasetTypeCustomDataset', 'TypeBasicDatasetTypeCassandraTable', 'TypeBasicDatasetTypeAzureSQLDWTable', 'TypeBasicDatasetTypeAzureSQLMITable', 'TypeBasicDatasetTypeAzureSQLTable', 'TypeBasicDatasetTypeAzureTable', 'TypeBasicDatasetTypeAzureBlob', 'TypeBasicDatasetTypeBinary', 'TypeBasicDatasetTypeOrc', 'TypeBasicDatasetTypeXML', 'TypeBasicDatasetTypeJSON', 'TypeBasicDatasetTypeDelimitedText', 'TypeBasicDatasetTypeParquet', 'TypeBasicDatasetTypeExcel', 'TypeBasicDatasetTypeAvro', 'TypeBasicDatasetTypeAmazonS3Object' Type TypeBasicDataset `json:"type,omitempty"` } @@ -253358,6 +257596,11 @@ func (zod ZohoObjectDataset) AsTeradataTableDataset() (*TeradataTableDataset, bo return nil, false } +// AsAmazonRdsForOracleTableDataset is the BasicDataset implementation for ZohoObjectDataset. +func (zod ZohoObjectDataset) AsAmazonRdsForOracleTableDataset() (*AmazonRdsForOracleTableDataset, bool) { + return nil, false +} + // AsOracleTableDataset is the BasicDataset implementation for ZohoObjectDataset. func (zod ZohoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) { return nil, false @@ -253649,7 +257892,7 @@ type ZohoSource struct { MaxConcurrentConnections interface{} `json:"maxConcurrentConnections,omitempty"` // DisableMetricsCollection - If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). DisableMetricsCollection interface{} `json:"disableMetricsCollection,omitempty"` - // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' + // Type - Possible values include: 'TypeBasicCopySourceTypeCopySource', 'TypeBasicCopySourceTypeSharePointOnlineListSource', 'TypeBasicCopySourceTypeAzureDatabricksDeltaLakeSource', 'TypeBasicCopySourceTypeSnowflakeSource', 'TypeBasicCopySourceTypeHTTPSource', 'TypeBasicCopySourceTypeAzureBlobFSSource', 'TypeBasicCopySourceTypeAzureDataLakeStoreSource', 'TypeBasicCopySourceTypeOffice365Source', 'TypeBasicCopySourceTypeCosmosDbMongoDbAPISource', 'TypeBasicCopySourceTypeMongoDbV2Source', 'TypeBasicCopySourceTypeMongoDbAtlasSource', 'TypeBasicCopySourceTypeMongoDbSource', 'TypeBasicCopySourceTypeWebSource', 'TypeBasicCopySourceTypeAmazonRdsForOracleSource', 'TypeBasicCopySourceTypeOracleSource', 'TypeBasicCopySourceTypeAzureDataExplorerSource', 'TypeBasicCopySourceTypeHdfsSource', 'TypeBasicCopySourceTypeFileSystemSource', 'TypeBasicCopySourceTypeRestSource', 'TypeBasicCopySourceTypeSalesforceServiceCloudSource', 'TypeBasicCopySourceTypeODataSource', 'TypeBasicCopySourceTypeMicrosoftAccessSource', 'TypeBasicCopySourceTypeRelationalSource', 'TypeBasicCopySourceTypeCommonDataServiceForAppsSource', 'TypeBasicCopySourceTypeDynamicsCrmSource', 'TypeBasicCopySourceTypeDynamicsSource', 'TypeBasicCopySourceTypeCosmosDbSQLAPISource', 'TypeBasicCopySourceTypeDocumentDbCollectionSource', 'TypeBasicCopySourceTypeBlobSource', 'TypeBasicCopySourceTypeAmazonRedshiftSource', 'TypeBasicCopySourceTypeGoogleAdWordsSource', 'TypeBasicCopySourceTypeOracleServiceCloudSource', 'TypeBasicCopySourceTypeDynamicsAXSource', 'TypeBasicCopySourceTypeResponsysSource', 'TypeBasicCopySourceTypeSalesforceMarketingCloudSource', 'TypeBasicCopySourceTypeVerticaSource', 'TypeBasicCopySourceTypeNetezzaSource', 'TypeBasicCopySourceTypeZohoSource', 'TypeBasicCopySourceTypeXeroSource', 'TypeBasicCopySourceTypeSquareSource', 'TypeBasicCopySourceTypeSparkSource', 'TypeBasicCopySourceTypeShopifySource', 'TypeBasicCopySourceTypeServiceNowSource', 'TypeBasicCopySourceTypeQuickBooksSource', 'TypeBasicCopySourceTypePrestoSource', 'TypeBasicCopySourceTypePhoenixSource', 'TypeBasicCopySourceTypePaypalSource', 'TypeBasicCopySourceTypeMarketoSource', 'TypeBasicCopySourceTypeAzureMariaDBSource', 'TypeBasicCopySourceTypeMariaDBSource', 'TypeBasicCopySourceTypeMagentoSource', 'TypeBasicCopySourceTypeJiraSource', 'TypeBasicCopySourceTypeImpalaSource', 'TypeBasicCopySourceTypeHubspotSource', 'TypeBasicCopySourceTypeHiveSource', 'TypeBasicCopySourceTypeHBaseSource', 'TypeBasicCopySourceTypeGreenplumSource', 'TypeBasicCopySourceTypeGoogleBigQuerySource', 'TypeBasicCopySourceTypeEloquaSource', 'TypeBasicCopySourceTypeDrillSource', 'TypeBasicCopySourceTypeCouchbaseSource', 'TypeBasicCopySourceTypeConcurSource', 'TypeBasicCopySourceTypeAzurePostgreSQLSource', 'TypeBasicCopySourceTypeAmazonMWSSource', 'TypeBasicCopySourceTypeCassandraSource', 'TypeBasicCopySourceTypeTeradataSource', 'TypeBasicCopySourceTypeAzureMySQLSource', 'TypeBasicCopySourceTypeSQLDWSource', 'TypeBasicCopySourceTypeSQLMISource', 'TypeBasicCopySourceTypeAzureSQLSource', 'TypeBasicCopySourceTypeSQLServerSource', 'TypeBasicCopySourceTypeSQLSource', 'TypeBasicCopySourceTypeSapTableSource', 'TypeBasicCopySourceTypeSapOpenHubSource', 'TypeBasicCopySourceTypeSapHanaSource', 'TypeBasicCopySourceTypeSapEccSource', 'TypeBasicCopySourceTypeSapCloudForCustomerSource', 'TypeBasicCopySourceTypeSalesforceSource', 'TypeBasicCopySourceTypeSapBwSource', 'TypeBasicCopySourceTypeSybaseSource', 'TypeBasicCopySourceTypePostgreSQLSource', 'TypeBasicCopySourceTypeMySQLSource', 'TypeBasicCopySourceTypeOdbcSource', 'TypeBasicCopySourceTypeDb2Source', 'TypeBasicCopySourceTypeInformixSource', 'TypeBasicCopySourceTypeAzureTableSource', 'TypeBasicCopySourceTypeTabularSource', 'TypeBasicCopySourceTypeBinarySource', 'TypeBasicCopySourceTypeOrcSource', 'TypeBasicCopySourceTypeXMLSource', 'TypeBasicCopySourceTypeJSONSource', 'TypeBasicCopySourceTypeDelimitedTextSource', 'TypeBasicCopySourceTypeParquetSource', 'TypeBasicCopySourceTypeExcelSource', 'TypeBasicCopySourceTypeAvroSource' Type TypeBasicCopySource `json:"type,omitempty"` } @@ -253747,6 +257990,11 @@ func (zs ZohoSource) AsWebSource() (*WebSource, bool) { return nil, false } +// AsAmazonRdsForOracleSource is the BasicCopySource implementation for ZohoSource. +func (zs ZohoSource) AsAmazonRdsForOracleSource() (*AmazonRdsForOracleSource, bool) { + return nil, false +} + // AsOracleSource is the BasicCopySource implementation for ZohoSource. func (zs ZohoSource) AsOracleSource() (*OracleSource, bool) { return nil, false diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/CHANGELOG.md b/services/dataprotection/mgmt/2021-07-01/dataprotection/CHANGELOG.md new file mode 100644 index 000000000000..52911e4cc5e4 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/CHANGELOG.md @@ -0,0 +1,2 @@ +# Change History + diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/_meta.json b/services/dataprotection/mgmt/2021-07-01/dataprotection/_meta.json new file mode 100644 index 000000000000..ec62e7f8b0e5 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", + "readme": "/_/azure-rest-api-specs/specification/dataprotection/resource-manager/readme.md", + "tag": "package-2021-07", + "use": "@microsoft.azure/autorest.go@2.1.183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-07 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/dataprotection/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/backupinstances.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/backupinstances.go new file mode 100644 index 000000000000..b0f22ae39cae --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/backupinstances.go @@ -0,0 +1,865 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BackupInstancesClient is the open API 2.0 Specs for Azure Data Protection service +type BackupInstancesClient struct { + BaseClient +} + +// NewBackupInstancesClient creates an instance of the BackupInstancesClient client. +func NewBackupInstancesClient(subscriptionID string) BackupInstancesClient { + return NewBackupInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupInstancesClientWithBaseURI creates an instance of the BackupInstancesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBackupInstancesClientWithBaseURI(baseURI string, subscriptionID string) BackupInstancesClient { + return BackupInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// AdhocBackup trigger adhoc backup +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +// parameters - request body for operation +func (client BackupInstancesClient) AdhocBackup(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters TriggerBackupRequest) (result BackupInstancesAdhocBackupFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.AdhocBackup") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BackupRuleOptions", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.BackupRuleOptions.RuleName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.BackupRuleOptions.TriggerOption", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("dataprotection.BackupInstancesClient", "AdhocBackup", err.Error()) + } + + req, err := client.AdhocBackupPreparer(ctx, vaultName, resourceGroupName, backupInstanceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "AdhocBackup", nil, "Failure preparing request") + return + } + + result, err = client.AdhocBackupSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "AdhocBackup", nil, "Failure sending request") + return + } + + return +} + +// AdhocBackupPreparer prepares the AdhocBackup request. +func (client BackupInstancesClient) AdhocBackupPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters TriggerBackupRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AdhocBackupSender sends the AdhocBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BackupInstancesClient) AdhocBackupSender(req *http.Request) (future BackupInstancesAdhocBackupFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// AdhocBackupResponder handles the response to the AdhocBackup request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) AdhocBackupResponder(resp *http.Response) (result OperationJobExtendedInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate create or update a backup instance in a backup vault +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +// parameters - request body for operation +func (client BackupInstancesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters BackupInstanceResource) (result BackupInstancesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DataSourceInfo", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DataSourceInfo.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.DataSourceSetInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DataSourceSetInfo.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.PolicyInfo", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.PolicyInfo.PolicyID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ProtectionStatus", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ProtectionStatus.ErrorDetails", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ProtectionStatus.ErrorDetails.InnerError", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ProtectionStatus.ErrorDetails.InnerError.EmbeddedInnerError", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + }}, + {Target: "parameters.Properties.ProtectionErrorDetails", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ProtectionErrorDetails.InnerError", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ProtectionErrorDetails.InnerError.EmbeddedInnerError", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.Properties.ObjectType", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("dataprotection.BackupInstancesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, backupInstanceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BackupInstancesClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters BackupInstanceResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}", 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 BackupInstancesClient) CreateOrUpdateSender(req *http.Request) (future BackupInstancesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) CreateOrUpdateResponder(resp *http.Response) (result BackupInstanceResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a backup instance in a backup vault +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +func (client BackupInstancesClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string) (result BackupInstancesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, vaultName, resourceGroupName, backupInstanceName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BackupInstancesClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}", 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 BackupInstancesClient) DeleteSender(req *http.Request) (future BackupInstancesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a backup instance with name in a backup vault +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +func (client BackupInstancesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string) (result BackupInstanceResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.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, backupInstanceName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupInstancesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}", 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 BackupInstancesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) GetResponder(resp *http.Response) (result BackupInstanceResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a backup instances belonging to a backup vault +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupInstancesClient) List(ctx context.Context, vaultName string, resourceGroupName string) (result BackupInstanceResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.List") + defer func() { + sc := -1 + if result.birl.Response.Response != nil { + sc = result.birl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.birl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "List", resp, "Failure sending request") + return + } + + result.birl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "List", resp, "Failure responding to request") + return + } + if result.birl.hasNextLink() && result.birl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client BackupInstancesClient) ListPreparer(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 = "2021-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.DataProtection/backupVaults/{vaultName}/backupInstances", 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 BackupInstancesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) ListResponder(resp *http.Response) (result BackupInstanceResourceList, err error) { + err = autorest.Respond( + resp, + 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 BackupInstancesClient) listNextResults(ctx context.Context, lastResults BackupInstanceResourceList) (result BackupInstanceResourceList, err error) { + req, err := lastResults.backupInstanceResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "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, "dataprotection.BackupInstancesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BackupInstancesClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string) (result BackupInstanceResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.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) + return +} + +// TriggerRehydrate rehydrate recovery point for restore for a BackupInstance +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// vaultName - the name of the backup vault. +// parameters - request body for operation +func (client BackupInstancesClient) TriggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, parameters AzureBackupRehydrationRequest, backupInstanceName string) (result BackupInstancesTriggerRehydrateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.TriggerRehydrate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.RecoveryPointID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RehydrationRetentionDuration", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("dataprotection.BackupInstancesClient", "TriggerRehydrate", err.Error()) + } + + req, err := client.TriggerRehydratePreparer(ctx, resourceGroupName, vaultName, parameters, backupInstanceName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "TriggerRehydrate", nil, "Failure preparing request") + return + } + + result, err = client.TriggerRehydrateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "TriggerRehydrate", nil, "Failure sending request") + return + } + + return +} + +// TriggerRehydratePreparer prepares the TriggerRehydrate request. +func (client BackupInstancesClient) TriggerRehydratePreparer(ctx context.Context, resourceGroupName string, vaultName string, parameters AzureBackupRehydrationRequest, backupInstanceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TriggerRehydrateSender sends the TriggerRehydrate request. The method will close the +// http.Response Body if it receives an error. +func (client BackupInstancesClient) TriggerRehydrateSender(req *http.Request) (future BackupInstancesTriggerRehydrateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// TriggerRehydrateResponder handles the response to the TriggerRehydrate request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) TriggerRehydrateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// TriggerRestore triggers restore for a BackupInstance +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +// parameters - request body for operation +func (client BackupInstancesClient) TriggerRestore(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters BasicAzureBackupRestoreRequest) (result BackupInstancesTriggerRestoreFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.TriggerRestore") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TriggerRestorePreparer(ctx, vaultName, resourceGroupName, backupInstanceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "TriggerRestore", nil, "Failure preparing request") + return + } + + result, err = client.TriggerRestoreSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "TriggerRestore", nil, "Failure sending request") + return + } + + return +} + +// TriggerRestorePreparer prepares the TriggerRestore request. +func (client BackupInstancesClient) TriggerRestorePreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters BasicAzureBackupRestoreRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TriggerRestoreSender sends the TriggerRestore request. The method will close the +// http.Response Body if it receives an error. +func (client BackupInstancesClient) TriggerRestoreSender(req *http.Request) (future BackupInstancesTriggerRestoreFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// TriggerRestoreResponder handles the response to the TriggerRestore request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) TriggerRestoreResponder(resp *http.Response) (result OperationJobExtendedInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ValidateForBackup validate whether adhoc backup will be successful or not +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// parameters - request body for operation +func (client BackupInstancesClient) ValidateForBackup(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateForBackupRequest) (result BackupInstancesValidateForBackupFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.ValidateForBackup") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BackupInstance", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.DataSourceInfo", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.DataSourceInfo.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.BackupInstance.DataSourceSetInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.DataSourceSetInfo.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.BackupInstance.PolicyInfo", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.PolicyInfo.PolicyID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.BackupInstance.ProtectionStatus", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.ProtectionStatus.ErrorDetails", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.ProtectionStatus.ErrorDetails.InnerError", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.ProtectionStatus.ErrorDetails.InnerError.EmbeddedInnerError", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + }}, + {Target: "parameters.BackupInstance.ProtectionErrorDetails", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.ProtectionErrorDetails.InnerError", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupInstance.ProtectionErrorDetails.InnerError.EmbeddedInnerError", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.BackupInstance.ObjectType", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("dataprotection.BackupInstancesClient", "ValidateForBackup", err.Error()) + } + + req, err := client.ValidateForBackupPreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "ValidateForBackup", nil, "Failure preparing request") + return + } + + result, err = client.ValidateForBackupSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "ValidateForBackup", nil, "Failure sending request") + return + } + + return +} + +// ValidateForBackupPreparer prepares the ValidateForBackup request. +func (client BackupInstancesClient) ValidateForBackupPreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateForBackupRequest) (*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 = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateForBackupSender sends the ValidateForBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BackupInstancesClient) ValidateForBackupSender(req *http.Request) (future BackupInstancesValidateForBackupFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ValidateForBackupResponder handles the response to the ValidateForBackup request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) ValidateForBackupResponder(resp *http.Response) (result OperationJobExtendedInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ValidateForRestore validates if Restore can be triggered for a DataSource +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +// parameters - request body for operation +func (client BackupInstancesClient) ValidateForRestore(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters ValidateRestoreRequestObject) (result BackupInstancesValidateForRestoreFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstancesClient.ValidateForRestore") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ValidateForRestorePreparer(ctx, vaultName, resourceGroupName, backupInstanceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "ValidateForRestore", nil, "Failure preparing request") + return + } + + result, err = client.ValidateForRestoreSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesClient", "ValidateForRestore", nil, "Failure sending request") + return + } + + return +} + +// ValidateForRestorePreparer prepares the ValidateForRestore request. +func (client BackupInstancesClient) ValidateForRestorePreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters ValidateRestoreRequestObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateForRestoreSender sends the ValidateForRestore request. The method will close the +// http.Response Body if it receives an error. +func (client BackupInstancesClient) ValidateForRestoreSender(req *http.Request) (future BackupInstancesValidateForRestoreFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ValidateForRestoreResponder handles the response to the ValidateForRestore request. The method always +// closes the http.Response Body. +func (client BackupInstancesClient) ValidateForRestoreResponder(resp *http.Response) (result OperationJobExtendedInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/backuppolicies.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/backuppolicies.go new file mode 100644 index 000000000000..fcbe8babda6d --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/backuppolicies.go @@ -0,0 +1,383 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BackupPoliciesClient is the open API 2.0 Specs for Azure Data Protection service +type BackupPoliciesClient struct { + BaseClient +} + +// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client. +func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { + return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient { + return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate sends the create or update request. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupPolicyName - name of the policy +// parameters - request body for operation +func (client BackupPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string, parameters BaseBackupPolicyResource) (result BaseBackupPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.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, backupPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BackupPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string, parameters BaseBackupPolicyResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}", 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 BackupPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result BaseBackupPolicyResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete sends the delete request. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupPoliciesClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.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, backupPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BackupPoliciesClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}", 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 BackupPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a backup policy belonging to a backup vault +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string) (result BaseBackupPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.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, backupPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupPoliciesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}", 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 BackupPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) GetResponder(resp *http.Response) (result BaseBackupPolicyResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns list of backup policies belonging to a backup vault +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupPoliciesClient) List(ctx context.Context, vaultName string, resourceGroupName string) (result BaseBackupPolicyResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.List") + defer func() { + sc := -1 + if result.bbprl.Response.Response != nil { + sc = result.bbprl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.bbprl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.bbprl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.bbprl.hasNextLink() && result.bbprl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client BackupPoliciesClient) ListPreparer(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 = "2021-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.DataProtection/backupVaults/{vaultName}/backupPolicies", 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 BackupPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) ListResponder(resp *http.Response) (result BaseBackupPolicyResourceList, err error) { + err = autorest.Respond( + resp, + 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 BackupPoliciesClient) listNextResults(ctx context.Context, lastResults BaseBackupPolicyResourceList) (result BaseBackupPolicyResourceList, err error) { + req, err := lastResults.baseBackupPolicyResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "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, "dataprotection.BackupPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BackupPoliciesClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string) (result BaseBackupPolicyResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.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) + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaultoperationresults.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaultoperationresults.go new file mode 100644 index 000000000000..34d19d26ae32 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaultoperationresults.go @@ -0,0 +1,109 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BackupVaultOperationResultsClient is the open API 2.0 Specs for Azure Data Protection service +type BackupVaultOperationResultsClient struct { + BaseClient +} + +// NewBackupVaultOperationResultsClient creates an instance of the BackupVaultOperationResultsClient client. +func NewBackupVaultOperationResultsClient(subscriptionID string) BackupVaultOperationResultsClient { + return NewBackupVaultOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupVaultOperationResultsClientWithBaseURI creates an instance of the BackupVaultOperationResultsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewBackupVaultOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) BackupVaultOperationResultsClient { + return BackupVaultOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get sends the get request. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupVaultOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result BackupVaultResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultOperationResultsClient.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, "dataprotection.BackupVaultOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultOperationResultsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupVaultOperationResultsClient) 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 = "2021-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.DataProtection/backupVaults/{vaultName}/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 BackupVaultOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupVaultOperationResultsClient) GetResponder(resp *http.Response) (result BackupVaultResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaults.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaults.go new file mode 100644 index 000000000000..1d63b511a38f --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/backupvaults.go @@ -0,0 +1,660 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BackupVaultsClient is the open API 2.0 Specs for Azure Data Protection service +type BackupVaultsClient struct { + BaseClient +} + +// NewBackupVaultsClient creates an instance of the BackupVaultsClient client. +func NewBackupVaultsClient(subscriptionID string) BackupVaultsClient { + return NewBackupVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupVaultsClientWithBaseURI creates an instance of the BackupVaultsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBackupVaultsClientWithBaseURI(baseURI string, subscriptionID string) BackupVaultsClient { + return BackupVaultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability sends the check name availability request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// location - the location in which uniqueness will be verified. +// parameters - check name availability request +func (client BackupVaultsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, location string, parameters CheckNameAvailabilityRequest) (result CheckNameAvailabilityResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.CheckNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckNameAvailabilityPreparer(ctx, resourceGroupName, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "CheckNameAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client BackupVaultsClient) CheckNameAvailabilityPreparer(ctx context.Context, resourceGroupName string, location string, parameters CheckNameAvailabilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client BackupVaultsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a BackupVault resource belonging to a resource group. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// parameters - request body for operation +func (client BackupVaultsClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupVaultResource) (result BackupVaultsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.StorageSettings", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("dataprotection.BackupVaultsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BackupVaultsClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupVaultResource) (*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 = "2021-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.DataProtection/backupVaults/{vaultName}", 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 BackupVaultsClient) CreateOrUpdateSender(req *http.Request) (future BackupVaultsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) CreateOrUpdateResponder(resp *http.Response) (result BackupVaultResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a BackupVault resource from the resource group. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupVaultsClient) Delete(ctx context.Context, vaultName string, resourceGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.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) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BackupVaultsClient) DeletePreparer(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 = "2021-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.DataProtection/backupVaults/{vaultName}", 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 BackupVaultsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns a resource belonging to a resource group. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupVaultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string) (result BackupVaultResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.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, "dataprotection.BackupVaultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupVaultsClient) 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 = "2021-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.DataProtection/backupVaults/{vaultName}", 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 BackupVaultsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) GetResponder(resp *http.Response) (result BackupVaultResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInResourceGroup returns resource collection belonging to a resource group. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client BackupVaultsClient) GetInResourceGroup(ctx context.Context, resourceGroupName string) (result BackupVaultResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.GetInResourceGroup") + defer func() { + sc := -1 + if result.bvrl.Response.Response != nil { + sc = result.bvrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getInResourceGroupNextResults + req, err := client.GetInResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "GetInResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.GetInResourceGroupSender(req) + if err != nil { + result.bvrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "GetInResourceGroup", resp, "Failure sending request") + return + } + + result.bvrl, err = client.GetInResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "GetInResourceGroup", resp, "Failure responding to request") + return + } + if result.bvrl.hasNextLink() && result.bvrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetInResourceGroupPreparer prepares the GetInResourceGroup request. +func (client BackupVaultsClient) GetInResourceGroupPreparer(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 = "2021-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.DataProtection/backupVaults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInResourceGroupSender sends the GetInResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client BackupVaultsClient) GetInResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetInResourceGroupResponder handles the response to the GetInResourceGroup request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) GetInResourceGroupResponder(resp *http.Response) (result BackupVaultResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getInResourceGroupNextResults retrieves the next set of results, if any. +func (client BackupVaultsClient) getInResourceGroupNextResults(ctx context.Context, lastResults BackupVaultResourceList) (result BackupVaultResourceList, err error) { + req, err := lastResults.backupVaultResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "getInResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetInResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "getInResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.GetInResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "getInResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetInResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client BackupVaultsClient) GetInResourceGroupComplete(ctx context.Context, resourceGroupName string) (result BackupVaultResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.GetInResourceGroup") + 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.GetInResourceGroup(ctx, resourceGroupName) + return +} + +// GetInSubscription returns resource collection belonging to a subscription. +func (client BackupVaultsClient) GetInSubscription(ctx context.Context) (result BackupVaultResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.GetInSubscription") + defer func() { + sc := -1 + if result.bvrl.Response.Response != nil { + sc = result.bvrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getInSubscriptionNextResults + req, err := client.GetInSubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "GetInSubscription", nil, "Failure preparing request") + return + } + + resp, err := client.GetInSubscriptionSender(req) + if err != nil { + result.bvrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "GetInSubscription", resp, "Failure sending request") + return + } + + result.bvrl, err = client.GetInSubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "GetInSubscription", resp, "Failure responding to request") + return + } + if result.bvrl.hasNextLink() && result.bvrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetInSubscriptionPreparer prepares the GetInSubscription request. +func (client BackupVaultsClient) GetInSubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInSubscriptionSender sends the GetInSubscription request. The method will close the +// http.Response Body if it receives an error. +func (client BackupVaultsClient) GetInSubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetInSubscriptionResponder handles the response to the GetInSubscription request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) GetInSubscriptionResponder(resp *http.Response) (result BackupVaultResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getInSubscriptionNextResults retrieves the next set of results, if any. +func (client BackupVaultsClient) getInSubscriptionNextResults(ctx context.Context, lastResults BackupVaultResourceList) (result BackupVaultResourceList, err error) { + req, err := lastResults.backupVaultResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "getInSubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetInSubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "getInSubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.GetInSubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "getInSubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetInSubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client BackupVaultsClient) GetInSubscriptionComplete(ctx context.Context) (result BackupVaultResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.GetInSubscription") + 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.GetInSubscription(ctx) + return +} + +// Update updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// parameters - request body for operation +func (client BackupVaultsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters PatchResourceRequestInput) (result BackupVaultsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BackupVaultsClient) UpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters PatchResourceRequestInput) (*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 = "2021-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.DataProtection/backupVaults/{vaultName}", 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 BackupVaultsClient) UpdateSender(req *http.Request) (future BackupVaultsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BackupVaultsClient) UpdateResponder(resp *http.Response) (result BackupVaultResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/client.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/client.go new file mode 100644 index 000000000000..64d725f2bae8 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/client.go @@ -0,0 +1,41 @@ +// Package dataprotection implements the Azure ARM Dataprotection service API version 2021-07-01. +// +// Open API 2.0 Specs for Azure Data Protection service +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 Dataprotection + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Dataprotection. +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 using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotection.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotection.go new file mode 100644 index 000000000000..68a763d26776 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotection.go @@ -0,0 +1,107 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// Client is the open API 2.0 Specs for Azure Data Protection service +type Client struct { + BaseClient +} + +// NewClient creates an instance of the Client client. +func NewClient(subscriptionID string) Client { + return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { + return Client{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckFeatureSupport sends the check feature support request. +// Parameters: +// parameters - feature support request object +func (client Client) CheckFeatureSupport(ctx context.Context, location string, parameters BasicFeatureValidationRequestBase) (result FeatureValidationResponseBaseModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckFeatureSupport") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckFeatureSupportPreparer(ctx, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.Client", "CheckFeatureSupport", nil, "Failure preparing request") + return + } + + resp, err := client.CheckFeatureSupportSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.Client", "CheckFeatureSupport", resp, "Failure sending request") + return + } + + result, err = client.CheckFeatureSupportResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.Client", "CheckFeatureSupport", resp, "Failure responding to request") + return + } + + return +} + +// CheckFeatureSupportPreparer prepares the CheckFeatureSupport request. +func (client Client) CheckFeatureSupportPreparer(ctx context.Context, location string, parameters BasicFeatureValidationRequestBase) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/locations/{location}/checkFeatureSupport", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckFeatureSupportSender sends the CheckFeatureSupport request. The method will close the +// http.Response Body if it receives an error. +func (client Client) CheckFeatureSupportSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckFeatureSupportResponder handles the response to the CheckFeatureSupport request. The method always +// closes the http.Response Body. +func (client Client) CheckFeatureSupportResponder(resp *http.Response) (result FeatureValidationResponseBaseModel, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotectionapi/interfaces.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotectionapi/interfaces.go new file mode 100644 index 000000000000..7eb6f652edc2 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/dataprotectionapi/interfaces.go @@ -0,0 +1,162 @@ +package dataprotectionapi + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/dataprotection/mgmt/2021-07-01/dataprotection" + "github.com/Azure/go-autorest/autorest" +) + +// BackupVaultsClientAPI contains the set of methods on the BackupVaultsClient type. +type BackupVaultsClientAPI interface { + CheckNameAvailability(ctx context.Context, resourceGroupName string, location string, parameters dataprotection.CheckNameAvailabilityRequest) (result dataprotection.CheckNameAvailabilityResult, err error) + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, parameters dataprotection.BackupVaultResource) (result dataprotection.BackupVaultsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string) (result dataprotection.BackupVaultResource, err error) + GetInResourceGroup(ctx context.Context, resourceGroupName string) (result dataprotection.BackupVaultResourceListPage, err error) + GetInResourceGroupComplete(ctx context.Context, resourceGroupName string) (result dataprotection.BackupVaultResourceListIterator, err error) + GetInSubscription(ctx context.Context) (result dataprotection.BackupVaultResourceListPage, err error) + GetInSubscriptionComplete(ctx context.Context) (result dataprotection.BackupVaultResourceListIterator, err error) + Update(ctx context.Context, vaultName string, resourceGroupName string, parameters dataprotection.PatchResourceRequestInput) (result dataprotection.BackupVaultsUpdateFuture, err error) +} + +var _ BackupVaultsClientAPI = (*dataprotection.BackupVaultsClient)(nil) + +// OperationResultClientAPI contains the set of methods on the OperationResultClient type. +type OperationResultClientAPI interface { + Get(ctx context.Context, operationID string, location string) (result dataprotection.OperationJobExtendedInfo, err error) +} + +var _ OperationResultClientAPI = (*dataprotection.OperationResultClient)(nil) + +// OperationStatusClientAPI contains the set of methods on the OperationStatusClient type. +type OperationStatusClientAPI interface { + Get(ctx context.Context, location string, operationID string) (result dataprotection.OperationResource, err error) +} + +var _ OperationStatusClientAPI = (*dataprotection.OperationStatusClient)(nil) + +// BackupVaultOperationResultsClientAPI contains the set of methods on the BackupVaultOperationResultsClient type. +type BackupVaultOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result dataprotection.BackupVaultResource, err error) +} + +var _ BackupVaultOperationResultsClientAPI = (*dataprotection.BackupVaultOperationResultsClient)(nil) + +// ClientAPI contains the set of methods on the Client type. +type ClientAPI interface { + CheckFeatureSupport(ctx context.Context, location string, parameters dataprotection.BasicFeatureValidationRequestBase) (result dataprotection.FeatureValidationResponseBaseModel, err error) +} + +var _ ClientAPI = (*dataprotection.Client)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result dataprotection.ClientDiscoveryResponsePage, err error) + ListComplete(ctx context.Context) (result dataprotection.ClientDiscoveryResponseIterator, err error) +} + +var _ OperationsClientAPI = (*dataprotection.OperationsClient)(nil) + +// BackupPoliciesClientAPI contains the set of methods on the BackupPoliciesClient type. +type BackupPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string, parameters dataprotection.BaseBackupPolicyResource) (result dataprotection.BaseBackupPolicyResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, backupPolicyName string) (result dataprotection.BaseBackupPolicyResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string) (result dataprotection.BaseBackupPolicyResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string) (result dataprotection.BaseBackupPolicyResourceListIterator, err error) +} + +var _ BackupPoliciesClientAPI = (*dataprotection.BackupPoliciesClient)(nil) + +// BackupInstancesClientAPI contains the set of methods on the BackupInstancesClient type. +type BackupInstancesClientAPI interface { + AdhocBackup(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters dataprotection.TriggerBackupRequest) (result dataprotection.BackupInstancesAdhocBackupFuture, err error) + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters dataprotection.BackupInstanceResource) (result dataprotection.BackupInstancesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string) (result dataprotection.BackupInstancesDeleteFuture, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string) (result dataprotection.BackupInstanceResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string) (result dataprotection.BackupInstanceResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string) (result dataprotection.BackupInstanceResourceListIterator, err error) + TriggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, parameters dataprotection.AzureBackupRehydrationRequest, backupInstanceName string) (result dataprotection.BackupInstancesTriggerRehydrateFuture, err error) + TriggerRestore(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters dataprotection.BasicAzureBackupRestoreRequest) (result dataprotection.BackupInstancesTriggerRestoreFuture, err error) + ValidateForBackup(ctx context.Context, vaultName string, resourceGroupName string, parameters dataprotection.ValidateForBackupRequest) (result dataprotection.BackupInstancesValidateForBackupFuture, err error) + ValidateForRestore(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters dataprotection.ValidateRestoreRequestObject) (result dataprotection.BackupInstancesValidateForRestoreFuture, err error) +} + +var _ BackupInstancesClientAPI = (*dataprotection.BackupInstancesClient)(nil) + +// RecoveryPointsClientAPI contains the set of methods on the RecoveryPointsClient type. +type RecoveryPointsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, recoveryPointID string) (result dataprotection.AzureBackupRecoveryPointResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, filter string, skipToken string) (result dataprotection.AzureBackupRecoveryPointResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, filter string, skipToken string) (result dataprotection.AzureBackupRecoveryPointResourceListIterator, err error) +} + +var _ RecoveryPointsClientAPI = (*dataprotection.RecoveryPointsClient)(nil) + +// JobsClientAPI contains the set of methods on the JobsClient type. +type JobsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, vaultName string, jobID string) (result dataprotection.AzureBackupJobResource, err error) + List(ctx context.Context, resourceGroupName string, vaultName string) (result dataprotection.AzureBackupJobResourceListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, vaultName string) (result dataprotection.AzureBackupJobResourceListIterator, err error) +} + +var _ JobsClientAPI = (*dataprotection.JobsClient)(nil) + +// RestorableTimeRangesClientAPI contains the set of methods on the RestorableTimeRangesClient type. +type RestorableTimeRangesClientAPI interface { + Find(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters dataprotection.AzureBackupFindRestorableTimeRangesRequest) (result dataprotection.AzureBackupFindRestorableTimeRangesResponseResource, err error) +} + +var _ RestorableTimeRangesClientAPI = (*dataprotection.RestorableTimeRangesClient)(nil) + +// ExportJobsClientAPI contains the set of methods on the ExportJobsClient type. +type ExportJobsClientAPI interface { + Trigger(ctx context.Context, resourceGroupName string, vaultName string) (result dataprotection.ExportJobsTriggerFuture, err error) +} + +var _ ExportJobsClientAPI = (*dataprotection.ExportJobsClient)(nil) + +// ExportJobsOperationResultClientAPI contains the set of methods on the ExportJobsOperationResultClient type. +type ExportJobsOperationResultClientAPI interface { + Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string) (result dataprotection.ExportJobsResult, err error) +} + +var _ ExportJobsOperationResultClientAPI = (*dataprotection.ExportJobsOperationResultClient)(nil) + +// ResourceGuardsClientAPI contains the set of methods on the ResourceGuardsClient type. +type ResourceGuardsClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.ResourceGuardResource, err error) + GetBackupSecurityPINRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListPage, err error) + GetBackupSecurityPINRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListIterator, err error) + GetDefaultBackupSecurityPINRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result dataprotection.DppBaseResource, err error) + GetDefaultDeleteProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result dataprotection.DppBaseResource, err error) + GetDefaultDeleteResourceGuardProxyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result dataprotection.DppBaseResource, err error) + GetDefaultDisableSoftDeleteRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result dataprotection.DppBaseResource, err error) + GetDefaultUpdateProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result dataprotection.DppBaseResource, err error) + GetDefaultUpdateProtectionPolicyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result dataprotection.DppBaseResource, err error) + GetDeleteProtectedItemRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListPage, err error) + GetDeleteProtectedItemRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListIterator, err error) + GetDeleteResourceGuardProxyRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListPage, err error) + GetDeleteResourceGuardProxyRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListIterator, err error) + GetDisableSoftDeleteRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListPage, err error) + GetDisableSoftDeleteRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListIterator, err error) + GetResourcesInResourceGroup(ctx context.Context, resourceGroupName string) (result dataprotection.ResourceGuardResourceListPage, err error) + GetResourcesInResourceGroupComplete(ctx context.Context, resourceGroupName string) (result dataprotection.ResourceGuardResourceListIterator, err error) + GetResourcesInSubscription(ctx context.Context) (result dataprotection.ResourceGuardResourceListPage, err error) + GetResourcesInSubscriptionComplete(ctx context.Context) (result dataprotection.ResourceGuardResourceListIterator, err error) + GetUpdateProtectedItemRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListPage, err error) + GetUpdateProtectedItemRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListIterator, err error) + GetUpdateProtectionPolicyRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListPage, err error) + GetUpdateProtectionPolicyRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result dataprotection.DppBaseResourceListIterator, err error) + Patch(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters dataprotection.PatchResourceRequestInput) (result dataprotection.ResourceGuardResource, err error) + Put(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters dataprotection.ResourceGuardResource) (result dataprotection.ResourceGuardResource, err error) +} + +var _ ResourceGuardsClientAPI = (*dataprotection.ResourceGuardsClient)(nil) diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/enums.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/enums.go new file mode 100644 index 000000000000..9da554a4ddd0 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/enums.go @@ -0,0 +1,690 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AbsoluteMarker enumerates the values for absolute marker. +type AbsoluteMarker string + +const ( + // AbsoluteMarkerAllBackup ... + AbsoluteMarkerAllBackup AbsoluteMarker = "AllBackup" + // AbsoluteMarkerFirstOfDay ... + AbsoluteMarkerFirstOfDay AbsoluteMarker = "FirstOfDay" + // AbsoluteMarkerFirstOfMonth ... + AbsoluteMarkerFirstOfMonth AbsoluteMarker = "FirstOfMonth" + // AbsoluteMarkerFirstOfWeek ... + AbsoluteMarkerFirstOfWeek AbsoluteMarker = "FirstOfWeek" + // AbsoluteMarkerFirstOfYear ... + AbsoluteMarkerFirstOfYear AbsoluteMarker = "FirstOfYear" +) + +// PossibleAbsoluteMarkerValues returns an array of possible values for the AbsoluteMarker const type. +func PossibleAbsoluteMarkerValues() []AbsoluteMarker { + return []AbsoluteMarker{AbsoluteMarkerAllBackup, AbsoluteMarkerFirstOfDay, AbsoluteMarkerFirstOfMonth, AbsoluteMarkerFirstOfWeek, AbsoluteMarkerFirstOfYear} +} + +// CreatedByType enumerates the values for created by type. +type CreatedByType string + +const ( + // CreatedByTypeApplication ... + CreatedByTypeApplication CreatedByType = "Application" + // CreatedByTypeKey ... + CreatedByTypeKey CreatedByType = "Key" + // CreatedByTypeManagedIdentity ... + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + // CreatedByTypeUser ... + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} +} + +// CurrentProtectionState enumerates the values for current protection state. +type CurrentProtectionState string + +const ( + // CurrentProtectionStateBackupSchedulesSuspended ... + CurrentProtectionStateBackupSchedulesSuspended CurrentProtectionState = "BackupSchedulesSuspended" + // CurrentProtectionStateConfiguringProtection ... + CurrentProtectionStateConfiguringProtection CurrentProtectionState = "ConfiguringProtection" + // CurrentProtectionStateConfiguringProtectionFailed ... + CurrentProtectionStateConfiguringProtectionFailed CurrentProtectionState = "ConfiguringProtectionFailed" + // CurrentProtectionStateInvalid ... + CurrentProtectionStateInvalid CurrentProtectionState = "Invalid" + // CurrentProtectionStateNotProtected ... + CurrentProtectionStateNotProtected CurrentProtectionState = "NotProtected" + // CurrentProtectionStateProtectionConfigured ... + CurrentProtectionStateProtectionConfigured CurrentProtectionState = "ProtectionConfigured" + // CurrentProtectionStateProtectionError ... + CurrentProtectionStateProtectionError CurrentProtectionState = "ProtectionError" + // CurrentProtectionStateProtectionStopped ... + CurrentProtectionStateProtectionStopped CurrentProtectionState = "ProtectionStopped" + // CurrentProtectionStateRetentionSchedulesSuspended ... + CurrentProtectionStateRetentionSchedulesSuspended CurrentProtectionState = "RetentionSchedulesSuspended" + // CurrentProtectionStateSoftDeleted ... + CurrentProtectionStateSoftDeleted CurrentProtectionState = "SoftDeleted" + // CurrentProtectionStateSoftDeleting ... + CurrentProtectionStateSoftDeleting CurrentProtectionState = "SoftDeleting" + // CurrentProtectionStateUpdatingProtection ... + CurrentProtectionStateUpdatingProtection CurrentProtectionState = "UpdatingProtection" +) + +// PossibleCurrentProtectionStateValues returns an array of possible values for the CurrentProtectionState const type. +func PossibleCurrentProtectionStateValues() []CurrentProtectionState { + return []CurrentProtectionState{CurrentProtectionStateBackupSchedulesSuspended, CurrentProtectionStateConfiguringProtection, CurrentProtectionStateConfiguringProtectionFailed, CurrentProtectionStateInvalid, CurrentProtectionStateNotProtected, CurrentProtectionStateProtectionConfigured, CurrentProtectionStateProtectionError, CurrentProtectionStateProtectionStopped, CurrentProtectionStateRetentionSchedulesSuspended, CurrentProtectionStateSoftDeleted, CurrentProtectionStateSoftDeleting, CurrentProtectionStateUpdatingProtection} +} + +// DataStoreTypes enumerates the values for data store types. +type DataStoreTypes string + +const ( + // DataStoreTypesArchiveStore ... + DataStoreTypesArchiveStore DataStoreTypes = "ArchiveStore" + // DataStoreTypesOperationalStore ... + DataStoreTypesOperationalStore DataStoreTypes = "OperationalStore" + // DataStoreTypesVaultStore ... + DataStoreTypesVaultStore DataStoreTypes = "VaultStore" +) + +// PossibleDataStoreTypesValues returns an array of possible values for the DataStoreTypes const type. +func PossibleDataStoreTypesValues() []DataStoreTypes { + return []DataStoreTypes{DataStoreTypesArchiveStore, DataStoreTypesOperationalStore, DataStoreTypesVaultStore} +} + +// DayOfWeek enumerates the values for day of week. +type DayOfWeek string + +const ( + // DayOfWeekFriday ... + DayOfWeekFriday DayOfWeek = "Friday" + // DayOfWeekMonday ... + DayOfWeekMonday DayOfWeek = "Monday" + // DayOfWeekSaturday ... + DayOfWeekSaturday DayOfWeek = "Saturday" + // DayOfWeekSunday ... + DayOfWeekSunday DayOfWeek = "Sunday" + // DayOfWeekThursday ... + DayOfWeekThursday DayOfWeek = "Thursday" + // DayOfWeekTuesday ... + DayOfWeekTuesday DayOfWeek = "Tuesday" + // DayOfWeekWednesday ... + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{DayOfWeekFriday, DayOfWeekMonday, DayOfWeekSaturday, DayOfWeekSunday, DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday} +} + +// FeatureSupportStatus enumerates the values for feature support status. +type FeatureSupportStatus string + +const ( + // FeatureSupportStatusAlphaPreview ... + FeatureSupportStatusAlphaPreview FeatureSupportStatus = "AlphaPreview" + // FeatureSupportStatusGenerallyAvailable ... + FeatureSupportStatusGenerallyAvailable FeatureSupportStatus = "GenerallyAvailable" + // FeatureSupportStatusInvalid ... + FeatureSupportStatusInvalid FeatureSupportStatus = "Invalid" + // FeatureSupportStatusNotSupported ... + FeatureSupportStatusNotSupported FeatureSupportStatus = "NotSupported" + // FeatureSupportStatusPrivatePreview ... + FeatureSupportStatusPrivatePreview FeatureSupportStatus = "PrivatePreview" + // FeatureSupportStatusPublicPreview ... + FeatureSupportStatusPublicPreview FeatureSupportStatus = "PublicPreview" +) + +// PossibleFeatureSupportStatusValues returns an array of possible values for the FeatureSupportStatus const type. +func PossibleFeatureSupportStatusValues() []FeatureSupportStatus { + return []FeatureSupportStatus{FeatureSupportStatusAlphaPreview, FeatureSupportStatusGenerallyAvailable, FeatureSupportStatusInvalid, FeatureSupportStatusNotSupported, FeatureSupportStatusPrivatePreview, FeatureSupportStatusPublicPreview} +} + +// FeatureType enumerates the values for feature type. +type FeatureType string + +const ( + // FeatureTypeDataSourceType ... + FeatureTypeDataSourceType FeatureType = "DataSourceType" + // FeatureTypeInvalid ... + FeatureTypeInvalid FeatureType = "Invalid" +) + +// PossibleFeatureTypeValues returns an array of possible values for the FeatureType const type. +func PossibleFeatureTypeValues() []FeatureType { + return []FeatureType{FeatureTypeDataSourceType, FeatureTypeInvalid} +} + +// Month enumerates the values for month. +type Month string + +const ( + // MonthApril ... + MonthApril Month = "April" + // MonthAugust ... + MonthAugust Month = "August" + // MonthDecember ... + MonthDecember Month = "December" + // MonthFebruary ... + MonthFebruary Month = "February" + // MonthJanuary ... + MonthJanuary Month = "January" + // MonthJuly ... + MonthJuly Month = "July" + // MonthJune ... + MonthJune Month = "June" + // MonthMarch ... + MonthMarch Month = "March" + // MonthMay ... + MonthMay Month = "May" + // MonthNovember ... + MonthNovember Month = "November" + // MonthOctober ... + MonthOctober Month = "October" + // MonthSeptember ... + MonthSeptember Month = "September" +) + +// PossibleMonthValues returns an array of possible values for the Month const type. +func PossibleMonthValues() []Month { + return []Month{MonthApril, MonthAugust, MonthDecember, MonthFebruary, MonthJanuary, MonthJuly, MonthJune, MonthMarch, MonthMay, MonthNovember, MonthOctober, MonthSeptember} +} + +// ObjectType enumerates the values for object type. +type ObjectType string + +const ( + // ObjectTypeAuthCredentials ... + ObjectTypeAuthCredentials ObjectType = "AuthCredentials" + // ObjectTypeSecretStoreBasedAuthCredentials ... + ObjectTypeSecretStoreBasedAuthCredentials ObjectType = "SecretStoreBasedAuthCredentials" +) + +// PossibleObjectTypeValues returns an array of possible values for the ObjectType const type. +func PossibleObjectTypeValues() []ObjectType { + return []ObjectType{ObjectTypeAuthCredentials, ObjectTypeSecretStoreBasedAuthCredentials} +} + +// ObjectTypeBasicAzureBackupRecoveryPoint enumerates the values for object type basic azure backup recovery +// point. +type ObjectTypeBasicAzureBackupRecoveryPoint string + +const ( + // ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint ... + ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint ObjectTypeBasicAzureBackupRecoveryPoint = "AzureBackupDiscreteRecoveryPoint" + // ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint ... + ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint ObjectTypeBasicAzureBackupRecoveryPoint = "AzureBackupRecoveryPoint" +) + +// PossibleObjectTypeBasicAzureBackupRecoveryPointValues returns an array of possible values for the ObjectTypeBasicAzureBackupRecoveryPoint const type. +func PossibleObjectTypeBasicAzureBackupRecoveryPointValues() []ObjectTypeBasicAzureBackupRecoveryPoint { + return []ObjectTypeBasicAzureBackupRecoveryPoint{ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint, ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint} +} + +// ObjectTypeBasicAzureBackupRestoreRequest enumerates the values for object type basic azure backup restore +// request. +type ObjectTypeBasicAzureBackupRestoreRequest string + +const ( + // ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest ... + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = "AzureBackupRecoveryPointBasedRestoreRequest" + // ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest ... + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = "AzureBackupRecoveryTimeBasedRestoreRequest" + // ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest ... + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest ObjectTypeBasicAzureBackupRestoreRequest = "AzureBackupRestoreRequest" + // ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest ... + ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest ObjectTypeBasicAzureBackupRestoreRequest = "AzureBackupRestoreWithRehydrationRequest" +) + +// PossibleObjectTypeBasicAzureBackupRestoreRequestValues returns an array of possible values for the ObjectTypeBasicAzureBackupRestoreRequest const type. +func PossibleObjectTypeBasicAzureBackupRestoreRequestValues() []ObjectTypeBasicAzureBackupRestoreRequest { + return []ObjectTypeBasicAzureBackupRestoreRequest{ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest, ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest, ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest, ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest} +} + +// ObjectTypeBasicBackupCriteria enumerates the values for object type basic backup criteria. +type ObjectTypeBasicBackupCriteria string + +const ( + // ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria ... + ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria ObjectTypeBasicBackupCriteria = "BackupCriteria" + // ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria ... + ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria ObjectTypeBasicBackupCriteria = "ScheduleBasedBackupCriteria" +) + +// PossibleObjectTypeBasicBackupCriteriaValues returns an array of possible values for the ObjectTypeBasicBackupCriteria const type. +func PossibleObjectTypeBasicBackupCriteriaValues() []ObjectTypeBasicBackupCriteria { + return []ObjectTypeBasicBackupCriteria{ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria, ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria} +} + +// ObjectTypeBasicBackupParameters enumerates the values for object type basic backup parameters. +type ObjectTypeBasicBackupParameters string + +const ( + // ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams ... + ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams ObjectTypeBasicBackupParameters = "AzureBackupParams" + // ObjectTypeBasicBackupParametersObjectTypeBackupParameters ... + ObjectTypeBasicBackupParametersObjectTypeBackupParameters ObjectTypeBasicBackupParameters = "BackupParameters" +) + +// PossibleObjectTypeBasicBackupParametersValues returns an array of possible values for the ObjectTypeBasicBackupParameters const type. +func PossibleObjectTypeBasicBackupParametersValues() []ObjectTypeBasicBackupParameters { + return []ObjectTypeBasicBackupParameters{ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams, ObjectTypeBasicBackupParametersObjectTypeBackupParameters} +} + +// ObjectTypeBasicBaseBackupPolicy enumerates the values for object type basic base backup policy. +type ObjectTypeBasicBaseBackupPolicy string + +const ( + // ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy ... + ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy ObjectTypeBasicBaseBackupPolicy = "BackupPolicy" + // ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy ... + ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy ObjectTypeBasicBaseBackupPolicy = "BaseBackupPolicy" +) + +// PossibleObjectTypeBasicBaseBackupPolicyValues returns an array of possible values for the ObjectTypeBasicBaseBackupPolicy const type. +func PossibleObjectTypeBasicBaseBackupPolicyValues() []ObjectTypeBasicBaseBackupPolicy { + return []ObjectTypeBasicBaseBackupPolicy{ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy, ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy} +} + +// ObjectTypeBasicBasePolicyRule enumerates the values for object type basic base policy rule. +type ObjectTypeBasicBasePolicyRule string + +const ( + // ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule ... + ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule ObjectTypeBasicBasePolicyRule = "AzureBackupRule" + // ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule ... + ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule ObjectTypeBasicBasePolicyRule = "AzureRetentionRule" + // ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule ... + ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule ObjectTypeBasicBasePolicyRule = "BasePolicyRule" +) + +// PossibleObjectTypeBasicBasePolicyRuleValues returns an array of possible values for the ObjectTypeBasicBasePolicyRule const type. +func PossibleObjectTypeBasicBasePolicyRuleValues() []ObjectTypeBasicBasePolicyRule { + return []ObjectTypeBasicBasePolicyRule{ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule, ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule, ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule} +} + +// ObjectTypeBasicCopyOption enumerates the values for object type basic copy option. +type ObjectTypeBasicCopyOption string + +const ( + // ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption ... + ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption ObjectTypeBasicCopyOption = "CopyOnExpiryOption" + // ObjectTypeBasicCopyOptionObjectTypeCopyOption ... + ObjectTypeBasicCopyOptionObjectTypeCopyOption ObjectTypeBasicCopyOption = "CopyOption" + // ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption ... + ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption ObjectTypeBasicCopyOption = "CustomCopyOption" + // ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption ... + ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption ObjectTypeBasicCopyOption = "ImmediateCopyOption" +) + +// PossibleObjectTypeBasicCopyOptionValues returns an array of possible values for the ObjectTypeBasicCopyOption const type. +func PossibleObjectTypeBasicCopyOptionValues() []ObjectTypeBasicCopyOption { + return []ObjectTypeBasicCopyOption{ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption, ObjectTypeBasicCopyOptionObjectTypeCopyOption, ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption, ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption} +} + +// ObjectTypeBasicDataStoreParameters enumerates the values for object type basic data store parameters. +type ObjectTypeBasicDataStoreParameters string + +const ( + // ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters ... + ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters ObjectTypeBasicDataStoreParameters = "AzureOperationalStoreParameters" + // ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters ... + ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters ObjectTypeBasicDataStoreParameters = "DataStoreParameters" +) + +// PossibleObjectTypeBasicDataStoreParametersValues returns an array of possible values for the ObjectTypeBasicDataStoreParameters const type. +func PossibleObjectTypeBasicDataStoreParametersValues() []ObjectTypeBasicDataStoreParameters { + return []ObjectTypeBasicDataStoreParameters{ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters, ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters} +} + +// ObjectTypeBasicDeleteOption enumerates the values for object type basic delete option. +type ObjectTypeBasicDeleteOption string + +const ( + // ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption ... + ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption ObjectTypeBasicDeleteOption = "AbsoluteDeleteOption" + // ObjectTypeBasicDeleteOptionObjectTypeDeleteOption ... + ObjectTypeBasicDeleteOptionObjectTypeDeleteOption ObjectTypeBasicDeleteOption = "DeleteOption" +) + +// PossibleObjectTypeBasicDeleteOptionValues returns an array of possible values for the ObjectTypeBasicDeleteOption const type. +func PossibleObjectTypeBasicDeleteOptionValues() []ObjectTypeBasicDeleteOption { + return []ObjectTypeBasicDeleteOption{ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption, ObjectTypeBasicDeleteOptionObjectTypeDeleteOption} +} + +// ObjectTypeBasicFeatureValidationRequestBase enumerates the values for object type basic feature validation +// request base. +type ObjectTypeBasicFeatureValidationRequestBase string + +const ( + // ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest ... + ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest ObjectTypeBasicFeatureValidationRequestBase = "FeatureValidationRequest" + // ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase ... + ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase ObjectTypeBasicFeatureValidationRequestBase = "FeatureValidationRequestBase" +) + +// PossibleObjectTypeBasicFeatureValidationRequestBaseValues returns an array of possible values for the ObjectTypeBasicFeatureValidationRequestBase const type. +func PossibleObjectTypeBasicFeatureValidationRequestBaseValues() []ObjectTypeBasicFeatureValidationRequestBase { + return []ObjectTypeBasicFeatureValidationRequestBase{ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest, ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase} +} + +// ObjectTypeBasicFeatureValidationResponseBase enumerates the values for object type basic feature validation +// response base. +type ObjectTypeBasicFeatureValidationResponseBase string + +const ( + // ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse ... + ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse ObjectTypeBasicFeatureValidationResponseBase = "FeatureValidationResponse" + // ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase ... + ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase ObjectTypeBasicFeatureValidationResponseBase = "FeatureValidationResponseBase" +) + +// PossibleObjectTypeBasicFeatureValidationResponseBaseValues returns an array of possible values for the ObjectTypeBasicFeatureValidationResponseBase const type. +func PossibleObjectTypeBasicFeatureValidationResponseBaseValues() []ObjectTypeBasicFeatureValidationResponseBase { + return []ObjectTypeBasicFeatureValidationResponseBase{ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse, ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase} +} + +// ObjectTypeBasicItemLevelRestoreCriteria enumerates the values for object type basic item level restore +// criteria. +type ObjectTypeBasicItemLevelRestoreCriteria string + +const ( + // ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria ... + ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = "ItemLevelRestoreCriteria" + // ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria ... + ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria ObjectTypeBasicItemLevelRestoreCriteria = "RangeBasedItemLevelRestoreCriteria" +) + +// PossibleObjectTypeBasicItemLevelRestoreCriteriaValues returns an array of possible values for the ObjectTypeBasicItemLevelRestoreCriteria const type. +func PossibleObjectTypeBasicItemLevelRestoreCriteriaValues() []ObjectTypeBasicItemLevelRestoreCriteria { + return []ObjectTypeBasicItemLevelRestoreCriteria{ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria, ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria} +} + +// ObjectTypeBasicOperationExtendedInfo enumerates the values for object type basic operation extended info. +type ObjectTypeBasicOperationExtendedInfo string + +const ( + // ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo ... + ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo ObjectTypeBasicOperationExtendedInfo = "OperationExtendedInfo" + // ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo ... + ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo ObjectTypeBasicOperationExtendedInfo = "OperationJobExtendedInfo" +) + +// PossibleObjectTypeBasicOperationExtendedInfoValues returns an array of possible values for the ObjectTypeBasicOperationExtendedInfo const type. +func PossibleObjectTypeBasicOperationExtendedInfoValues() []ObjectTypeBasicOperationExtendedInfo { + return []ObjectTypeBasicOperationExtendedInfo{ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo, ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo} +} + +// ObjectTypeBasicRestoreTargetInfoBase enumerates the values for object type basic restore target info base. +type ObjectTypeBasicRestoreTargetInfoBase string + +const ( + // ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo ... + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = "ItemLevelRestoreTargetInfo" + // ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo ... + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo ObjectTypeBasicRestoreTargetInfoBase = "RestoreFilesTargetInfo" + // ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo ... + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo ObjectTypeBasicRestoreTargetInfoBase = "RestoreTargetInfo" + // ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase ... + ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase ObjectTypeBasicRestoreTargetInfoBase = "RestoreTargetInfoBase" +) + +// PossibleObjectTypeBasicRestoreTargetInfoBaseValues returns an array of possible values for the ObjectTypeBasicRestoreTargetInfoBase const type. +func PossibleObjectTypeBasicRestoreTargetInfoBaseValues() []ObjectTypeBasicRestoreTargetInfoBase { + return []ObjectTypeBasicRestoreTargetInfoBase{ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo, ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo, ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo, ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase} +} + +// ObjectTypeBasicTriggerContext enumerates the values for object type basic trigger context. +type ObjectTypeBasicTriggerContext string + +const ( + // ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext ... + ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext ObjectTypeBasicTriggerContext = "AdhocBasedTriggerContext" + // ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext ... + ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext ObjectTypeBasicTriggerContext = "ScheduleBasedTriggerContext" + // ObjectTypeBasicTriggerContextObjectTypeTriggerContext ... + ObjectTypeBasicTriggerContextObjectTypeTriggerContext ObjectTypeBasicTriggerContext = "TriggerContext" +) + +// PossibleObjectTypeBasicTriggerContextValues returns an array of possible values for the ObjectTypeBasicTriggerContext const type. +func PossibleObjectTypeBasicTriggerContextValues() []ObjectTypeBasicTriggerContext { + return []ObjectTypeBasicTriggerContext{ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext, ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext, ObjectTypeBasicTriggerContextObjectTypeTriggerContext} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateProvisioning ... + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + // ProvisioningStateUnknown ... + ProvisioningStateUnknown ProvisioningState = "Unknown" + // ProvisioningStateUpdating ... + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ProvisioningStateFailed, ProvisioningStateProvisioning, ProvisioningStateSucceeded, ProvisioningStateUnknown, ProvisioningStateUpdating} +} + +// RehydrationPriority enumerates the values for rehydration priority. +type RehydrationPriority string + +const ( + // RehydrationPriorityHigh ... + RehydrationPriorityHigh RehydrationPriority = "High" + // RehydrationPriorityInvalid ... + RehydrationPriorityInvalid RehydrationPriority = "Invalid" + // RehydrationPriorityStandard ... + RehydrationPriorityStandard RehydrationPriority = "Standard" +) + +// PossibleRehydrationPriorityValues returns an array of possible values for the RehydrationPriority const type. +func PossibleRehydrationPriorityValues() []RehydrationPriority { + return []RehydrationPriority{RehydrationPriorityHigh, RehydrationPriorityInvalid, RehydrationPriorityStandard} +} + +// RehydrationStatus enumerates the values for rehydration status. +type RehydrationStatus string + +const ( + // RehydrationStatusCOMPLETED ... + RehydrationStatusCOMPLETED RehydrationStatus = "COMPLETED" + // RehydrationStatusCREATEINPROGRESS ... + RehydrationStatusCREATEINPROGRESS RehydrationStatus = "CREATE_IN_PROGRESS" + // RehydrationStatusDELETED ... + RehydrationStatusDELETED RehydrationStatus = "DELETED" + // RehydrationStatusDELETEINPROGRESS ... + RehydrationStatusDELETEINPROGRESS RehydrationStatus = "DELETE_IN_PROGRESS" + // RehydrationStatusFAILED ... + RehydrationStatusFAILED RehydrationStatus = "FAILED" +) + +// PossibleRehydrationStatusValues returns an array of possible values for the RehydrationStatus const type. +func PossibleRehydrationStatusValues() []RehydrationStatus { + return []RehydrationStatus{RehydrationStatusCOMPLETED, RehydrationStatusCREATEINPROGRESS, RehydrationStatusDELETED, RehydrationStatusDELETEINPROGRESS, RehydrationStatusFAILED} +} + +// ResourceMoveState enumerates the values for resource move state. +type ResourceMoveState string + +const ( + // ResourceMoveStateCommitFailed ... + ResourceMoveStateCommitFailed ResourceMoveState = "CommitFailed" + // ResourceMoveStateCommitTimedout ... + ResourceMoveStateCommitTimedout ResourceMoveState = "CommitTimedout" + // ResourceMoveStateCriticalFailure ... + ResourceMoveStateCriticalFailure ResourceMoveState = "CriticalFailure" + // ResourceMoveStateFailed ... + ResourceMoveStateFailed ResourceMoveState = "Failed" + // ResourceMoveStateInProgress ... + ResourceMoveStateInProgress ResourceMoveState = "InProgress" + // ResourceMoveStateMoveSucceeded ... + ResourceMoveStateMoveSucceeded ResourceMoveState = "MoveSucceeded" + // ResourceMoveStatePartialSuccess ... + ResourceMoveStatePartialSuccess ResourceMoveState = "PartialSuccess" + // ResourceMoveStatePrepareFailed ... + ResourceMoveStatePrepareFailed ResourceMoveState = "PrepareFailed" + // ResourceMoveStatePrepareTimedout ... + ResourceMoveStatePrepareTimedout ResourceMoveState = "PrepareTimedout" + // ResourceMoveStateUnknown ... + ResourceMoveStateUnknown ResourceMoveState = "Unknown" +) + +// PossibleResourceMoveStateValues returns an array of possible values for the ResourceMoveState const type. +func PossibleResourceMoveStateValues() []ResourceMoveState { + return []ResourceMoveState{ResourceMoveStateCommitFailed, ResourceMoveStateCommitTimedout, ResourceMoveStateCriticalFailure, ResourceMoveStateFailed, ResourceMoveStateInProgress, ResourceMoveStateMoveSucceeded, ResourceMoveStatePartialSuccess, ResourceMoveStatePrepareFailed, ResourceMoveStatePrepareTimedout, ResourceMoveStateUnknown} +} + +// RestoreSourceDataStoreType enumerates the values for restore source data store type. +type RestoreSourceDataStoreType string + +const ( + // RestoreSourceDataStoreTypeArchiveStore ... + RestoreSourceDataStoreTypeArchiveStore RestoreSourceDataStoreType = "ArchiveStore" + // RestoreSourceDataStoreTypeOperationalStore ... + RestoreSourceDataStoreTypeOperationalStore RestoreSourceDataStoreType = "OperationalStore" + // RestoreSourceDataStoreTypeVaultStore ... + RestoreSourceDataStoreTypeVaultStore RestoreSourceDataStoreType = "VaultStore" +) + +// PossibleRestoreSourceDataStoreTypeValues returns an array of possible values for the RestoreSourceDataStoreType const type. +func PossibleRestoreSourceDataStoreTypeValues() []RestoreSourceDataStoreType { + return []RestoreSourceDataStoreType{RestoreSourceDataStoreTypeArchiveStore, RestoreSourceDataStoreTypeOperationalStore, RestoreSourceDataStoreTypeVaultStore} +} + +// RestoreTargetLocationType enumerates the values for restore target location type. +type RestoreTargetLocationType string + +const ( + // RestoreTargetLocationTypeAzureBlobs ... + RestoreTargetLocationTypeAzureBlobs RestoreTargetLocationType = "AzureBlobs" + // RestoreTargetLocationTypeAzureFiles ... + RestoreTargetLocationTypeAzureFiles RestoreTargetLocationType = "AzureFiles" + // RestoreTargetLocationTypeInvalid ... + RestoreTargetLocationTypeInvalid RestoreTargetLocationType = "Invalid" +) + +// PossibleRestoreTargetLocationTypeValues returns an array of possible values for the RestoreTargetLocationType const type. +func PossibleRestoreTargetLocationTypeValues() []RestoreTargetLocationType { + return []RestoreTargetLocationType{RestoreTargetLocationTypeAzureBlobs, RestoreTargetLocationTypeAzureFiles, RestoreTargetLocationTypeInvalid} +} + +// SecretStoreType enumerates the values for secret store type. +type SecretStoreType string + +const ( + // SecretStoreTypeAzureKeyVault ... + SecretStoreTypeAzureKeyVault SecretStoreType = "AzureKeyVault" + // SecretStoreTypeInvalid ... + SecretStoreTypeInvalid SecretStoreType = "Invalid" +) + +// PossibleSecretStoreTypeValues returns an array of possible values for the SecretStoreType const type. +func PossibleSecretStoreTypeValues() []SecretStoreType { + return []SecretStoreType{SecretStoreTypeAzureKeyVault, SecretStoreTypeInvalid} +} + +// SourceDataStoreType enumerates the values for source data store type. +type SourceDataStoreType string + +const ( + // SourceDataStoreTypeArchiveStore ... + SourceDataStoreTypeArchiveStore SourceDataStoreType = "ArchiveStore" + // SourceDataStoreTypeSnapshotStore ... + SourceDataStoreTypeSnapshotStore SourceDataStoreType = "SnapshotStore" + // SourceDataStoreTypeVaultStore ... + SourceDataStoreTypeVaultStore SourceDataStoreType = "VaultStore" +) + +// PossibleSourceDataStoreTypeValues returns an array of possible values for the SourceDataStoreType const type. +func PossibleSourceDataStoreTypeValues() []SourceDataStoreType { + return []SourceDataStoreType{SourceDataStoreTypeArchiveStore, SourceDataStoreTypeSnapshotStore, SourceDataStoreTypeVaultStore} +} + +// Status enumerates the values for status. +type Status string + +const ( + // StatusConfiguringProtection ... + StatusConfiguringProtection Status = "ConfiguringProtection" + // StatusConfiguringProtectionFailed ... + StatusConfiguringProtectionFailed Status = "ConfiguringProtectionFailed" + // StatusProtectionConfigured ... + StatusProtectionConfigured Status = "ProtectionConfigured" + // StatusProtectionStopped ... + StatusProtectionStopped Status = "ProtectionStopped" + // StatusSoftDeleted ... + StatusSoftDeleted Status = "SoftDeleted" + // StatusSoftDeleting ... + StatusSoftDeleting Status = "SoftDeleting" +) + +// PossibleStatusValues returns an array of possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{StatusConfiguringProtection, StatusConfiguringProtectionFailed, StatusProtectionConfigured, StatusProtectionStopped, StatusSoftDeleted, StatusSoftDeleting} +} + +// StorageSettingStoreTypes enumerates the values for storage setting store types. +type StorageSettingStoreTypes string + +const ( + // StorageSettingStoreTypesArchiveStore ... + StorageSettingStoreTypesArchiveStore StorageSettingStoreTypes = "ArchiveStore" + // StorageSettingStoreTypesSnapshotStore ... + StorageSettingStoreTypesSnapshotStore StorageSettingStoreTypes = "SnapshotStore" + // StorageSettingStoreTypesVaultStore ... + StorageSettingStoreTypesVaultStore StorageSettingStoreTypes = "VaultStore" +) + +// PossibleStorageSettingStoreTypesValues returns an array of possible values for the StorageSettingStoreTypes const type. +func PossibleStorageSettingStoreTypesValues() []StorageSettingStoreTypes { + return []StorageSettingStoreTypes{StorageSettingStoreTypesArchiveStore, StorageSettingStoreTypesSnapshotStore, StorageSettingStoreTypesVaultStore} +} + +// StorageSettingTypes enumerates the values for storage setting types. +type StorageSettingTypes string + +const ( + // StorageSettingTypesGeoRedundant ... + StorageSettingTypesGeoRedundant StorageSettingTypes = "GeoRedundant" + // StorageSettingTypesLocallyRedundant ... + StorageSettingTypesLocallyRedundant StorageSettingTypes = "LocallyRedundant" +) + +// PossibleStorageSettingTypesValues returns an array of possible values for the StorageSettingTypes const type. +func PossibleStorageSettingTypesValues() []StorageSettingTypes { + return []StorageSettingTypes{StorageSettingTypesGeoRedundant, StorageSettingTypesLocallyRedundant} +} + +// WeekNumber enumerates the values for week number. +type WeekNumber string + +const ( + // WeekNumberFirst ... + WeekNumberFirst WeekNumber = "First" + // WeekNumberFourth ... + WeekNumberFourth WeekNumber = "Fourth" + // WeekNumberLast ... + WeekNumberLast WeekNumber = "Last" + // WeekNumberSecond ... + WeekNumberSecond WeekNumber = "Second" + // WeekNumberThird ... + WeekNumberThird WeekNumber = "Third" +) + +// PossibleWeekNumberValues returns an array of possible values for the WeekNumber const type. +func PossibleWeekNumberValues() []WeekNumber { + return []WeekNumber{WeekNumberFirst, WeekNumberFourth, WeekNumberLast, WeekNumberSecond, WeekNumberThird} +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobs.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobs.go new file mode 100644 index 000000000000..b3b8f891ba7c --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobs.go @@ -0,0 +1,108 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExportJobsClient is the open API 2.0 Specs for Azure Data Protection service +type ExportJobsClient struct { + BaseClient +} + +// NewExportJobsClient creates an instance of the ExportJobsClient client. +func NewExportJobsClient(subscriptionID string) ExportJobsClient { + return NewExportJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExportJobsClientWithBaseURI creates an instance of the ExportJobsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewExportJobsClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsClient { + return ExportJobsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Trigger triggers export of jobs and returns an OperationID to track. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// vaultName - the name of the backup vault. +func (client ExportJobsClient) Trigger(ctx context.Context, resourceGroupName string, vaultName string) (result ExportJobsTriggerFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExportJobsClient.Trigger") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TriggerPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ExportJobsClient", "Trigger", nil, "Failure preparing request") + return + } + + result, err = client.TriggerSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ExportJobsClient", "Trigger", nil, "Failure sending request") + return + } + + return +} + +// TriggerPreparer prepares the Trigger request. +func (client ExportJobsClient) TriggerPreparer(ctx context.Context, resourceGroupName string, vaultName 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 = "2021-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.DataProtection/backupVaults/{vaultName}/exportBackupJobs", pathParameters), + 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 ExportJobsClient) TriggerSender(req *http.Request) (future ExportJobsTriggerFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// TriggerResponder handles the response to the Trigger request. The method always +// closes the http.Response Body. +func (client ExportJobsClient) TriggerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobsoperationresult.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobsoperationresult.go new file mode 100644 index 000000000000..4d55af171c1e --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/exportjobsoperationresult.go @@ -0,0 +1,112 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExportJobsOperationResultClient is the open API 2.0 Specs for Azure Data Protection service +type ExportJobsOperationResultClient struct { + BaseClient +} + +// NewExportJobsOperationResultClient creates an instance of the ExportJobsOperationResultClient client. +func NewExportJobsOperationResultClient(subscriptionID string) ExportJobsOperationResultClient { + return NewExportJobsOperationResultClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExportJobsOperationResultClientWithBaseURI creates an instance of the ExportJobsOperationResultClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewExportJobsOperationResultClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultClient { + return ExportJobsOperationResultClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it +// also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized +// format. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// vaultName - the name of the backup vault. +// operationID - operationID which represents the export job. +func (client ExportJobsOperationResultClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string) (result ExportJobsResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExportJobsOperationResultClient.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, vaultName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ExportJobsOperationResultClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ExportJobsOperationResultClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ExportJobsOperationResultClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExportJobsOperationResultClient) GetPreparer(ctx context.Context, resourceGroupName string, vaultName 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 = "2021-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.DataProtection/backupVaults/{vaultName}/backupJobs/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 ExportJobsOperationResultClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExportJobsOperationResultClient) GetResponder(resp *http.Response) (result ExportJobsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/jobs.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/jobs.go new file mode 100644 index 000000000000..5987ff1f44ac --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/jobs.go @@ -0,0 +1,227 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// JobsClient is the open API 2.0 Specs for Azure Data Protection service +type JobsClient struct { + BaseClient +} + +// NewJobsClient creates an instance of the JobsClient client. +func NewJobsClient(subscriptionID string) JobsClient { + return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewJobsClientWithBaseURI creates an instance of the JobsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient { + return JobsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a job with id in a backup vault +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// vaultName - the name of the backup vault. +// jobID - the Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +func (client JobsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, jobID string) (result AzureBackupJobResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.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, vaultName, jobID) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client JobsClient) GetPreparer(ctx context.Context, resourceGroupName string, vaultName string, jobID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobId": autorest.Encode("path", jobID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}", 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 JobsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client JobsClient) GetResponder(resp *http.Response) (result AzureBackupJobResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns list of jobs belonging to a backup vault +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// vaultName - the name of the backup vault. +func (client JobsClient) List(ctx context.Context, resourceGroupName string, vaultName string) (result AzureBackupJobResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.List") + defer func() { + sc := -1 + if result.abjrl.Response.Response != nil { + sc = result.abjrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.abjrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "List", resp, "Failure sending request") + return + } + + result.abjrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "List", resp, "Failure responding to request") + return + } + if result.abjrl.hasNextLink() && result.abjrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client JobsClient) ListPreparer(ctx context.Context, resourceGroupName string, vaultName 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 = "2021-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.DataProtection/backupVaults/{vaultName}/backupJobs", 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 JobsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client JobsClient) ListResponder(resp *http.Response) (result AzureBackupJobResourceList, err error) { + err = autorest.Respond( + resp, + 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 JobsClient) listNextResults(ctx context.Context, lastResults AzureBackupJobResourceList) (result AzureBackupJobResourceList, err error) { + req, err := lastResults.azureBackupJobResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.JobsClient", "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, "dataprotection.JobsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.JobsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client JobsClient) ListComplete(ctx context.Context, resourceGroupName string, vaultName string) (result AzureBackupJobResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.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, vaultName) + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/models.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/models.go new file mode 100644 index 000000000000..90f18e394f4c --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/models.go @@ -0,0 +1,6444 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/dataprotection/mgmt/2021-07-01/dataprotection" + +// AbsoluteDeleteOption delete option with duration +type AbsoluteDeleteOption struct { + // Duration - Duration of deletion after given timespan + Duration *string `json:"duration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicDeleteOptionObjectTypeDeleteOption', 'ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption' + ObjectType ObjectTypeBasicDeleteOption `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AbsoluteDeleteOption. +func (ado AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { + ado.ObjectType = ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption + objectMap := make(map[string]interface{}) + if ado.Duration != nil { + objectMap["duration"] = ado.Duration + } + if ado.ObjectType != "" { + objectMap["objectType"] = ado.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAbsoluteDeleteOption is the BasicDeleteOption implementation for AbsoluteDeleteOption. +func (ado AbsoluteDeleteOption) AsAbsoluteDeleteOption() (*AbsoluteDeleteOption, bool) { + return &ado, true +} + +// AsDeleteOption is the BasicDeleteOption implementation for AbsoluteDeleteOption. +func (ado AbsoluteDeleteOption) AsDeleteOption() (*DeleteOption, bool) { + return nil, false +} + +// AsBasicDeleteOption is the BasicDeleteOption implementation for AbsoluteDeleteOption. +func (ado AbsoluteDeleteOption) AsBasicDeleteOption() (BasicDeleteOption, bool) { + return &ado, true +} + +// AdHocBackupRuleOptions adhoc backup rules +type AdHocBackupRuleOptions struct { + RuleName *string `json:"ruleName,omitempty"` + TriggerOption *AdhocBackupTriggerOption `json:"triggerOption,omitempty"` +} + +// AdhocBackupTriggerOption adhoc backup trigger option +type AdhocBackupTriggerOption struct { + RetentionTagOverride *string `json:"retentionTagOverride,omitempty"` +} + +// AdhocBasedTaggingCriteria adhoc backup tagging criteria +type AdhocBasedTaggingCriteria struct { + // TagInfo - Retention tag information + TagInfo *RetentionTag `json:"tagInfo,omitempty"` +} + +// AdhocBasedTriggerContext adhoc trigger context +type AdhocBasedTriggerContext struct { + // TaggingCriteria - Tagging Criteria containing retention tag for adhoc backup. + TaggingCriteria *AdhocBasedTaggingCriteria `json:"taggingCriteria,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicTriggerContextObjectTypeTriggerContext', 'ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext', 'ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext' + ObjectType ObjectTypeBasicTriggerContext `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AdhocBasedTriggerContext. +func (abtc AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { + abtc.ObjectType = ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext + objectMap := make(map[string]interface{}) + if abtc.TaggingCriteria != nil { + objectMap["taggingCriteria"] = abtc.TaggingCriteria + } + if abtc.ObjectType != "" { + objectMap["objectType"] = abtc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAdhocBasedTriggerContext is the BasicTriggerContext implementation for AdhocBasedTriggerContext. +func (abtc AdhocBasedTriggerContext) AsAdhocBasedTriggerContext() (*AdhocBasedTriggerContext, bool) { + return &abtc, true +} + +// AsScheduleBasedTriggerContext is the BasicTriggerContext implementation for AdhocBasedTriggerContext. +func (abtc AdhocBasedTriggerContext) AsScheduleBasedTriggerContext() (*ScheduleBasedTriggerContext, bool) { + return nil, false +} + +// AsTriggerContext is the BasicTriggerContext implementation for AdhocBasedTriggerContext. +func (abtc AdhocBasedTriggerContext) AsTriggerContext() (*TriggerContext, bool) { + return nil, false +} + +// AsBasicTriggerContext is the BasicTriggerContext implementation for AdhocBasedTriggerContext. +func (abtc AdhocBasedTriggerContext) AsBasicTriggerContext() (BasicTriggerContext, bool) { + return &abtc, true +} + +// BasicAuthCredentials base class for different types of authentication credentials. +type BasicAuthCredentials interface { + AsSecretStoreBasedAuthCredentials() (*SecretStoreBasedAuthCredentials, bool) + AsAuthCredentials() (*AuthCredentials, bool) +} + +// AuthCredentials base class for different types of authentication credentials. +type AuthCredentials struct { + // ObjectType - Possible values include: 'ObjectTypeAuthCredentials', 'ObjectTypeSecretStoreBasedAuthCredentials' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +func unmarshalBasicAuthCredentials(body []byte) (BasicAuthCredentials, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeSecretStoreBasedAuthCredentials): + var ssbac SecretStoreBasedAuthCredentials + err := json.Unmarshal(body, &ssbac) + return ssbac, err + default: + var ac AuthCredentials + err := json.Unmarshal(body, &ac) + return ac, err + } +} +func unmarshalBasicAuthCredentialsArray(body []byte) ([]BasicAuthCredentials, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + acArray := make([]BasicAuthCredentials, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ac, err := unmarshalBasicAuthCredentials(*rawMessage) + if err != nil { + return nil, err + } + acArray[index] = ac + } + return acArray, nil +} + +// MarshalJSON is the custom marshaler for AuthCredentials. +func (ac AuthCredentials) MarshalJSON() ([]byte, error) { + ac.ObjectType = ObjectTypeAuthCredentials + objectMap := make(map[string]interface{}) + if ac.ObjectType != "" { + objectMap["objectType"] = ac.ObjectType + } + return json.Marshal(objectMap) +} + +// AsSecretStoreBasedAuthCredentials is the BasicAuthCredentials implementation for AuthCredentials. +func (ac AuthCredentials) AsSecretStoreBasedAuthCredentials() (*SecretStoreBasedAuthCredentials, bool) { + return nil, false +} + +// AsAuthCredentials is the BasicAuthCredentials implementation for AuthCredentials. +func (ac AuthCredentials) AsAuthCredentials() (*AuthCredentials, bool) { + return &ac, true +} + +// AsBasicAuthCredentials is the BasicAuthCredentials implementation for AuthCredentials. +func (ac AuthCredentials) AsBasicAuthCredentials() (BasicAuthCredentials, bool) { + return &ac, true +} + +// AzureBackupDiscreteRecoveryPoint azure backup discrete RecoveryPoint +type AzureBackupDiscreteRecoveryPoint struct { + FriendlyName *string `json:"friendlyName,omitempty"` + RecoveryPointDataStoresDetails *[]RecoveryPointDataStoreDetails `json:"recoveryPointDataStoresDetails,omitempty"` + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + PolicyVersion *string `json:"policyVersion,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + RetentionTagName *string `json:"retentionTagName,omitempty"` + RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint', 'ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint' + ObjectType ObjectTypeBasicAzureBackupRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupDiscreteRecoveryPoint. +func (abdrp AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { + abdrp.ObjectType = ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint + objectMap := make(map[string]interface{}) + if abdrp.FriendlyName != nil { + objectMap["friendlyName"] = abdrp.FriendlyName + } + if abdrp.RecoveryPointDataStoresDetails != nil { + objectMap["recoveryPointDataStoresDetails"] = abdrp.RecoveryPointDataStoresDetails + } + if abdrp.RecoveryPointTime != nil { + objectMap["recoveryPointTime"] = abdrp.RecoveryPointTime + } + if abdrp.PolicyName != nil { + objectMap["policyName"] = abdrp.PolicyName + } + if abdrp.PolicyVersion != nil { + objectMap["policyVersion"] = abdrp.PolicyVersion + } + if abdrp.RecoveryPointID != nil { + objectMap["recoveryPointId"] = abdrp.RecoveryPointID + } + if abdrp.RecoveryPointType != nil { + objectMap["recoveryPointType"] = abdrp.RecoveryPointType + } + if abdrp.RetentionTagName != nil { + objectMap["retentionTagName"] = abdrp.RetentionTagName + } + if abdrp.RetentionTagVersion != nil { + objectMap["retentionTagVersion"] = abdrp.RetentionTagVersion + } + if abdrp.ObjectType != "" { + objectMap["objectType"] = abdrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupDiscreteRecoveryPoint is the BasicAzureBackupRecoveryPoint implementation for AzureBackupDiscreteRecoveryPoint. +func (abdrp AzureBackupDiscreteRecoveryPoint) AsAzureBackupDiscreteRecoveryPoint() (*AzureBackupDiscreteRecoveryPoint, bool) { + return &abdrp, true +} + +// AsAzureBackupRecoveryPoint is the BasicAzureBackupRecoveryPoint implementation for AzureBackupDiscreteRecoveryPoint. +func (abdrp AzureBackupDiscreteRecoveryPoint) AsAzureBackupRecoveryPoint() (*AzureBackupRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureBackupRecoveryPoint is the BasicAzureBackupRecoveryPoint implementation for AzureBackupDiscreteRecoveryPoint. +func (abdrp AzureBackupDiscreteRecoveryPoint) AsBasicAzureBackupRecoveryPoint() (BasicAzureBackupRecoveryPoint, bool) { + return &abdrp, true +} + +// AzureBackupFindRestorableTimeRangesRequest list Restore Ranges Request +type AzureBackupFindRestorableTimeRangesRequest struct { + // SourceDataStoreType - Gets or sets the type of the source data store. Possible values include: 'RestoreSourceDataStoreTypeOperationalStore', 'RestoreSourceDataStoreTypeVaultStore', 'RestoreSourceDataStoreTypeArchiveStore' + SourceDataStoreType RestoreSourceDataStoreType `json:"sourceDataStoreType,omitempty"` + // StartTime - Start time for the List Restore Ranges request. ISO 8601 format. + StartTime *string `json:"startTime,omitempty"` + // EndTime - End time for the List Restore Ranges request. ISO 8601 format. + EndTime *string `json:"endTime,omitempty"` +} + +// AzureBackupFindRestorableTimeRangesRequestResource list Restore Ranges Request +type AzureBackupFindRestorableTimeRangesRequestResource struct { + // Content - AzureBackupFindRestorableTimeRangesRequestResource content + Content *AzureBackupFindRestorableTimeRangesRequest `json:"content,omitempty"` + SubscriptionID *string `json:"subscriptionId,omitempty"` + URI *string `json:"uri,omitempty"` + Headers map[string][]string `json:"headers"` + SupportedGroupVersions *[]string `json:"supportedGroupVersions,omitempty"` + CultureInfo *string `json:"cultureInfo,omitempty"` + Parameters map[string]*string `json:"parameters"` + HTTPMethod *string `json:"httpMethod,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupFindRestorableTimeRangesRequestResource. +func (abfrtrrr AzureBackupFindRestorableTimeRangesRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if abfrtrrr.Content != nil { + objectMap["content"] = abfrtrrr.Content + } + if abfrtrrr.SubscriptionID != nil { + objectMap["subscriptionId"] = abfrtrrr.SubscriptionID + } + if abfrtrrr.URI != nil { + objectMap["uri"] = abfrtrrr.URI + } + if abfrtrrr.Headers != nil { + objectMap["headers"] = abfrtrrr.Headers + } + if abfrtrrr.SupportedGroupVersions != nil { + objectMap["supportedGroupVersions"] = abfrtrrr.SupportedGroupVersions + } + if abfrtrrr.CultureInfo != nil { + objectMap["cultureInfo"] = abfrtrrr.CultureInfo + } + if abfrtrrr.Parameters != nil { + objectMap["parameters"] = abfrtrrr.Parameters + } + if abfrtrrr.HTTPMethod != nil { + objectMap["httpMethod"] = abfrtrrr.HTTPMethod + } + return json.Marshal(objectMap) +} + +// AzureBackupFindRestorableTimeRangesResponse list Restore Ranges Response +type AzureBackupFindRestorableTimeRangesResponse struct { + // RestorableTimeRanges - Returns the Restore Ranges available on the Backup Instance. + RestorableTimeRanges *[]RestorableTimeRange `json:"restorableTimeRanges,omitempty"` + ObjectType *string `json:"objectType,omitempty"` +} + +// AzureBackupFindRestorableTimeRangesResponseResource list Restore Ranges Response +type AzureBackupFindRestorableTimeRangesResponseResource struct { + autorest.Response `json:"-"` + // Properties - AzureBackupFindRestorableTimeRangesResponseResource properties + Properties *AzureBackupFindRestorableTimeRangesResponse `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"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupFindRestorableTimeRangesResponseResource. +func (abfrtrrr AzureBackupFindRestorableTimeRangesResponseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if abfrtrrr.Properties != nil { + objectMap["properties"] = abfrtrrr.Properties + } + if abfrtrrr.SystemData != nil { + objectMap["systemData"] = abfrtrrr.SystemData + } + return json.Marshal(objectMap) +} + +// AzureBackupJob azureBackup Job Class +type AzureBackupJob struct { + // ActivityID - Job Activity Id + ActivityID *string `json:"activityID,omitempty"` + // BackupInstanceFriendlyName - Name of the Backup Instance + BackupInstanceFriendlyName *string `json:"backupInstanceFriendlyName,omitempty"` + // BackupInstanceID - READ-ONLY; ARM ID of the Backup Instance + BackupInstanceID *string `json:"backupInstanceId,omitempty"` + // DataSourceID - ARM ID of the DataSource + DataSourceID *string `json:"dataSourceId,omitempty"` + // DataSourceLocation - Location of the DataSource + DataSourceLocation *string `json:"dataSourceLocation,omitempty"` + // DataSourceName - User Friendly Name of the DataSource + DataSourceName *string `json:"dataSourceName,omitempty"` + // DataSourceSetName - Data Source Set Name of the DataSource + DataSourceSetName *string `json:"dataSourceSetName,omitempty"` + // DataSourceType - Type of DataSource + DataSourceType *string `json:"dataSourceType,omitempty"` + // Duration - Total run time of the job. ISO 8601 format. + Duration *string `json:"duration,omitempty"` + // EndTime - READ-ONLY; EndTime of the job(in UTC) + EndTime *date.Time `json:"endTime,omitempty"` + // ErrorDetails - READ-ONLY; A List, detailing the errors related to the job + ErrorDetails *[]UserFacingError `json:"errorDetails,omitempty"` + // ExtendedInfo - READ-ONLY; Extended Information about the job + ExtendedInfo *JobExtendedInfo `json:"extendedInfo,omitempty"` + // IsUserTriggered - Indicated that whether the job is adhoc(true) or scheduled(false) + IsUserTriggered *bool `json:"isUserTriggered,omitempty"` + // Operation - It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure + Operation *string `json:"operation,omitempty"` + // OperationCategory - It indicates the type of Job i.e. Backup/Restore/Tiering/Management + OperationCategory *string `json:"operationCategory,omitempty"` + // PolicyID - READ-ONLY; ARM ID of the policy + PolicyID *string `json:"policyId,omitempty"` + // PolicyName - READ-ONLY; Name of the policy + PolicyName *string `json:"policyName,omitempty"` + // ProgressEnabled - Indicated whether progress is enabled for the job + ProgressEnabled *bool `json:"progressEnabled,omitempty"` + // ProgressURL - READ-ONLY; Url which contains job's progress + ProgressURL *string `json:"progressUrl,omitempty"` + // RestoreType - READ-ONLY; It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR + RestoreType *string `json:"restoreType,omitempty"` + // SourceResourceGroup - Resource Group Name of the Datasource + SourceResourceGroup *string `json:"sourceResourceGroup,omitempty"` + // SourceSubscriptionID - SubscriptionId corresponding to the DataSource + SourceSubscriptionID *string `json:"sourceSubscriptionID,omitempty"` + // StartTime - StartTime of the job(in UTC) + StartTime *date.Time `json:"startTime,omitempty"` + // Status - Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning + Status *string `json:"status,omitempty"` + // SubscriptionID - Subscription Id of the corresponding backup vault + SubscriptionID *string `json:"subscriptionId,omitempty"` + // SupportedActions - List of supported actions + SupportedActions *[]string `json:"supportedActions,omitempty"` + // VaultName - Name of the vault + VaultName *string `json:"vaultName,omitempty"` + Etag *string `json:"etag,omitempty"` + SourceDataStoreName *string `json:"sourceDataStoreName,omitempty"` + DestinationDataStoreName *string `json:"destinationDataStoreName,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupJob. +func (abj AzureBackupJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if abj.ActivityID != nil { + objectMap["activityID"] = abj.ActivityID + } + if abj.BackupInstanceFriendlyName != nil { + objectMap["backupInstanceFriendlyName"] = abj.BackupInstanceFriendlyName + } + if abj.DataSourceID != nil { + objectMap["dataSourceId"] = abj.DataSourceID + } + if abj.DataSourceLocation != nil { + objectMap["dataSourceLocation"] = abj.DataSourceLocation + } + if abj.DataSourceName != nil { + objectMap["dataSourceName"] = abj.DataSourceName + } + if abj.DataSourceSetName != nil { + objectMap["dataSourceSetName"] = abj.DataSourceSetName + } + if abj.DataSourceType != nil { + objectMap["dataSourceType"] = abj.DataSourceType + } + if abj.Duration != nil { + objectMap["duration"] = abj.Duration + } + if abj.IsUserTriggered != nil { + objectMap["isUserTriggered"] = abj.IsUserTriggered + } + if abj.Operation != nil { + objectMap["operation"] = abj.Operation + } + if abj.OperationCategory != nil { + objectMap["operationCategory"] = abj.OperationCategory + } + if abj.ProgressEnabled != nil { + objectMap["progressEnabled"] = abj.ProgressEnabled + } + if abj.SourceResourceGroup != nil { + objectMap["sourceResourceGroup"] = abj.SourceResourceGroup + } + if abj.SourceSubscriptionID != nil { + objectMap["sourceSubscriptionID"] = abj.SourceSubscriptionID + } + if abj.StartTime != nil { + objectMap["startTime"] = abj.StartTime + } + if abj.Status != nil { + objectMap["status"] = abj.Status + } + if abj.SubscriptionID != nil { + objectMap["subscriptionId"] = abj.SubscriptionID + } + if abj.SupportedActions != nil { + objectMap["supportedActions"] = abj.SupportedActions + } + if abj.VaultName != nil { + objectMap["vaultName"] = abj.VaultName + } + if abj.Etag != nil { + objectMap["etag"] = abj.Etag + } + if abj.SourceDataStoreName != nil { + objectMap["sourceDataStoreName"] = abj.SourceDataStoreName + } + if abj.DestinationDataStoreName != nil { + objectMap["destinationDataStoreName"] = abj.DestinationDataStoreName + } + return json.Marshal(objectMap) +} + +// AzureBackupJobResource azureBackup Job Resource Class +type AzureBackupJobResource struct { + autorest.Response `json:"-"` + // Properties - AzureBackupJobResource properties + Properties *AzureBackupJob `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"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupJobResource. +func (abjr AzureBackupJobResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if abjr.Properties != nil { + objectMap["properties"] = abjr.Properties + } + if abjr.SystemData != nil { + objectMap["systemData"] = abjr.SystemData + } + return json.Marshal(objectMap) +} + +// AzureBackupJobResourceList list of AzureBackup Job resources +type AzureBackupJobResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]AzureBackupJobResource `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"` +} + +// AzureBackupJobResourceListIterator provides access to a complete listing of AzureBackupJobResource +// values. +type AzureBackupJobResourceListIterator struct { + i int + page AzureBackupJobResourceListPage +} + +// 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 *AzureBackupJobResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureBackupJobResourceListIterator.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 *AzureBackupJobResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AzureBackupJobResourceListIterator) 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 AzureBackupJobResourceListIterator) Response() AzureBackupJobResourceList { + 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 AzureBackupJobResourceListIterator) Value() AzureBackupJobResource { + if !iter.page.NotDone() { + return AzureBackupJobResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AzureBackupJobResourceListIterator type. +func NewAzureBackupJobResourceListIterator(page AzureBackupJobResourceListPage) AzureBackupJobResourceListIterator { + return AzureBackupJobResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (abjrl AzureBackupJobResourceList) IsEmpty() bool { + return abjrl.Value == nil || len(*abjrl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (abjrl AzureBackupJobResourceList) hasNextLink() bool { + return abjrl.NextLink != nil && len(*abjrl.NextLink) != 0 +} + +// azureBackupJobResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (abjrl AzureBackupJobResourceList) azureBackupJobResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !abjrl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(abjrl.NextLink))) +} + +// AzureBackupJobResourceListPage contains a page of AzureBackupJobResource values. +type AzureBackupJobResourceListPage struct { + fn func(context.Context, AzureBackupJobResourceList) (AzureBackupJobResourceList, error) + abjrl AzureBackupJobResourceList +} + +// 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 *AzureBackupJobResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureBackupJobResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.abjrl) + if err != nil { + return err + } + page.abjrl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AzureBackupJobResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AzureBackupJobResourceListPage) NotDone() bool { + return !page.abjrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AzureBackupJobResourceListPage) Response() AzureBackupJobResourceList { + return page.abjrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AzureBackupJobResourceListPage) Values() []AzureBackupJobResource { + if page.abjrl.IsEmpty() { + return nil + } + return *page.abjrl.Value +} + +// Creates a new instance of the AzureBackupJobResourceListPage type. +func NewAzureBackupJobResourceListPage(cur AzureBackupJobResourceList, getNextPage func(context.Context, AzureBackupJobResourceList) (AzureBackupJobResourceList, error)) AzureBackupJobResourceListPage { + return AzureBackupJobResourceListPage{ + fn: getNextPage, + abjrl: cur, + } +} + +// AzureBackupParams azure backup parameters +type AzureBackupParams struct { + // BackupType - BackupType ; Full/Incremental etc + BackupType *string `json:"backupType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBackupParametersObjectTypeBackupParameters', 'ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams' + ObjectType ObjectTypeBasicBackupParameters `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupParams. +func (abp AzureBackupParams) MarshalJSON() ([]byte, error) { + abp.ObjectType = ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams + objectMap := make(map[string]interface{}) + if abp.BackupType != nil { + objectMap["backupType"] = abp.BackupType + } + if abp.ObjectType != "" { + objectMap["objectType"] = abp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupParams is the BasicBackupParameters implementation for AzureBackupParams. +func (abp AzureBackupParams) AsAzureBackupParams() (*AzureBackupParams, bool) { + return &abp, true +} + +// AsBackupParameters is the BasicBackupParameters implementation for AzureBackupParams. +func (abp AzureBackupParams) AsBackupParameters() (*BackupParameters, bool) { + return nil, false +} + +// AsBasicBackupParameters is the BasicBackupParameters implementation for AzureBackupParams. +func (abp AzureBackupParams) AsBasicBackupParameters() (BasicBackupParameters, bool) { + return &abp, true +} + +// BasicAzureBackupRecoveryPoint azure backup recoveryPoint +type BasicAzureBackupRecoveryPoint interface { + AsAzureBackupDiscreteRecoveryPoint() (*AzureBackupDiscreteRecoveryPoint, bool) + AsAzureBackupRecoveryPoint() (*AzureBackupRecoveryPoint, bool) +} + +// AzureBackupRecoveryPoint azure backup recoveryPoint +type AzureBackupRecoveryPoint struct { + // ObjectType - Possible values include: 'ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint', 'ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint' + ObjectType ObjectTypeBasicAzureBackupRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureBackupRecoveryPoint(body []byte) (BasicAzureBackupRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupDiscreteRecoveryPoint): + var abdrp AzureBackupDiscreteRecoveryPoint + err := json.Unmarshal(body, &abdrp) + return abdrp, err + default: + var abrp AzureBackupRecoveryPoint + err := json.Unmarshal(body, &abrp) + return abrp, err + } +} +func unmarshalBasicAzureBackupRecoveryPointArray(body []byte) ([]BasicAzureBackupRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + abrpArray := make([]BasicAzureBackupRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + abrp, err := unmarshalBasicAzureBackupRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + abrpArray[index] = abrp + } + return abrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureBackupRecoveryPoint. +func (abrp AzureBackupRecoveryPoint) MarshalJSON() ([]byte, error) { + abrp.ObjectType = ObjectTypeBasicAzureBackupRecoveryPointObjectTypeAzureBackupRecoveryPoint + objectMap := make(map[string]interface{}) + if abrp.ObjectType != "" { + objectMap["objectType"] = abrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupDiscreteRecoveryPoint is the BasicAzureBackupRecoveryPoint implementation for AzureBackupRecoveryPoint. +func (abrp AzureBackupRecoveryPoint) AsAzureBackupDiscreteRecoveryPoint() (*AzureBackupDiscreteRecoveryPoint, bool) { + return nil, false +} + +// AsAzureBackupRecoveryPoint is the BasicAzureBackupRecoveryPoint implementation for AzureBackupRecoveryPoint. +func (abrp AzureBackupRecoveryPoint) AsAzureBackupRecoveryPoint() (*AzureBackupRecoveryPoint, bool) { + return &abrp, true +} + +// AsBasicAzureBackupRecoveryPoint is the BasicAzureBackupRecoveryPoint implementation for AzureBackupRecoveryPoint. +func (abrp AzureBackupRecoveryPoint) AsBasicAzureBackupRecoveryPoint() (BasicAzureBackupRecoveryPoint, bool) { + return &abrp, true +} + +// BasicAzureBackupRecoveryPointBasedRestoreRequest azure backup recoveryPoint based restore request +type BasicAzureBackupRecoveryPointBasedRestoreRequest interface { + AsAzureBackupRestoreWithRehydrationRequest() (*AzureBackupRestoreWithRehydrationRequest, bool) + AsAzureBackupRecoveryPointBasedRestoreRequest() (*AzureBackupRecoveryPointBasedRestoreRequest, bool) +} + +// AzureBackupRecoveryPointBasedRestoreRequest azure backup recoveryPoint based restore request +type AzureBackupRecoveryPointBasedRestoreRequest struct { + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // RestoreTargetInfo - Gets or sets the restore target information. + RestoreTargetInfo BasicRestoreTargetInfoBase `json:"restoreTargetInfo,omitempty"` + // SourceDataStoreType - Gets or sets the type of the source data store. Possible values include: 'SourceDataStoreTypeArchiveStore', 'SourceDataStoreTypeSnapshotStore', 'SourceDataStoreTypeVaultStore' + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest' + ObjectType ObjectTypeBasicAzureBackupRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureBackupRecoveryPointBasedRestoreRequest(body []byte) (BasicAzureBackupRecoveryPointBasedRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest): + var abrwrr AzureBackupRestoreWithRehydrationRequest + err := json.Unmarshal(body, &abrwrr) + return abrwrr, err + default: + var abrpbrr AzureBackupRecoveryPointBasedRestoreRequest + err := json.Unmarshal(body, &abrpbrr) + return abrpbrr, err + } +} +func unmarshalBasicAzureBackupRecoveryPointBasedRestoreRequestArray(body []byte) ([]BasicAzureBackupRecoveryPointBasedRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + abrpbrrArray := make([]BasicAzureBackupRecoveryPointBasedRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + abrpbrr, err := unmarshalBasicAzureBackupRecoveryPointBasedRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + abrpbrrArray[index] = abrpbrr + } + return abrpbrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { + abrpbrr.ObjectType = ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest + objectMap := make(map[string]interface{}) + if abrpbrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = abrpbrr.RecoveryPointID + } + objectMap["restoreTargetInfo"] = abrpbrr.RestoreTargetInfo + if abrpbrr.SourceDataStoreType != "" { + objectMap["sourceDataStoreType"] = abrpbrr.SourceDataStoreType + } + if abrpbrr.ObjectType != "" { + objectMap["objectType"] = abrpbrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) AsAzureBackupRecoveryPointBasedRestoreRequest() (*AzureBackupRecoveryPointBasedRestoreRequest, bool) { + return &abrpbrr, true +} + +// AsBasicAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) AsBasicAzureBackupRecoveryPointBasedRestoreRequest() (BasicAzureBackupRecoveryPointBasedRestoreRequest, bool) { + return &abrpbrr, true +} + +// AsAzureBackupRestoreWithRehydrationRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) AsAzureBackupRestoreWithRehydrationRequest() (*AzureBackupRestoreWithRehydrationRequest, bool) { + return nil, false +} + +// AsAzureBackupRecoveryTimeBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) AsAzureBackupRecoveryTimeBasedRestoreRequest() (*AzureBackupRecoveryTimeBasedRestoreRequest, bool) { + return nil, false +} + +// AsAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) AsAzureBackupRestoreRequest() (*AzureBackupRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryPointBasedRestoreRequest. +func (abrpbrr AzureBackupRecoveryPointBasedRestoreRequest) AsBasicAzureBackupRestoreRequest() (BasicAzureBackupRestoreRequest, bool) { + return &abrpbrr, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureBackupRecoveryPointBasedRestoreRequest struct. +func (abrpbrr *AzureBackupRecoveryPointBasedRestoreRequest) 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 + } + abrpbrr.RecoveryPointID = &recoveryPointID + } + case "restoreTargetInfo": + if v != nil { + restoreTargetInfo, err := unmarshalBasicRestoreTargetInfoBase(*v) + if err != nil { + return err + } + abrpbrr.RestoreTargetInfo = restoreTargetInfo + } + case "sourceDataStoreType": + if v != nil { + var sourceDataStoreType SourceDataStoreType + err = json.Unmarshal(*v, &sourceDataStoreType) + if err != nil { + return err + } + abrpbrr.SourceDataStoreType = sourceDataStoreType + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicAzureBackupRestoreRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + abrpbrr.ObjectType = objectType + } + } + } + + return nil +} + +// AzureBackupRecoveryPointResource azure backup recoveryPoint resource +type AzureBackupRecoveryPointResource struct { + autorest.Response `json:"-"` + // Properties - AzureBackupRecoveryPointResource properties + Properties BasicAzureBackupRecoveryPoint `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"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupRecoveryPointResource. +func (abrpr AzureBackupRecoveryPointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = abrpr.Properties + if abrpr.SystemData != nil { + objectMap["systemData"] = abrpr.SystemData + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureBackupRecoveryPointResource struct. +func (abrpr *AzureBackupRecoveryPointResource) 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 := unmarshalBasicAzureBackupRecoveryPoint(*v) + if err != nil { + return err + } + abrpr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + abrpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + abrpr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + abrpr.Type = &typeVar + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + abrpr.SystemData = &systemData + } + } + } + + return nil +} + +// AzureBackupRecoveryPointResourceList azure backup recoveryPoint resource list +type AzureBackupRecoveryPointResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]AzureBackupRecoveryPointResource `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"` +} + +// AzureBackupRecoveryPointResourceListIterator provides access to a complete listing of +// AzureBackupRecoveryPointResource values. +type AzureBackupRecoveryPointResourceListIterator struct { + i int + page AzureBackupRecoveryPointResourceListPage +} + +// 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 *AzureBackupRecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureBackupRecoveryPointResourceListIterator.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 *AzureBackupRecoveryPointResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AzureBackupRecoveryPointResourceListIterator) 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 AzureBackupRecoveryPointResourceListIterator) Response() AzureBackupRecoveryPointResourceList { + 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 AzureBackupRecoveryPointResourceListIterator) Value() AzureBackupRecoveryPointResource { + if !iter.page.NotDone() { + return AzureBackupRecoveryPointResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AzureBackupRecoveryPointResourceListIterator type. +func NewAzureBackupRecoveryPointResourceListIterator(page AzureBackupRecoveryPointResourceListPage) AzureBackupRecoveryPointResourceListIterator { + return AzureBackupRecoveryPointResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (abrprl AzureBackupRecoveryPointResourceList) IsEmpty() bool { + return abrprl.Value == nil || len(*abrprl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (abrprl AzureBackupRecoveryPointResourceList) hasNextLink() bool { + return abrprl.NextLink != nil && len(*abrprl.NextLink) != 0 +} + +// azureBackupRecoveryPointResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (abrprl AzureBackupRecoveryPointResourceList) azureBackupRecoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !abrprl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(abrprl.NextLink))) +} + +// AzureBackupRecoveryPointResourceListPage contains a page of AzureBackupRecoveryPointResource values. +type AzureBackupRecoveryPointResourceListPage struct { + fn func(context.Context, AzureBackupRecoveryPointResourceList) (AzureBackupRecoveryPointResourceList, error) + abrprl AzureBackupRecoveryPointResourceList +} + +// 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 *AzureBackupRecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureBackupRecoveryPointResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.abrprl) + if err != nil { + return err + } + page.abrprl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AzureBackupRecoveryPointResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AzureBackupRecoveryPointResourceListPage) NotDone() bool { + return !page.abrprl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AzureBackupRecoveryPointResourceListPage) Response() AzureBackupRecoveryPointResourceList { + return page.abrprl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AzureBackupRecoveryPointResourceListPage) Values() []AzureBackupRecoveryPointResource { + if page.abrprl.IsEmpty() { + return nil + } + return *page.abrprl.Value +} + +// Creates a new instance of the AzureBackupRecoveryPointResourceListPage type. +func NewAzureBackupRecoveryPointResourceListPage(cur AzureBackupRecoveryPointResourceList, getNextPage func(context.Context, AzureBackupRecoveryPointResourceList) (AzureBackupRecoveryPointResourceList, error)) AzureBackupRecoveryPointResourceListPage { + return AzureBackupRecoveryPointResourceListPage{ + fn: getNextPage, + abrprl: cur, + } +} + +// AzureBackupRecoveryTimeBasedRestoreRequest azureBackup RecoveryPointTime Based Restore Request +type AzureBackupRecoveryTimeBasedRestoreRequest struct { + // RecoveryPointTime - The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z. + RecoveryPointTime *string `json:"recoveryPointTime,omitempty"` + // RestoreTargetInfo - Gets or sets the restore target information. + RestoreTargetInfo BasicRestoreTargetInfoBase `json:"restoreTargetInfo,omitempty"` + // SourceDataStoreType - Gets or sets the type of the source data store. Possible values include: 'SourceDataStoreTypeArchiveStore', 'SourceDataStoreTypeSnapshotStore', 'SourceDataStoreTypeVaultStore' + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest' + ObjectType ObjectTypeBasicAzureBackupRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { + abrtbrr.ObjectType = ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest + objectMap := make(map[string]interface{}) + if abrtbrr.RecoveryPointTime != nil { + objectMap["recoveryPointTime"] = abrtbrr.RecoveryPointTime + } + objectMap["restoreTargetInfo"] = abrtbrr.RestoreTargetInfo + if abrtbrr.SourceDataStoreType != "" { + objectMap["sourceDataStoreType"] = abrtbrr.SourceDataStoreType + } + if abrtbrr.ObjectType != "" { + objectMap["objectType"] = abrtbrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) AsAzureBackupRecoveryPointBasedRestoreRequest() (*AzureBackupRecoveryPointBasedRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) AsBasicAzureBackupRecoveryPointBasedRestoreRequest() (BasicAzureBackupRecoveryPointBasedRestoreRequest, bool) { + return nil, false +} + +// AsAzureBackupRestoreWithRehydrationRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) AsAzureBackupRestoreWithRehydrationRequest() (*AzureBackupRestoreWithRehydrationRequest, bool) { + return nil, false +} + +// AsAzureBackupRecoveryTimeBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) AsAzureBackupRecoveryTimeBasedRestoreRequest() (*AzureBackupRecoveryTimeBasedRestoreRequest, bool) { + return &abrtbrr, true +} + +// AsAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) AsAzureBackupRestoreRequest() (*AzureBackupRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRecoveryTimeBasedRestoreRequest. +func (abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest) AsBasicAzureBackupRestoreRequest() (BasicAzureBackupRestoreRequest, bool) { + return &abrtbrr, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureBackupRecoveryTimeBasedRestoreRequest struct. +func (abrtbrr *AzureBackupRecoveryTimeBasedRestoreRequest) 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 string + err = json.Unmarshal(*v, &recoveryPointTime) + if err != nil { + return err + } + abrtbrr.RecoveryPointTime = &recoveryPointTime + } + case "restoreTargetInfo": + if v != nil { + restoreTargetInfo, err := unmarshalBasicRestoreTargetInfoBase(*v) + if err != nil { + return err + } + abrtbrr.RestoreTargetInfo = restoreTargetInfo + } + case "sourceDataStoreType": + if v != nil { + var sourceDataStoreType SourceDataStoreType + err = json.Unmarshal(*v, &sourceDataStoreType) + if err != nil { + return err + } + abrtbrr.SourceDataStoreType = sourceDataStoreType + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicAzureBackupRestoreRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + abrtbrr.ObjectType = objectType + } + } + } + + return nil +} + +// AzureBackupRehydrationRequest azure Backup Rehydrate Request +type AzureBackupRehydrationRequest struct { + // RecoveryPointID - Id of the recovery point to be recovered + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // RehydrationPriority - Priority to be used for rehydration. Values High or Standard. Possible values include: 'RehydrationPriorityInvalid', 'RehydrationPriorityHigh', 'RehydrationPriorityStandard' + RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"` + // RehydrationRetentionDuration - Retention duration in ISO 8601 format i.e P10D . + RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"` +} + +// BasicAzureBackupRestoreRequest azure backup restore request +type BasicAzureBackupRestoreRequest interface { + AsAzureBackupRecoveryPointBasedRestoreRequest() (*AzureBackupRecoveryPointBasedRestoreRequest, bool) + AsBasicAzureBackupRecoveryPointBasedRestoreRequest() (BasicAzureBackupRecoveryPointBasedRestoreRequest, bool) + AsAzureBackupRestoreWithRehydrationRequest() (*AzureBackupRestoreWithRehydrationRequest, bool) + AsAzureBackupRecoveryTimeBasedRestoreRequest() (*AzureBackupRecoveryTimeBasedRestoreRequest, bool) + AsAzureBackupRestoreRequest() (*AzureBackupRestoreRequest, bool) +} + +// AzureBackupRestoreRequest azure backup restore request +type AzureBackupRestoreRequest struct { + // RestoreTargetInfo - Gets or sets the restore target information. + RestoreTargetInfo BasicRestoreTargetInfoBase `json:"restoreTargetInfo,omitempty"` + // SourceDataStoreType - Gets or sets the type of the source data store. Possible values include: 'SourceDataStoreTypeArchiveStore', 'SourceDataStoreTypeSnapshotStore', 'SourceDataStoreTypeVaultStore' + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest' + ObjectType ObjectTypeBasicAzureBackupRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureBackupRestoreRequest(body []byte) (BasicAzureBackupRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest): + var abrpbrr AzureBackupRecoveryPointBasedRestoreRequest + err := json.Unmarshal(body, &abrpbrr) + return abrpbrr, err + case string(ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest): + var abrwrr AzureBackupRestoreWithRehydrationRequest + err := json.Unmarshal(body, &abrwrr) + return abrwrr, err + case string(ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest): + var abrtbrr AzureBackupRecoveryTimeBasedRestoreRequest + err := json.Unmarshal(body, &abrtbrr) + return abrtbrr, err + default: + var abrr AzureBackupRestoreRequest + err := json.Unmarshal(body, &abrr) + return abrr, err + } +} +func unmarshalBasicAzureBackupRestoreRequestArray(body []byte) ([]BasicAzureBackupRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + abrrArray := make([]BasicAzureBackupRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + abrr, err := unmarshalBasicAzureBackupRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + abrrArray[index] = abrr + } + return abrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) MarshalJSON() ([]byte, error) { + abrr.ObjectType = ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest + objectMap := make(map[string]interface{}) + objectMap["restoreTargetInfo"] = abrr.RestoreTargetInfo + if abrr.SourceDataStoreType != "" { + objectMap["sourceDataStoreType"] = abrr.SourceDataStoreType + } + if abrr.ObjectType != "" { + objectMap["objectType"] = abrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) AsAzureBackupRecoveryPointBasedRestoreRequest() (*AzureBackupRecoveryPointBasedRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) AsBasicAzureBackupRecoveryPointBasedRestoreRequest() (BasicAzureBackupRecoveryPointBasedRestoreRequest, bool) { + return nil, false +} + +// AsAzureBackupRestoreWithRehydrationRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) AsAzureBackupRestoreWithRehydrationRequest() (*AzureBackupRestoreWithRehydrationRequest, bool) { + return nil, false +} + +// AsAzureBackupRecoveryTimeBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) AsAzureBackupRecoveryTimeBasedRestoreRequest() (*AzureBackupRecoveryTimeBasedRestoreRequest, bool) { + return nil, false +} + +// AsAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) AsAzureBackupRestoreRequest() (*AzureBackupRestoreRequest, bool) { + return &abrr, true +} + +// AsBasicAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreRequest. +func (abrr AzureBackupRestoreRequest) AsBasicAzureBackupRestoreRequest() (BasicAzureBackupRestoreRequest, bool) { + return &abrr, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureBackupRestoreRequest struct. +func (abrr *AzureBackupRestoreRequest) 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 "restoreTargetInfo": + if v != nil { + restoreTargetInfo, err := unmarshalBasicRestoreTargetInfoBase(*v) + if err != nil { + return err + } + abrr.RestoreTargetInfo = restoreTargetInfo + } + case "sourceDataStoreType": + if v != nil { + var sourceDataStoreType SourceDataStoreType + err = json.Unmarshal(*v, &sourceDataStoreType) + if err != nil { + return err + } + abrr.SourceDataStoreType = sourceDataStoreType + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicAzureBackupRestoreRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + abrr.ObjectType = objectType + } + } + } + + return nil +} + +// AzureBackupRestoreWithRehydrationRequest azureBackup Restore with Rehydration Request +type AzureBackupRestoreWithRehydrationRequest struct { + // RehydrationPriority - Priority to be used for rehydration. Values High or Standard. Possible values include: 'RehydrationPriorityInvalid', 'RehydrationPriorityHigh', 'RehydrationPriorityStandard' + RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"` + // RehydrationRetentionDuration - Retention duration in ISO 8601 format i.e P10D . + RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // RestoreTargetInfo - Gets or sets the restore target information. + RestoreTargetInfo BasicRestoreTargetInfoBase `json:"restoreTargetInfo,omitempty"` + // SourceDataStoreType - Gets or sets the type of the source data store. Possible values include: 'SourceDataStoreTypeArchiveStore', 'SourceDataStoreTypeSnapshotStore', 'SourceDataStoreTypeVaultStore' + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryPointBasedRestoreRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest', 'ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRecoveryTimeBasedRestoreRequest' + ObjectType ObjectTypeBasicAzureBackupRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { + abrwrr.ObjectType = ObjectTypeBasicAzureBackupRestoreRequestObjectTypeAzureBackupRestoreWithRehydrationRequest + objectMap := make(map[string]interface{}) + if abrwrr.RehydrationPriority != "" { + objectMap["rehydrationPriority"] = abrwrr.RehydrationPriority + } + if abrwrr.RehydrationRetentionDuration != nil { + objectMap["rehydrationRetentionDuration"] = abrwrr.RehydrationRetentionDuration + } + if abrwrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = abrwrr.RecoveryPointID + } + objectMap["restoreTargetInfo"] = abrwrr.RestoreTargetInfo + if abrwrr.SourceDataStoreType != "" { + objectMap["sourceDataStoreType"] = abrwrr.SourceDataStoreType + } + if abrwrr.ObjectType != "" { + objectMap["objectType"] = abrwrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) AsAzureBackupRecoveryPointBasedRestoreRequest() (*AzureBackupRecoveryPointBasedRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureBackupRecoveryPointBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) AsBasicAzureBackupRecoveryPointBasedRestoreRequest() (BasicAzureBackupRecoveryPointBasedRestoreRequest, bool) { + return &abrwrr, true +} + +// AsAzureBackupRestoreWithRehydrationRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) AsAzureBackupRestoreWithRehydrationRequest() (*AzureBackupRestoreWithRehydrationRequest, bool) { + return &abrwrr, true +} + +// AsAzureBackupRecoveryTimeBasedRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) AsAzureBackupRecoveryTimeBasedRestoreRequest() (*AzureBackupRecoveryTimeBasedRestoreRequest, bool) { + return nil, false +} + +// AsAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) AsAzureBackupRestoreRequest() (*AzureBackupRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureBackupRestoreRequest is the BasicAzureBackupRestoreRequest implementation for AzureBackupRestoreWithRehydrationRequest. +func (abrwrr AzureBackupRestoreWithRehydrationRequest) AsBasicAzureBackupRestoreRequest() (BasicAzureBackupRestoreRequest, bool) { + return &abrwrr, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureBackupRestoreWithRehydrationRequest struct. +func (abrwrr *AzureBackupRestoreWithRehydrationRequest) 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 "rehydrationPriority": + if v != nil { + var rehydrationPriority RehydrationPriority + err = json.Unmarshal(*v, &rehydrationPriority) + if err != nil { + return err + } + abrwrr.RehydrationPriority = rehydrationPriority + } + case "rehydrationRetentionDuration": + if v != nil { + var rehydrationRetentionDuration string + err = json.Unmarshal(*v, &rehydrationRetentionDuration) + if err != nil { + return err + } + abrwrr.RehydrationRetentionDuration = &rehydrationRetentionDuration + } + case "recoveryPointId": + if v != nil { + var recoveryPointID string + err = json.Unmarshal(*v, &recoveryPointID) + if err != nil { + return err + } + abrwrr.RecoveryPointID = &recoveryPointID + } + case "restoreTargetInfo": + if v != nil { + restoreTargetInfo, err := unmarshalBasicRestoreTargetInfoBase(*v) + if err != nil { + return err + } + abrwrr.RestoreTargetInfo = restoreTargetInfo + } + case "sourceDataStoreType": + if v != nil { + var sourceDataStoreType SourceDataStoreType + err = json.Unmarshal(*v, &sourceDataStoreType) + if err != nil { + return err + } + abrwrr.SourceDataStoreType = sourceDataStoreType + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicAzureBackupRestoreRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + abrwrr.ObjectType = objectType + } + } + } + + return nil +} + +// AzureBackupRule azure backup rule +type AzureBackupRule struct { + BackupParameters BasicBackupParameters `json:"backupParameters,omitempty"` + DataStore *DataStoreInfoBase `json:"dataStore,omitempty"` + Trigger BasicTriggerContext `json:"trigger,omitempty"` + Name *string `json:"name,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule', 'ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule', 'ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule' + ObjectType ObjectTypeBasicBasePolicyRule `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupRule. +func (abr AzureBackupRule) MarshalJSON() ([]byte, error) { + abr.ObjectType = ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule + objectMap := make(map[string]interface{}) + objectMap["backupParameters"] = abr.BackupParameters + if abr.DataStore != nil { + objectMap["dataStore"] = abr.DataStore + } + objectMap["trigger"] = abr.Trigger + if abr.Name != nil { + objectMap["name"] = abr.Name + } + if abr.ObjectType != "" { + objectMap["objectType"] = abr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRule is the BasicBasePolicyRule implementation for AzureBackupRule. +func (abr AzureBackupRule) AsAzureBackupRule() (*AzureBackupRule, bool) { + return &abr, true +} + +// AsAzureRetentionRule is the BasicBasePolicyRule implementation for AzureBackupRule. +func (abr AzureBackupRule) AsAzureRetentionRule() (*AzureRetentionRule, bool) { + return nil, false +} + +// AsBasePolicyRule is the BasicBasePolicyRule implementation for AzureBackupRule. +func (abr AzureBackupRule) AsBasePolicyRule() (*BasePolicyRule, bool) { + return nil, false +} + +// AsBasicBasePolicyRule is the BasicBasePolicyRule implementation for AzureBackupRule. +func (abr AzureBackupRule) AsBasicBasePolicyRule() (BasicBasePolicyRule, bool) { + return &abr, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureBackupRule struct. +func (abr *AzureBackupRule) 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 "backupParameters": + if v != nil { + backupParameters, err := unmarshalBasicBackupParameters(*v) + if err != nil { + return err + } + abr.BackupParameters = backupParameters + } + case "dataStore": + if v != nil { + var dataStore DataStoreInfoBase + err = json.Unmarshal(*v, &dataStore) + if err != nil { + return err + } + abr.DataStore = &dataStore + } + case "trigger": + if v != nil { + trigger, err := unmarshalBasicTriggerContext(*v) + if err != nil { + return err + } + abr.Trigger = trigger + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + abr.Name = &name + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicBasePolicyRule + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + abr.ObjectType = objectType + } + } + } + + return nil +} + +// AzureOperationalStoreParameters parameters for Operational-Tier DataStore +type AzureOperationalStoreParameters struct { + // ResourceGroupID - Gets or sets the Snapshot Resource Group Uri. + ResourceGroupID *string `json:"resourceGroupId,omitempty"` + // DataStoreType - type of datastore; Operational/Vault/Archive. Possible values include: 'DataStoreTypesOperationalStore', 'DataStoreTypesVaultStore', 'DataStoreTypesArchiveStore' + DataStoreType DataStoreTypes `json:"dataStoreType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters', 'ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters' + ObjectType ObjectTypeBasicDataStoreParameters `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureOperationalStoreParameters. +func (aosp AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { + aosp.ObjectType = ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters + objectMap := make(map[string]interface{}) + if aosp.ResourceGroupID != nil { + objectMap["resourceGroupId"] = aosp.ResourceGroupID + } + if aosp.DataStoreType != "" { + objectMap["dataStoreType"] = aosp.DataStoreType + } + if aosp.ObjectType != "" { + objectMap["objectType"] = aosp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureOperationalStoreParameters is the BasicDataStoreParameters implementation for AzureOperationalStoreParameters. +func (aosp AzureOperationalStoreParameters) AsAzureOperationalStoreParameters() (*AzureOperationalStoreParameters, bool) { + return &aosp, true +} + +// AsDataStoreParameters is the BasicDataStoreParameters implementation for AzureOperationalStoreParameters. +func (aosp AzureOperationalStoreParameters) AsDataStoreParameters() (*DataStoreParameters, bool) { + return nil, false +} + +// AsBasicDataStoreParameters is the BasicDataStoreParameters implementation for AzureOperationalStoreParameters. +func (aosp AzureOperationalStoreParameters) AsBasicDataStoreParameters() (BasicDataStoreParameters, bool) { + return &aosp, true +} + +// AzureRetentionRule azure retention rule +type AzureRetentionRule struct { + IsDefault *bool `json:"isDefault,omitempty"` + Lifecycles *[]SourceLifeCycle `json:"lifecycles,omitempty"` + Name *string `json:"name,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule', 'ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule', 'ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule' + ObjectType ObjectTypeBasicBasePolicyRule `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureRetentionRule. +func (arr AzureRetentionRule) MarshalJSON() ([]byte, error) { + arr.ObjectType = ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule + objectMap := make(map[string]interface{}) + if arr.IsDefault != nil { + objectMap["isDefault"] = arr.IsDefault + } + if arr.Lifecycles != nil { + objectMap["lifecycles"] = arr.Lifecycles + } + if arr.Name != nil { + objectMap["name"] = arr.Name + } + if arr.ObjectType != "" { + objectMap["objectType"] = arr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRule is the BasicBasePolicyRule implementation for AzureRetentionRule. +func (arr AzureRetentionRule) AsAzureBackupRule() (*AzureBackupRule, bool) { + return nil, false +} + +// AsAzureRetentionRule is the BasicBasePolicyRule implementation for AzureRetentionRule. +func (arr AzureRetentionRule) AsAzureRetentionRule() (*AzureRetentionRule, bool) { + return &arr, true +} + +// AsBasePolicyRule is the BasicBasePolicyRule implementation for AzureRetentionRule. +func (arr AzureRetentionRule) AsBasePolicyRule() (*BasePolicyRule, bool) { + return nil, false +} + +// AsBasicBasePolicyRule is the BasicBasePolicyRule implementation for AzureRetentionRule. +func (arr AzureRetentionRule) AsBasicBasePolicyRule() (BasicBasePolicyRule, bool) { + return &arr, true +} + +// BasicBackupCriteria backupCriteria base class +type BasicBackupCriteria interface { + AsScheduleBasedBackupCriteria() (*ScheduleBasedBackupCriteria, bool) + AsBackupCriteria() (*BackupCriteria, bool) +} + +// BackupCriteria backupCriteria base class +type BackupCriteria struct { + // ObjectType - Possible values include: 'ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria', 'ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria' + ObjectType ObjectTypeBasicBackupCriteria `json:"objectType,omitempty"` +} + +func unmarshalBasicBackupCriteria(body []byte) (BasicBackupCriteria, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria): + var sbbc ScheduleBasedBackupCriteria + err := json.Unmarshal(body, &sbbc) + return sbbc, err + default: + var bc BackupCriteria + err := json.Unmarshal(body, &bc) + return bc, err + } +} +func unmarshalBasicBackupCriteriaArray(body []byte) ([]BasicBackupCriteria, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bcArray := make([]BasicBackupCriteria, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bc, err := unmarshalBasicBackupCriteria(*rawMessage) + if err != nil { + return nil, err + } + bcArray[index] = bc + } + return bcArray, nil +} + +// MarshalJSON is the custom marshaler for BackupCriteria. +func (bc BackupCriteria) MarshalJSON() ([]byte, error) { + bc.ObjectType = ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria + objectMap := make(map[string]interface{}) + if bc.ObjectType != "" { + objectMap["objectType"] = bc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsScheduleBasedBackupCriteria is the BasicBackupCriteria implementation for BackupCriteria. +func (bc BackupCriteria) AsScheduleBasedBackupCriteria() (*ScheduleBasedBackupCriteria, bool) { + return nil, false +} + +// AsBackupCriteria is the BasicBackupCriteria implementation for BackupCriteria. +func (bc BackupCriteria) AsBackupCriteria() (*BackupCriteria, bool) { + return &bc, true +} + +// AsBasicBackupCriteria is the BasicBackupCriteria implementation for BackupCriteria. +func (bc BackupCriteria) AsBasicBackupCriteria() (BasicBackupCriteria, bool) { + return &bc, true +} + +// BackupInstance backup Instance +type BackupInstance struct { + // FriendlyName - Gets or sets the Backup Instance friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` + // DataSourceInfo - Gets or sets the data source information. + DataSourceInfo *Datasource `json:"dataSourceInfo,omitempty"` + // DataSourceSetInfo - Gets or sets the data source set information. + DataSourceSetInfo *DatasourceSet `json:"dataSourceSetInfo,omitempty"` + // PolicyInfo - Gets or sets the policy information. + PolicyInfo *PolicyInfo `json:"policyInfo,omitempty"` + // ProtectionStatus - READ-ONLY; Specifies the protection status of the resource + ProtectionStatus *ProtectionStatusDetails `json:"protectionStatus,omitempty"` + // CurrentProtectionState - READ-ONLY; Specifies the current protection state of the resource. Possible values include: 'CurrentProtectionStateInvalid', 'CurrentProtectionStateNotProtected', 'CurrentProtectionStateConfiguringProtection', 'CurrentProtectionStateProtectionConfigured', 'CurrentProtectionStateBackupSchedulesSuspended', 'CurrentProtectionStateRetentionSchedulesSuspended', 'CurrentProtectionStateProtectionStopped', 'CurrentProtectionStateProtectionError', 'CurrentProtectionStateConfiguringProtectionFailed', 'CurrentProtectionStateSoftDeleting', 'CurrentProtectionStateSoftDeleted', 'CurrentProtectionStateUpdatingProtection' + CurrentProtectionState CurrentProtectionState `json:"currentProtectionState,omitempty"` + // ProtectionErrorDetails - READ-ONLY; Specifies the protection error of the resource + ProtectionErrorDetails *UserFacingError `json:"protectionErrorDetails,omitempty"` + // ProvisioningState - READ-ONLY; Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed + ProvisioningState *string `json:"provisioningState,omitempty"` + // DatasourceAuthCredentials - Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials BasicAuthCredentials `json:"datasourceAuthCredentials,omitempty"` + ObjectType *string `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupInstance. +func (bi BackupInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bi.FriendlyName != nil { + objectMap["friendlyName"] = bi.FriendlyName + } + if bi.DataSourceInfo != nil { + objectMap["dataSourceInfo"] = bi.DataSourceInfo + } + if bi.DataSourceSetInfo != nil { + objectMap["dataSourceSetInfo"] = bi.DataSourceSetInfo + } + if bi.PolicyInfo != nil { + objectMap["policyInfo"] = bi.PolicyInfo + } + objectMap["datasourceAuthCredentials"] = bi.DatasourceAuthCredentials + if bi.ObjectType != nil { + objectMap["objectType"] = bi.ObjectType + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackupInstance struct. +func (bi *BackupInstance) 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 + } + bi.FriendlyName = &friendlyName + } + case "dataSourceInfo": + if v != nil { + var dataSourceInfo Datasource + err = json.Unmarshal(*v, &dataSourceInfo) + if err != nil { + return err + } + bi.DataSourceInfo = &dataSourceInfo + } + case "dataSourceSetInfo": + if v != nil { + var dataSourceSetInfo DatasourceSet + err = json.Unmarshal(*v, &dataSourceSetInfo) + if err != nil { + return err + } + bi.DataSourceSetInfo = &dataSourceSetInfo + } + case "policyInfo": + if v != nil { + var policyInfo PolicyInfo + err = json.Unmarshal(*v, &policyInfo) + if err != nil { + return err + } + bi.PolicyInfo = &policyInfo + } + case "protectionStatus": + if v != nil { + var protectionStatus ProtectionStatusDetails + err = json.Unmarshal(*v, &protectionStatus) + if err != nil { + return err + } + bi.ProtectionStatus = &protectionStatus + } + case "currentProtectionState": + if v != nil { + var currentProtectionState CurrentProtectionState + err = json.Unmarshal(*v, ¤tProtectionState) + if err != nil { + return err + } + bi.CurrentProtectionState = currentProtectionState + } + case "protectionErrorDetails": + if v != nil { + var protectionErrorDetails UserFacingError + err = json.Unmarshal(*v, &protectionErrorDetails) + if err != nil { + return err + } + bi.ProtectionErrorDetails = &protectionErrorDetails + } + case "provisioningState": + if v != nil { + var provisioningState string + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + bi.ProvisioningState = &provisioningState + } + case "datasourceAuthCredentials": + if v != nil { + datasourceAuthCredentials, err := unmarshalBasicAuthCredentials(*v) + if err != nil { + return err + } + bi.DatasourceAuthCredentials = datasourceAuthCredentials + } + case "objectType": + if v != nil { + var objectType string + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + bi.ObjectType = &objectType + } + } + } + + return nil +} + +// BackupInstanceResource backupInstance Resource +type BackupInstanceResource struct { + autorest.Response `json:"-"` + // Properties - BackupInstanceResource properties + Properties *BackupInstance `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"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupInstanceResource. +func (bir BackupInstanceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bir.Properties != nil { + objectMap["properties"] = bir.Properties + } + if bir.SystemData != nil { + objectMap["systemData"] = bir.SystemData + } + return json.Marshal(objectMap) +} + +// BackupInstanceResourceList backupInstance Resource list response +type BackupInstanceResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]BackupInstanceResource `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"` +} + +// BackupInstanceResourceListIterator provides access to a complete listing of BackupInstanceResource +// values. +type BackupInstanceResourceListIterator struct { + i int + page BackupInstanceResourceListPage +} + +// 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 *BackupInstanceResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstanceResourceListIterator.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 *BackupInstanceResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BackupInstanceResourceListIterator) 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 BackupInstanceResourceListIterator) Response() BackupInstanceResourceList { + 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 BackupInstanceResourceListIterator) Value() BackupInstanceResource { + if !iter.page.NotDone() { + return BackupInstanceResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BackupInstanceResourceListIterator type. +func NewBackupInstanceResourceListIterator(page BackupInstanceResourceListPage) BackupInstanceResourceListIterator { + return BackupInstanceResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (birl BackupInstanceResourceList) IsEmpty() bool { + return birl.Value == nil || len(*birl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (birl BackupInstanceResourceList) hasNextLink() bool { + return birl.NextLink != nil && len(*birl.NextLink) != 0 +} + +// backupInstanceResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (birl BackupInstanceResourceList) backupInstanceResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !birl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(birl.NextLink))) +} + +// BackupInstanceResourceListPage contains a page of BackupInstanceResource values. +type BackupInstanceResourceListPage struct { + fn func(context.Context, BackupInstanceResourceList) (BackupInstanceResourceList, error) + birl BackupInstanceResourceList +} + +// 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 *BackupInstanceResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupInstanceResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.birl) + if err != nil { + return err + } + page.birl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BackupInstanceResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BackupInstanceResourceListPage) NotDone() bool { + return !page.birl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BackupInstanceResourceListPage) Response() BackupInstanceResourceList { + return page.birl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BackupInstanceResourceListPage) Values() []BackupInstanceResource { + if page.birl.IsEmpty() { + return nil + } + return *page.birl.Value +} + +// Creates a new instance of the BackupInstanceResourceListPage type. +func NewBackupInstanceResourceListPage(cur BackupInstanceResourceList, getNextPage func(context.Context, BackupInstanceResourceList) (BackupInstanceResourceList, error)) BackupInstanceResourceListPage { + return BackupInstanceResourceListPage{ + fn: getNextPage, + birl: cur, + } +} + +// BackupInstancesAdhocBackupFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupInstancesAdhocBackupFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (OperationJobExtendedInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesAdhocBackupFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesAdhocBackupFuture.Result. +func (future *BackupInstancesAdhocBackupFuture) result(client BackupInstancesClient) (ojei OperationJobExtendedInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesAdhocBackupFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ojei.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesAdhocBackupFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ojei.Response.Response, err = future.GetResult(sender); err == nil && ojei.Response.Response.StatusCode != http.StatusNoContent { + ojei, err = client.AdhocBackupResponder(ojei.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesAdhocBackupFuture", "Result", ojei.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupInstancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupInstancesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (BackupInstanceResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesCreateOrUpdateFuture.Result. +func (future *BackupInstancesCreateOrUpdateFuture) result(client BackupInstancesClient) (bir BackupInstanceResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bir.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bir.Response.Response, err = future.GetResult(sender); err == nil && bir.Response.Response.StatusCode != http.StatusNoContent { + bir, err = client.CreateOrUpdateResponder(bir.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesCreateOrUpdateFuture", "Result", bir.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupInstancesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesDeleteFuture.Result. +func (future *BackupInstancesDeleteFuture) result(client BackupInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// BackupInstancesTriggerRehydrateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupInstancesTriggerRehydrateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesTriggerRehydrateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesTriggerRehydrateFuture.Result. +func (future *BackupInstancesTriggerRehydrateFuture) result(client BackupInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesTriggerRehydrateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesTriggerRehydrateFuture") + return + } + ar.Response = future.Response() + return +} + +// BackupInstancesTriggerRestoreFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupInstancesTriggerRestoreFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (OperationJobExtendedInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesTriggerRestoreFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesTriggerRestoreFuture.Result. +func (future *BackupInstancesTriggerRestoreFuture) result(client BackupInstancesClient) (ojei OperationJobExtendedInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesTriggerRestoreFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ojei.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesTriggerRestoreFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ojei.Response.Response, err = future.GetResult(sender); err == nil && ojei.Response.Response.StatusCode != http.StatusNoContent { + ojei, err = client.TriggerRestoreResponder(ojei.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesTriggerRestoreFuture", "Result", ojei.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupInstancesValidateForBackupFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupInstancesValidateForBackupFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (OperationJobExtendedInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesValidateForBackupFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesValidateForBackupFuture.Result. +func (future *BackupInstancesValidateForBackupFuture) result(client BackupInstancesClient) (ojei OperationJobExtendedInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesValidateForBackupFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ojei.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesValidateForBackupFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ojei.Response.Response, err = future.GetResult(sender); err == nil && ojei.Response.Response.StatusCode != http.StatusNoContent { + ojei, err = client.ValidateForBackupResponder(ojei.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesValidateForBackupFuture", "Result", ojei.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupInstancesValidateForRestoreFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupInstancesValidateForRestoreFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupInstancesClient) (OperationJobExtendedInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupInstancesValidateForRestoreFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupInstancesValidateForRestoreFuture.Result. +func (future *BackupInstancesValidateForRestoreFuture) result(client BackupInstancesClient) (ojei OperationJobExtendedInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesValidateForRestoreFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ojei.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupInstancesValidateForRestoreFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ojei.Response.Response, err = future.GetResult(sender); err == nil && ojei.Response.Response.StatusCode != http.StatusNoContent { + ojei, err = client.ValidateForRestoreResponder(ojei.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupInstancesValidateForRestoreFuture", "Result", ojei.Response.Response, "Failure responding to request") + } + } + return +} + +// BasicBackupParameters backupParameters base +type BasicBackupParameters interface { + AsAzureBackupParams() (*AzureBackupParams, bool) + AsBackupParameters() (*BackupParameters, bool) +} + +// BackupParameters backupParameters base +type BackupParameters struct { + // ObjectType - Possible values include: 'ObjectTypeBasicBackupParametersObjectTypeBackupParameters', 'ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams' + ObjectType ObjectTypeBasicBackupParameters `json:"objectType,omitempty"` +} + +func unmarshalBasicBackupParameters(body []byte) (BasicBackupParameters, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicBackupParametersObjectTypeAzureBackupParams): + var abp AzureBackupParams + err := json.Unmarshal(body, &abp) + return abp, err + default: + var bp BackupParameters + err := json.Unmarshal(body, &bp) + return bp, err + } +} +func unmarshalBasicBackupParametersArray(body []byte) ([]BasicBackupParameters, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bpArray := make([]BasicBackupParameters, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bp, err := unmarshalBasicBackupParameters(*rawMessage) + if err != nil { + return nil, err + } + bpArray[index] = bp + } + return bpArray, nil +} + +// MarshalJSON is the custom marshaler for BackupParameters. +func (bp BackupParameters) MarshalJSON() ([]byte, error) { + bp.ObjectType = ObjectTypeBasicBackupParametersObjectTypeBackupParameters + objectMap := make(map[string]interface{}) + if bp.ObjectType != "" { + objectMap["objectType"] = bp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupParams is the BasicBackupParameters implementation for BackupParameters. +func (bp BackupParameters) AsAzureBackupParams() (*AzureBackupParams, bool) { + return nil, false +} + +// AsBackupParameters is the BasicBackupParameters implementation for BackupParameters. +func (bp BackupParameters) AsBackupParameters() (*BackupParameters, bool) { + return &bp, true +} + +// AsBasicBackupParameters is the BasicBackupParameters implementation for BackupParameters. +func (bp BackupParameters) AsBasicBackupParameters() (BasicBackupParameters, bool) { + return &bp, true +} + +// BackupPolicy rule based backup policy +type BackupPolicy struct { + // PolicyRules - Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc + PolicyRules *[]BasicBasePolicyRule `json:"policyRules,omitempty"` + // DatasourceTypes - Type of datasource for the backup management + DatasourceTypes *[]string `json:"datasourceTypes,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy', 'ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy' + ObjectType ObjectTypeBasicBaseBackupPolicy `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupPolicy. +func (bp BackupPolicy) MarshalJSON() ([]byte, error) { + bp.ObjectType = ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy + objectMap := make(map[string]interface{}) + if bp.PolicyRules != nil { + objectMap["policyRules"] = bp.PolicyRules + } + if bp.DatasourceTypes != nil { + objectMap["datasourceTypes"] = bp.DatasourceTypes + } + if bp.ObjectType != "" { + objectMap["objectType"] = bp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsBackupPolicy is the BasicBaseBackupPolicy implementation for BackupPolicy. +func (bp BackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) { + return &bp, true +} + +// AsBaseBackupPolicy is the BasicBaseBackupPolicy implementation for BackupPolicy. +func (bp BackupPolicy) AsBaseBackupPolicy() (*BaseBackupPolicy, bool) { + return nil, false +} + +// AsBasicBaseBackupPolicy is the BasicBaseBackupPolicy implementation for BackupPolicy. +func (bp BackupPolicy) AsBasicBaseBackupPolicy() (BasicBaseBackupPolicy, bool) { + return &bp, true +} + +// UnmarshalJSON is the custom unmarshaler for BackupPolicy struct. +func (bp *BackupPolicy) 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 "policyRules": + if v != nil { + policyRules, err := unmarshalBasicBasePolicyRuleArray(*v) + if err != nil { + return err + } + bp.PolicyRules = &policyRules + } + case "datasourceTypes": + if v != nil { + var datasourceTypes []string + err = json.Unmarshal(*v, &datasourceTypes) + if err != nil { + return err + } + bp.DatasourceTypes = &datasourceTypes + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicBaseBackupPolicy + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + bp.ObjectType = objectType + } + } + } + + return nil +} + +// BackupSchedule schedule for backup +type BackupSchedule struct { + // RepeatingTimeIntervals - ISO 8601 repeating time interval format + RepeatingTimeIntervals *[]string `json:"repeatingTimeIntervals,omitempty"` + // TimeZone - Time zone for a schedule. Example: Pacific Standard Time + TimeZone *string `json:"timeZone,omitempty"` +} + +// BackupVault backup Vault +type BackupVault struct { + // ProvisioningState - READ-ONLY; Provisioning state of the BackupVault resource. Possible values include: 'ProvisioningStateFailed', 'ProvisioningStateProvisioning', 'ProvisioningStateSucceeded', 'ProvisioningStateUnknown', 'ProvisioningStateUpdating' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ResourceMoveState - READ-ONLY; Resource move state for backup vault. Possible values include: 'ResourceMoveStateUnknown', 'ResourceMoveStateInProgress', 'ResourceMoveStatePrepareFailed', 'ResourceMoveStateCommitFailed', 'ResourceMoveStateFailed', 'ResourceMoveStatePrepareTimedout', 'ResourceMoveStateCommitTimedout', 'ResourceMoveStateCriticalFailure', 'ResourceMoveStatePartialSuccess', 'ResourceMoveStateMoveSucceeded' + ResourceMoveState ResourceMoveState `json:"resourceMoveState,omitempty"` + // ResourceMoveDetails - READ-ONLY; Resource move details for backup vault + ResourceMoveDetails *ResourceMoveDetails `json:"resourceMoveDetails,omitempty"` + // StorageSettings - Storage Settings + StorageSettings *[]StorageSetting `json:"storageSettings,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupVault. +func (bv BackupVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bv.StorageSettings != nil { + objectMap["storageSettings"] = bv.StorageSettings + } + return json.Marshal(objectMap) +} + +// BackupVaultResource backup Vault Resource +type BackupVaultResource struct { + autorest.Response `json:"-"` + // Properties - BackupVaultResource properties + Properties *BackupVault `json:"properties,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Identity - Input Managed Identity Details + Identity *DppIdentityDetails `json:"identity,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupVaultResource. +func (bvr BackupVaultResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bvr.Properties != nil { + objectMap["properties"] = bvr.Properties + } + if bvr.ETag != nil { + objectMap["eTag"] = bvr.ETag + } + if bvr.Identity != nil { + objectMap["identity"] = bvr.Identity + } + if bvr.Location != nil { + objectMap["location"] = bvr.Location + } + if bvr.Tags != nil { + objectMap["tags"] = bvr.Tags + } + if bvr.SystemData != nil { + objectMap["systemData"] = bvr.SystemData + } + return json.Marshal(objectMap) +} + +// BackupVaultResourceList list of BackupVault resources +type BackupVaultResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]BackupVaultResource `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"` +} + +// BackupVaultResourceListIterator provides access to a complete listing of BackupVaultResource values. +type BackupVaultResourceListIterator struct { + i int + page BackupVaultResourceListPage +} + +// 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 *BackupVaultResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultResourceListIterator.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 *BackupVaultResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BackupVaultResourceListIterator) 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 BackupVaultResourceListIterator) Response() BackupVaultResourceList { + 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 BackupVaultResourceListIterator) Value() BackupVaultResource { + if !iter.page.NotDone() { + return BackupVaultResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BackupVaultResourceListIterator type. +func NewBackupVaultResourceListIterator(page BackupVaultResourceListPage) BackupVaultResourceListIterator { + return BackupVaultResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bvrl BackupVaultResourceList) IsEmpty() bool { + return bvrl.Value == nil || len(*bvrl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bvrl BackupVaultResourceList) hasNextLink() bool { + return bvrl.NextLink != nil && len(*bvrl.NextLink) != 0 +} + +// backupVaultResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bvrl BackupVaultResourceList) backupVaultResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !bvrl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bvrl.NextLink))) +} + +// BackupVaultResourceListPage contains a page of BackupVaultResource values. +type BackupVaultResourceListPage struct { + fn func(context.Context, BackupVaultResourceList) (BackupVaultResourceList, error) + bvrl BackupVaultResourceList +} + +// 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 *BackupVaultResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupVaultResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bvrl) + if err != nil { + return err + } + page.bvrl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BackupVaultResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BackupVaultResourceListPage) NotDone() bool { + return !page.bvrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BackupVaultResourceListPage) Response() BackupVaultResourceList { + return page.bvrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BackupVaultResourceListPage) Values() []BackupVaultResource { + if page.bvrl.IsEmpty() { + return nil + } + return *page.bvrl.Value +} + +// Creates a new instance of the BackupVaultResourceListPage type. +func NewBackupVaultResourceListPage(cur BackupVaultResourceList, getNextPage func(context.Context, BackupVaultResourceList) (BackupVaultResourceList, error)) BackupVaultResourceListPage { + return BackupVaultResourceListPage{ + fn: getNextPage, + bvrl: cur, + } +} + +// BackupVaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BackupVaultsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupVaultsClient) (BackupVaultResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupVaultsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupVaultsCreateOrUpdateFuture.Result. +func (future *BackupVaultsCreateOrUpdateFuture) result(client BackupVaultsClient) (bvr BackupVaultResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bvr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupVaultsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bvr.Response.Response, err = future.GetResult(sender); err == nil && bvr.Response.Response.StatusCode != http.StatusNoContent { + bvr, err = client.CreateOrUpdateResponder(bvr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsCreateOrUpdateFuture", "Result", bvr.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupVaultsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupVaultsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupVaultsClient) (BackupVaultResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupVaultsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupVaultsUpdateFuture.Result. +func (future *BackupVaultsUpdateFuture) result(client BackupVaultsClient) (bvr BackupVaultResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bvr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.BackupVaultsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bvr.Response.Response, err = future.GetResult(sender); err == nil && bvr.Response.Response.StatusCode != http.StatusNoContent { + bvr, err = client.UpdateResponder(bvr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.BackupVaultsUpdateFuture", "Result", bvr.Response.Response, "Failure responding to request") + } + } + return +} + +// BasicBaseBackupPolicy backupPolicy base +type BasicBaseBackupPolicy interface { + AsBackupPolicy() (*BackupPolicy, bool) + AsBaseBackupPolicy() (*BaseBackupPolicy, bool) +} + +// BaseBackupPolicy backupPolicy base +type BaseBackupPolicy struct { + // DatasourceTypes - Type of datasource for the backup management + DatasourceTypes *[]string `json:"datasourceTypes,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy', 'ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy' + ObjectType ObjectTypeBasicBaseBackupPolicy `json:"objectType,omitempty"` +} + +func unmarshalBasicBaseBackupPolicy(body []byte) (BasicBaseBackupPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicBaseBackupPolicyObjectTypeBackupPolicy): + var bp BackupPolicy + err := json.Unmarshal(body, &bp) + return bp, err + default: + var bbp BaseBackupPolicy + err := json.Unmarshal(body, &bbp) + return bbp, err + } +} +func unmarshalBasicBaseBackupPolicyArray(body []byte) ([]BasicBaseBackupPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bbpArray := make([]BasicBaseBackupPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bbp, err := unmarshalBasicBaseBackupPolicy(*rawMessage) + if err != nil { + return nil, err + } + bbpArray[index] = bbp + } + return bbpArray, nil +} + +// MarshalJSON is the custom marshaler for BaseBackupPolicy. +func (bbp BaseBackupPolicy) MarshalJSON() ([]byte, error) { + bbp.ObjectType = ObjectTypeBasicBaseBackupPolicyObjectTypeBaseBackupPolicy + objectMap := make(map[string]interface{}) + if bbp.DatasourceTypes != nil { + objectMap["datasourceTypes"] = bbp.DatasourceTypes + } + if bbp.ObjectType != "" { + objectMap["objectType"] = bbp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsBackupPolicy is the BasicBaseBackupPolicy implementation for BaseBackupPolicy. +func (bbp BaseBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) { + return nil, false +} + +// AsBaseBackupPolicy is the BasicBaseBackupPolicy implementation for BaseBackupPolicy. +func (bbp BaseBackupPolicy) AsBaseBackupPolicy() (*BaseBackupPolicy, bool) { + return &bbp, true +} + +// AsBasicBaseBackupPolicy is the BasicBaseBackupPolicy implementation for BaseBackupPolicy. +func (bbp BaseBackupPolicy) AsBasicBaseBackupPolicy() (BasicBaseBackupPolicy, bool) { + return &bbp, true +} + +// BaseBackupPolicyResource baseBackupPolicy resource +type BaseBackupPolicyResource struct { + autorest.Response `json:"-"` + // Properties - BaseBackupPolicyResource properties + Properties BasicBaseBackupPolicy `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"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for BaseBackupPolicyResource. +func (bbpr BaseBackupPolicyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = bbpr.Properties + if bbpr.SystemData != nil { + objectMap["systemData"] = bbpr.SystemData + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BaseBackupPolicyResource struct. +func (bbpr *BaseBackupPolicyResource) 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 := unmarshalBasicBaseBackupPolicy(*v) + if err != nil { + return err + } + bbpr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bbpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bbpr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bbpr.Type = &typeVar + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + bbpr.SystemData = &systemData + } + } + } + + return nil +} + +// BaseBackupPolicyResourceList list of BaseBackupPolicy resources +type BaseBackupPolicyResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]BaseBackupPolicyResource `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"` +} + +// BaseBackupPolicyResourceListIterator provides access to a complete listing of BaseBackupPolicyResource +// values. +type BaseBackupPolicyResourceListIterator struct { + i int + page BaseBackupPolicyResourceListPage +} + +// 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 *BaseBackupPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseBackupPolicyResourceListIterator.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 *BaseBackupPolicyResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BaseBackupPolicyResourceListIterator) 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 BaseBackupPolicyResourceListIterator) Response() BaseBackupPolicyResourceList { + 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 BaseBackupPolicyResourceListIterator) Value() BaseBackupPolicyResource { + if !iter.page.NotDone() { + return BaseBackupPolicyResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BaseBackupPolicyResourceListIterator type. +func NewBaseBackupPolicyResourceListIterator(page BaseBackupPolicyResourceListPage) BaseBackupPolicyResourceListIterator { + return BaseBackupPolicyResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bbprl BaseBackupPolicyResourceList) IsEmpty() bool { + return bbprl.Value == nil || len(*bbprl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bbprl BaseBackupPolicyResourceList) hasNextLink() bool { + return bbprl.NextLink != nil && len(*bbprl.NextLink) != 0 +} + +// baseBackupPolicyResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bbprl BaseBackupPolicyResourceList) baseBackupPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !bbprl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bbprl.NextLink))) +} + +// BaseBackupPolicyResourceListPage contains a page of BaseBackupPolicyResource values. +type BaseBackupPolicyResourceListPage struct { + fn func(context.Context, BaseBackupPolicyResourceList) (BaseBackupPolicyResourceList, error) + bbprl BaseBackupPolicyResourceList +} + +// 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 *BaseBackupPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseBackupPolicyResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bbprl) + if err != nil { + return err + } + page.bbprl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BaseBackupPolicyResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BaseBackupPolicyResourceListPage) NotDone() bool { + return !page.bbprl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BaseBackupPolicyResourceListPage) Response() BaseBackupPolicyResourceList { + return page.bbprl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BaseBackupPolicyResourceListPage) Values() []BaseBackupPolicyResource { + if page.bbprl.IsEmpty() { + return nil + } + return *page.bbprl.Value +} + +// Creates a new instance of the BaseBackupPolicyResourceListPage type. +func NewBaseBackupPolicyResourceListPage(cur BaseBackupPolicyResourceList, getNextPage func(context.Context, BaseBackupPolicyResourceList) (BaseBackupPolicyResourceList, error)) BaseBackupPolicyResourceListPage { + return BaseBackupPolicyResourceListPage{ + fn: getNextPage, + bbprl: cur, + } +} + +// BasicBasePolicyRule basePolicy Rule +type BasicBasePolicyRule interface { + AsAzureBackupRule() (*AzureBackupRule, bool) + AsAzureRetentionRule() (*AzureRetentionRule, bool) + AsBasePolicyRule() (*BasePolicyRule, bool) +} + +// BasePolicyRule basePolicy Rule +type BasePolicyRule struct { + Name *string `json:"name,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule', 'ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule', 'ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule' + ObjectType ObjectTypeBasicBasePolicyRule `json:"objectType,omitempty"` +} + +func unmarshalBasicBasePolicyRule(body []byte) (BasicBasePolicyRule, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicBasePolicyRuleObjectTypeAzureBackupRule): + var abr AzureBackupRule + err := json.Unmarshal(body, &abr) + return abr, err + case string(ObjectTypeBasicBasePolicyRuleObjectTypeAzureRetentionRule): + var arr AzureRetentionRule + err := json.Unmarshal(body, &arr) + return arr, err + default: + var bpr BasePolicyRule + err := json.Unmarshal(body, &bpr) + return bpr, err + } +} +func unmarshalBasicBasePolicyRuleArray(body []byte) ([]BasicBasePolicyRule, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bprArray := make([]BasicBasePolicyRule, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bpr, err := unmarshalBasicBasePolicyRule(*rawMessage) + if err != nil { + return nil, err + } + bprArray[index] = bpr + } + return bprArray, nil +} + +// MarshalJSON is the custom marshaler for BasePolicyRule. +func (bpr BasePolicyRule) MarshalJSON() ([]byte, error) { + bpr.ObjectType = ObjectTypeBasicBasePolicyRuleObjectTypeBasePolicyRule + objectMap := make(map[string]interface{}) + if bpr.Name != nil { + objectMap["name"] = bpr.Name + } + if bpr.ObjectType != "" { + objectMap["objectType"] = bpr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupRule is the BasicBasePolicyRule implementation for BasePolicyRule. +func (bpr BasePolicyRule) AsAzureBackupRule() (*AzureBackupRule, bool) { + return nil, false +} + +// AsAzureRetentionRule is the BasicBasePolicyRule implementation for BasePolicyRule. +func (bpr BasePolicyRule) AsAzureRetentionRule() (*AzureRetentionRule, bool) { + return nil, false +} + +// AsBasePolicyRule is the BasicBasePolicyRule implementation for BasePolicyRule. +func (bpr BasePolicyRule) AsBasePolicyRule() (*BasePolicyRule, bool) { + return &bpr, true +} + +// AsBasicBasePolicyRule is the BasicBasePolicyRule implementation for BasePolicyRule. +func (bpr BasePolicyRule) AsBasicBasePolicyRule() (BasicBasePolicyRule, bool) { + return &bpr, true +} + +// CheckNameAvailabilityRequest checkNameAvailability Request +type CheckNameAvailabilityRequest struct { + // Name - Resource name for which availability needs to be checked + Name *string `json:"name,omitempty"` + // Type - Describes the Resource type: Microsoft.DataProtection/BackupVaults + Type *string `json:"type,omitempty"` +} + +// CheckNameAvailabilityResult checkNameAvailability Result +type CheckNameAvailabilityResult struct { + autorest.Response `json:"-"` + // Message - Gets or sets the message. + Message *string `json:"message,omitempty"` + // NameAvailable - Gets or sets a value indicating whether [name available]. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Reason - Gets or sets the reason. + Reason *string `json:"reason,omitempty"` +} + +// ClientDiscoveryDisplay localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Description - Description of the operation having details of what operation is about. + Description *string `json:"description,omitempty"` + // Operation - Operations Name itself. + Operation *string `json:"operation,omitempty"` + // 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"` +} + +// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client +// discovery. +type ClientDiscoveryForLogSpecification struct { + // BlobDuration - blob duration of shoebox log specification + BlobDuration *string `json:"blobDuration,omitempty"` + // DisplayName - Localized display name + DisplayName *string `json:"displayName,omitempty"` + // Name - Name for shoebox log specification. + Name *string `json:"name,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:"-"` + // NextLink - Link to the next chunk of Response. + NextLink *string `json:"nextLink,omitempty"` + // Value - List of available operations. + Value *[]ClientDiscoveryValueForSingleAPI `json:"value,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 +} + +// hasNextLink returns true if the NextLink is not empty. +func (cdr ClientDiscoveryResponse) hasNextLink() bool { + return cdr.NextLink != nil && len(*cdr.NextLink) != 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.hasNextLink() { + 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) + }() + } + for { + next, err := page.fn(ctx, page.cdr) + if err != nil { + return err + } + page.cdr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { + return ClientDiscoveryResponsePage{ + fn: getNextPage, + cdr: cur, + } +} + +// ClientDiscoveryValueForSingleAPI available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Display - Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay `json:"display,omitempty"` + // Name - Name of the Operation. + Name *string `json:"name,omitempty"` + // IsDataAction - Indicates whether the operation is a data action + IsDataAction *bool `json:"isDataAction,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 - Properties for the given operation. + Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` +} + +// CloudError an error response from Azure Backup. +type CloudError struct { + Error *Error `json:"error,omitempty"` +} + +// CopyOnExpiryOption copy on Expiry Option +type CopyOnExpiryOption struct { + // ObjectType - Possible values include: 'ObjectTypeBasicCopyOptionObjectTypeCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption', 'ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption' + ObjectType ObjectTypeBasicCopyOption `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for CopyOnExpiryOption. +func (coeo CopyOnExpiryOption) MarshalJSON() ([]byte, error) { + coeo.ObjectType = ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption + objectMap := make(map[string]interface{}) + if coeo.ObjectType != "" { + objectMap["objectType"] = coeo.ObjectType + } + return json.Marshal(objectMap) +} + +// AsCopyOnExpiryOption is the BasicCopyOption implementation for CopyOnExpiryOption. +func (coeo CopyOnExpiryOption) AsCopyOnExpiryOption() (*CopyOnExpiryOption, bool) { + return &coeo, true +} + +// AsCustomCopyOption is the BasicCopyOption implementation for CopyOnExpiryOption. +func (coeo CopyOnExpiryOption) AsCustomCopyOption() (*CustomCopyOption, bool) { + return nil, false +} + +// AsImmediateCopyOption is the BasicCopyOption implementation for CopyOnExpiryOption. +func (coeo CopyOnExpiryOption) AsImmediateCopyOption() (*ImmediateCopyOption, bool) { + return nil, false +} + +// AsCopyOption is the BasicCopyOption implementation for CopyOnExpiryOption. +func (coeo CopyOnExpiryOption) AsCopyOption() (*CopyOption, bool) { + return nil, false +} + +// AsBasicCopyOption is the BasicCopyOption implementation for CopyOnExpiryOption. +func (coeo CopyOnExpiryOption) AsBasicCopyOption() (BasicCopyOption, bool) { + return &coeo, true +} + +// BasicCopyOption options to copy +type BasicCopyOption interface { + AsCopyOnExpiryOption() (*CopyOnExpiryOption, bool) + AsCustomCopyOption() (*CustomCopyOption, bool) + AsImmediateCopyOption() (*ImmediateCopyOption, bool) + AsCopyOption() (*CopyOption, bool) +} + +// CopyOption options to copy +type CopyOption struct { + // ObjectType - Possible values include: 'ObjectTypeBasicCopyOptionObjectTypeCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption', 'ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption' + ObjectType ObjectTypeBasicCopyOption `json:"objectType,omitempty"` +} + +func unmarshalBasicCopyOption(body []byte) (BasicCopyOption, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption): + var coeo CopyOnExpiryOption + err := json.Unmarshal(body, &coeo) + return coeo, err + case string(ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption): + var cco CustomCopyOption + err := json.Unmarshal(body, &cco) + return cco, err + case string(ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption): + var ico ImmediateCopyOption + err := json.Unmarshal(body, &ico) + return ico, err + default: + var co CopyOption + err := json.Unmarshal(body, &co) + return co, err + } +} +func unmarshalBasicCopyOptionArray(body []byte) ([]BasicCopyOption, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + coArray := make([]BasicCopyOption, len(rawMessages)) + + for index, rawMessage := range rawMessages { + co, err := unmarshalBasicCopyOption(*rawMessage) + if err != nil { + return nil, err + } + coArray[index] = co + } + return coArray, nil +} + +// MarshalJSON is the custom marshaler for CopyOption. +func (co CopyOption) MarshalJSON() ([]byte, error) { + co.ObjectType = ObjectTypeBasicCopyOptionObjectTypeCopyOption + objectMap := make(map[string]interface{}) + if co.ObjectType != "" { + objectMap["objectType"] = co.ObjectType + } + return json.Marshal(objectMap) +} + +// AsCopyOnExpiryOption is the BasicCopyOption implementation for CopyOption. +func (co CopyOption) AsCopyOnExpiryOption() (*CopyOnExpiryOption, bool) { + return nil, false +} + +// AsCustomCopyOption is the BasicCopyOption implementation for CopyOption. +func (co CopyOption) AsCustomCopyOption() (*CustomCopyOption, bool) { + return nil, false +} + +// AsImmediateCopyOption is the BasicCopyOption implementation for CopyOption. +func (co CopyOption) AsImmediateCopyOption() (*ImmediateCopyOption, bool) { + return nil, false +} + +// AsCopyOption is the BasicCopyOption implementation for CopyOption. +func (co CopyOption) AsCopyOption() (*CopyOption, bool) { + return &co, true +} + +// AsBasicCopyOption is the BasicCopyOption implementation for CopyOption. +func (co CopyOption) AsBasicCopyOption() (BasicCopyOption, bool) { + return &co, true +} + +// CustomCopyOption duration based custom options to copy +type CustomCopyOption struct { + // Duration - Data copied after given timespan + Duration *string `json:"duration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicCopyOptionObjectTypeCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption', 'ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption' + ObjectType ObjectTypeBasicCopyOption `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for CustomCopyOption. +func (cco CustomCopyOption) MarshalJSON() ([]byte, error) { + cco.ObjectType = ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption + objectMap := make(map[string]interface{}) + if cco.Duration != nil { + objectMap["duration"] = cco.Duration + } + if cco.ObjectType != "" { + objectMap["objectType"] = cco.ObjectType + } + return json.Marshal(objectMap) +} + +// AsCopyOnExpiryOption is the BasicCopyOption implementation for CustomCopyOption. +func (cco CustomCopyOption) AsCopyOnExpiryOption() (*CopyOnExpiryOption, bool) { + return nil, false +} + +// AsCustomCopyOption is the BasicCopyOption implementation for CustomCopyOption. +func (cco CustomCopyOption) AsCustomCopyOption() (*CustomCopyOption, bool) { + return &cco, true +} + +// AsImmediateCopyOption is the BasicCopyOption implementation for CustomCopyOption. +func (cco CustomCopyOption) AsImmediateCopyOption() (*ImmediateCopyOption, bool) { + return nil, false +} + +// AsCopyOption is the BasicCopyOption implementation for CustomCopyOption. +func (cco CustomCopyOption) AsCopyOption() (*CopyOption, bool) { + return nil, false +} + +// AsBasicCopyOption is the BasicCopyOption implementation for CustomCopyOption. +func (cco CustomCopyOption) AsBasicCopyOption() (BasicCopyOption, bool) { + return &cco, true +} + +// Datasource datasource to be backed up +type Datasource struct { + // DatasourceType - DatasourceType of the resource. + DatasourceType *string `json:"datasourceType,omitempty"` + // ObjectType - Type of Datasource object, used to initialize the right inherited type + ObjectType *string `json:"objectType,omitempty"` + // ResourceID - Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault. + ResourceID *string `json:"resourceID,omitempty"` + // ResourceLocation - Location of datasource. + ResourceLocation *string `json:"resourceLocation,omitempty"` + // ResourceName - Unique identifier of the resource in the context of parent. + ResourceName *string `json:"resourceName,omitempty"` + // ResourceType - Resource Type of Datasource. + ResourceType *string `json:"resourceType,omitempty"` + // ResourceURI - Uri of the resource. + ResourceURI *string `json:"resourceUri,omitempty"` +} + +// DatasourceSet datasourceSet details of datasource to be backed up +type DatasourceSet struct { + // DatasourceType - DatasourceType of the resource. + DatasourceType *string `json:"datasourceType,omitempty"` + // ObjectType - Type of Datasource object, used to initialize the right inherited type + ObjectType *string `json:"objectType,omitempty"` + // ResourceID - Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault. + ResourceID *string `json:"resourceID,omitempty"` + // ResourceLocation - Location of datasource. + ResourceLocation *string `json:"resourceLocation,omitempty"` + // ResourceName - Unique identifier of the resource in the context of parent. + ResourceName *string `json:"resourceName,omitempty"` + // ResourceType - Resource Type of Datasource. + ResourceType *string `json:"resourceType,omitempty"` + // ResourceURI - Uri of the resource. + ResourceURI *string `json:"resourceUri,omitempty"` +} + +// DataStoreInfoBase dataStoreInfo base +type DataStoreInfoBase struct { + // DataStoreType - type of datastore; Operational/Vault/Archive. Possible values include: 'DataStoreTypesOperationalStore', 'DataStoreTypesVaultStore', 'DataStoreTypesArchiveStore' + DataStoreType DataStoreTypes `json:"dataStoreType,omitempty"` + // ObjectType - Type of Datasource object, used to initialize the right inherited type + ObjectType *string `json:"objectType,omitempty"` +} + +// BasicDataStoreParameters parameters for DataStore +type BasicDataStoreParameters interface { + AsAzureOperationalStoreParameters() (*AzureOperationalStoreParameters, bool) + AsDataStoreParameters() (*DataStoreParameters, bool) +} + +// DataStoreParameters parameters for DataStore +type DataStoreParameters struct { + // DataStoreType - type of datastore; Operational/Vault/Archive. Possible values include: 'DataStoreTypesOperationalStore', 'DataStoreTypesVaultStore', 'DataStoreTypesArchiveStore' + DataStoreType DataStoreTypes `json:"dataStoreType,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters', 'ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters' + ObjectType ObjectTypeBasicDataStoreParameters `json:"objectType,omitempty"` +} + +func unmarshalBasicDataStoreParameters(body []byte) (BasicDataStoreParameters, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicDataStoreParametersObjectTypeAzureOperationalStoreParameters): + var aosp AzureOperationalStoreParameters + err := json.Unmarshal(body, &aosp) + return aosp, err + default: + var dsp DataStoreParameters + err := json.Unmarshal(body, &dsp) + return dsp, err + } +} +func unmarshalBasicDataStoreParametersArray(body []byte) ([]BasicDataStoreParameters, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dspArray := make([]BasicDataStoreParameters, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dsp, err := unmarshalBasicDataStoreParameters(*rawMessage) + if err != nil { + return nil, err + } + dspArray[index] = dsp + } + return dspArray, nil +} + +// MarshalJSON is the custom marshaler for DataStoreParameters. +func (dsp DataStoreParameters) MarshalJSON() ([]byte, error) { + dsp.ObjectType = ObjectTypeBasicDataStoreParametersObjectTypeDataStoreParameters + objectMap := make(map[string]interface{}) + if dsp.DataStoreType != "" { + objectMap["dataStoreType"] = dsp.DataStoreType + } + if dsp.ObjectType != "" { + objectMap["objectType"] = dsp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureOperationalStoreParameters is the BasicDataStoreParameters implementation for DataStoreParameters. +func (dsp DataStoreParameters) AsAzureOperationalStoreParameters() (*AzureOperationalStoreParameters, bool) { + return nil, false +} + +// AsDataStoreParameters is the BasicDataStoreParameters implementation for DataStoreParameters. +func (dsp DataStoreParameters) AsDataStoreParameters() (*DataStoreParameters, bool) { + return &dsp, true +} + +// AsBasicDataStoreParameters is the BasicDataStoreParameters implementation for DataStoreParameters. +func (dsp DataStoreParameters) AsBasicDataStoreParameters() (BasicDataStoreParameters, bool) { + return &dsp, true +} + +// 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"` +} + +// BasicDeleteOption delete Option +type BasicDeleteOption interface { + AsAbsoluteDeleteOption() (*AbsoluteDeleteOption, bool) + AsDeleteOption() (*DeleteOption, bool) +} + +// DeleteOption delete Option +type DeleteOption struct { + // Duration - Duration of deletion after given timespan + Duration *string `json:"duration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicDeleteOptionObjectTypeDeleteOption', 'ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption' + ObjectType ObjectTypeBasicDeleteOption `json:"objectType,omitempty"` +} + +func unmarshalBasicDeleteOption(body []byte) (BasicDeleteOption, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicDeleteOptionObjectTypeAbsoluteDeleteOption): + var ado AbsoluteDeleteOption + err := json.Unmarshal(body, &ado) + return ado, err + default: + var do DeleteOption + err := json.Unmarshal(body, &do) + return do, err + } +} +func unmarshalBasicDeleteOptionArray(body []byte) ([]BasicDeleteOption, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + doArray := make([]BasicDeleteOption, len(rawMessages)) + + for index, rawMessage := range rawMessages { + do, err := unmarshalBasicDeleteOption(*rawMessage) + if err != nil { + return nil, err + } + doArray[index] = do + } + return doArray, nil +} + +// MarshalJSON is the custom marshaler for DeleteOption. +func (do DeleteOption) MarshalJSON() ([]byte, error) { + do.ObjectType = ObjectTypeBasicDeleteOptionObjectTypeDeleteOption + objectMap := make(map[string]interface{}) + if do.Duration != nil { + objectMap["duration"] = do.Duration + } + if do.ObjectType != "" { + objectMap["objectType"] = do.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAbsoluteDeleteOption is the BasicDeleteOption implementation for DeleteOption. +func (do DeleteOption) AsAbsoluteDeleteOption() (*AbsoluteDeleteOption, bool) { + return nil, false +} + +// AsDeleteOption is the BasicDeleteOption implementation for DeleteOption. +func (do DeleteOption) AsDeleteOption() (*DeleteOption, bool) { + return &do, true +} + +// AsBasicDeleteOption is the BasicDeleteOption implementation for DeleteOption. +func (do DeleteOption) AsBasicDeleteOption() (BasicDeleteOption, bool) { + return &do, true +} + +// DppBaseResource base resource under Microsoft.DataProtection provider namespace +type DppBaseResource struct { + autorest.Response `json:"-"` + // 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"` +} + +// MarshalJSON is the custom marshaler for DppBaseResource. +func (dbr DppBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DppBaseResourceList base for all lists of V2 resources. +type DppBaseResourceList struct { + autorest.Response `json:"-"` + // Value - List of Dpp resources. + Value *[]DppBaseResource `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"` +} + +// DppBaseResourceListIterator provides access to a complete listing of DppBaseResource values. +type DppBaseResourceListIterator struct { + i int + page DppBaseResourceListPage +} + +// 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 *DppBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DppBaseResourceListIterator.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 *DppBaseResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DppBaseResourceListIterator) 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 DppBaseResourceListIterator) Response() DppBaseResourceList { + 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 DppBaseResourceListIterator) Value() DppBaseResource { + if !iter.page.NotDone() { + return DppBaseResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DppBaseResourceListIterator type. +func NewDppBaseResourceListIterator(page DppBaseResourceListPage) DppBaseResourceListIterator { + return DppBaseResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dbrl DppBaseResourceList) IsEmpty() bool { + return dbrl.Value == nil || len(*dbrl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dbrl DppBaseResourceList) hasNextLink() bool { + return dbrl.NextLink != nil && len(*dbrl.NextLink) != 0 +} + +// dppBaseResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dbrl DppBaseResourceList) dppBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !dbrl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dbrl.NextLink))) +} + +// DppBaseResourceListPage contains a page of DppBaseResource values. +type DppBaseResourceListPage struct { + fn func(context.Context, DppBaseResourceList) (DppBaseResourceList, error) + dbrl DppBaseResourceList +} + +// 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 *DppBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DppBaseResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dbrl) + if err != nil { + return err + } + page.dbrl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DppBaseResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DppBaseResourceListPage) NotDone() bool { + return !page.dbrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DppBaseResourceListPage) Response() DppBaseResourceList { + return page.dbrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DppBaseResourceListPage) Values() []DppBaseResource { + if page.dbrl.IsEmpty() { + return nil + } + return *page.dbrl.Value +} + +// Creates a new instance of the DppBaseResourceListPage type. +func NewDppBaseResourceListPage(cur DppBaseResourceList, getNextPage func(context.Context, DppBaseResourceList) (DppBaseResourceList, error)) DppBaseResourceListPage { + return DppBaseResourceListPage{ + fn: getNextPage, + dbrl: cur, + } +} + +// DppIdentityDetails identity details +type DppIdentityDetails struct { + // PrincipalID - READ-ONLY; The object ID of the service principal object for the managed identity that is used to grant role-based access to an Azure resource. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is now a member. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identityType which can be either SystemAssigned or None + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DppIdentityDetails. +func (did DppIdentityDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if did.Type != nil { + objectMap["type"] = did.Type + } + return json.Marshal(objectMap) +} + +// DppResource resource class +type DppResource 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"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for DppResource. +func (dr DppResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dr.SystemData != nil { + objectMap["systemData"] = dr.SystemData + } + return json.Marshal(objectMap) +} + +// DppResourceList listResource +type DppResourceList struct { + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// DppTrackedResource ... +type DppTrackedResource struct { + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Identity - Input Managed Identity Details + Identity *DppIdentityDetails `json:"identity,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for DppTrackedResource. +func (dtr DppTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dtr.ETag != nil { + objectMap["eTag"] = dtr.ETag + } + if dtr.Identity != nil { + objectMap["identity"] = dtr.Identity + } + if dtr.Location != nil { + objectMap["location"] = dtr.Location + } + if dtr.Tags != nil { + objectMap["tags"] = dtr.Tags + } + if dtr.SystemData != nil { + objectMap["systemData"] = dtr.SystemData + } + return json.Marshal(objectMap) +} + +// DppTrackedResourceList ... +type DppTrackedResourceList struct { + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// DppWorkerRequest ... +type DppWorkerRequest struct { + SubscriptionID *string `json:"subscriptionId,omitempty"` + URI *string `json:"uri,omitempty"` + Headers map[string][]string `json:"headers"` + SupportedGroupVersions *[]string `json:"supportedGroupVersions,omitempty"` + CultureInfo *string `json:"cultureInfo,omitempty"` + Parameters map[string]*string `json:"parameters"` + HTTPMethod *string `json:"httpMethod,omitempty"` +} + +// MarshalJSON is the custom marshaler for DppWorkerRequest. +func (dwr DppWorkerRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dwr.SubscriptionID != nil { + objectMap["subscriptionId"] = dwr.SubscriptionID + } + if dwr.URI != nil { + objectMap["uri"] = dwr.URI + } + if dwr.Headers != nil { + objectMap["headers"] = dwr.Headers + } + if dwr.SupportedGroupVersions != nil { + objectMap["supportedGroupVersions"] = dwr.SupportedGroupVersions + } + if dwr.CultureInfo != nil { + objectMap["cultureInfo"] = dwr.CultureInfo + } + if dwr.Parameters != nil { + objectMap["parameters"] = dwr.Parameters + } + if dwr.HTTPMethod != nil { + objectMap["httpMethod"] = dwr.HTTPMethod + } + return json.Marshal(objectMap) +} + +// Error the resource management error response. +type Error struct { + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]Error `json:"details,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` +} + +// MarshalJSON is the custom marshaler for Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExportJobsResult the result for export jobs containing blob details. +type ExportJobsResult struct { + autorest.Response `json:"-"` + // BlobURL - READ-ONLY; URL of the blob into which the serialized string of list of jobs is exported. + BlobURL *string `json:"blobUrl,omitempty"` + // BlobSasKey - READ-ONLY; SAS key to access the blob. + BlobSasKey *string `json:"blobSasKey,omitempty"` + // ExcelFileBlobURL - READ-ONLY; URL of the blob into which the ExcelFile is uploaded. + ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` + // ExcelFileBlobSasKey - READ-ONLY; SAS key to access the ExcelFile blob. + ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExportJobsResult. +func (ejr ExportJobsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExportJobsTriggerFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExportJobsTriggerFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExportJobsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExportJobsTriggerFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExportJobsTriggerFuture.Result. +func (future *ExportJobsTriggerFuture) result(client ExportJobsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ExportJobsTriggerFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("dataprotection.ExportJobsTriggerFuture") + return + } + ar.Response = future.Response() + return +} + +// FeatureValidationRequest base class for feature object +type FeatureValidationRequest struct { + // FeatureType - backup support feature type. Possible values include: 'FeatureTypeInvalid', 'FeatureTypeDataSourceType' + FeatureType FeatureType `json:"featureType,omitempty"` + // FeatureName - backup support feature name. + FeatureName *string `json:"featureName,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase', 'ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest' + ObjectType ObjectTypeBasicFeatureValidationRequestBase `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FeatureValidationRequest. +func (fvr FeatureValidationRequest) MarshalJSON() ([]byte, error) { + fvr.ObjectType = ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest + objectMap := make(map[string]interface{}) + if fvr.FeatureType != "" { + objectMap["featureType"] = fvr.FeatureType + } + if fvr.FeatureName != nil { + objectMap["featureName"] = fvr.FeatureName + } + if fvr.ObjectType != "" { + objectMap["objectType"] = fvr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsFeatureValidationRequest is the BasicFeatureValidationRequestBase implementation for FeatureValidationRequest. +func (fvr FeatureValidationRequest) AsFeatureValidationRequest() (*FeatureValidationRequest, bool) { + return &fvr, true +} + +// AsFeatureValidationRequestBase is the BasicFeatureValidationRequestBase implementation for FeatureValidationRequest. +func (fvr FeatureValidationRequest) AsFeatureValidationRequestBase() (*FeatureValidationRequestBase, bool) { + return nil, false +} + +// AsBasicFeatureValidationRequestBase is the BasicFeatureValidationRequestBase implementation for FeatureValidationRequest. +func (fvr FeatureValidationRequest) AsBasicFeatureValidationRequestBase() (BasicFeatureValidationRequestBase, bool) { + return &fvr, true +} + +// BasicFeatureValidationRequestBase base class for Backup Feature support +type BasicFeatureValidationRequestBase interface { + AsFeatureValidationRequest() (*FeatureValidationRequest, bool) + AsFeatureValidationRequestBase() (*FeatureValidationRequestBase, bool) +} + +// FeatureValidationRequestBase base class for Backup Feature support +type FeatureValidationRequestBase struct { + // ObjectType - Possible values include: 'ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase', 'ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest' + ObjectType ObjectTypeBasicFeatureValidationRequestBase `json:"objectType,omitempty"` +} + +func unmarshalBasicFeatureValidationRequestBase(body []byte) (BasicFeatureValidationRequestBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequest): + var fvr FeatureValidationRequest + err := json.Unmarshal(body, &fvr) + return fvr, err + default: + var fvrb FeatureValidationRequestBase + err := json.Unmarshal(body, &fvrb) + return fvrb, err + } +} +func unmarshalBasicFeatureValidationRequestBaseArray(body []byte) ([]BasicFeatureValidationRequestBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fvrbArray := make([]BasicFeatureValidationRequestBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fvrb, err := unmarshalBasicFeatureValidationRequestBase(*rawMessage) + if err != nil { + return nil, err + } + fvrbArray[index] = fvrb + } + return fvrbArray, nil +} + +// MarshalJSON is the custom marshaler for FeatureValidationRequestBase. +func (fvrb FeatureValidationRequestBase) MarshalJSON() ([]byte, error) { + fvrb.ObjectType = ObjectTypeBasicFeatureValidationRequestBaseObjectTypeFeatureValidationRequestBase + objectMap := make(map[string]interface{}) + if fvrb.ObjectType != "" { + objectMap["objectType"] = fvrb.ObjectType + } + return json.Marshal(objectMap) +} + +// AsFeatureValidationRequest is the BasicFeatureValidationRequestBase implementation for FeatureValidationRequestBase. +func (fvrb FeatureValidationRequestBase) AsFeatureValidationRequest() (*FeatureValidationRequest, bool) { + return nil, false +} + +// AsFeatureValidationRequestBase is the BasicFeatureValidationRequestBase implementation for FeatureValidationRequestBase. +func (fvrb FeatureValidationRequestBase) AsFeatureValidationRequestBase() (*FeatureValidationRequestBase, bool) { + return &fvrb, true +} + +// AsBasicFeatureValidationRequestBase is the BasicFeatureValidationRequestBase implementation for FeatureValidationRequestBase. +func (fvrb FeatureValidationRequestBase) AsBasicFeatureValidationRequestBase() (BasicFeatureValidationRequestBase, bool) { + return &fvrb, true +} + +// FeatureValidationResponse feature Validation Response +type FeatureValidationResponse struct { + // FeatureType - backup support feature type. Possible values include: 'FeatureTypeInvalid', 'FeatureTypeDataSourceType' + FeatureType FeatureType `json:"featureType,omitempty"` + // Features - Response features + Features *[]SupportedFeature `json:"features,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase', 'ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse' + ObjectType ObjectTypeBasicFeatureValidationResponseBase `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FeatureValidationResponse. +func (fvr FeatureValidationResponse) MarshalJSON() ([]byte, error) { + fvr.ObjectType = ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse + objectMap := make(map[string]interface{}) + if fvr.FeatureType != "" { + objectMap["featureType"] = fvr.FeatureType + } + if fvr.Features != nil { + objectMap["features"] = fvr.Features + } + if fvr.ObjectType != "" { + objectMap["objectType"] = fvr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsFeatureValidationResponse is the BasicFeatureValidationResponseBase implementation for FeatureValidationResponse. +func (fvr FeatureValidationResponse) AsFeatureValidationResponse() (*FeatureValidationResponse, bool) { + return &fvr, true +} + +// AsFeatureValidationResponseBase is the BasicFeatureValidationResponseBase implementation for FeatureValidationResponse. +func (fvr FeatureValidationResponse) AsFeatureValidationResponseBase() (*FeatureValidationResponseBase, bool) { + return nil, false +} + +// AsBasicFeatureValidationResponseBase is the BasicFeatureValidationResponseBase implementation for FeatureValidationResponse. +func (fvr FeatureValidationResponse) AsBasicFeatureValidationResponseBase() (BasicFeatureValidationResponseBase, bool) { + return &fvr, true +} + +// BasicFeatureValidationResponseBase base class for Backup Feature support +type BasicFeatureValidationResponseBase interface { + AsFeatureValidationResponse() (*FeatureValidationResponse, bool) + AsFeatureValidationResponseBase() (*FeatureValidationResponseBase, bool) +} + +// FeatureValidationResponseBase base class for Backup Feature support +type FeatureValidationResponseBase struct { + autorest.Response `json:"-"` + // ObjectType - Possible values include: 'ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase', 'ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse' + ObjectType ObjectTypeBasicFeatureValidationResponseBase `json:"objectType,omitempty"` +} + +func unmarshalBasicFeatureValidationResponseBase(body []byte) (BasicFeatureValidationResponseBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponse): + var fvr FeatureValidationResponse + err := json.Unmarshal(body, &fvr) + return fvr, err + default: + var fvrb FeatureValidationResponseBase + err := json.Unmarshal(body, &fvrb) + return fvrb, err + } +} +func unmarshalBasicFeatureValidationResponseBaseArray(body []byte) ([]BasicFeatureValidationResponseBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fvrbArray := make([]BasicFeatureValidationResponseBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fvrb, err := unmarshalBasicFeatureValidationResponseBase(*rawMessage) + if err != nil { + return nil, err + } + fvrbArray[index] = fvrb + } + return fvrbArray, nil +} + +// MarshalJSON is the custom marshaler for FeatureValidationResponseBase. +func (fvrb FeatureValidationResponseBase) MarshalJSON() ([]byte, error) { + fvrb.ObjectType = ObjectTypeBasicFeatureValidationResponseBaseObjectTypeFeatureValidationResponseBase + objectMap := make(map[string]interface{}) + if fvrb.ObjectType != "" { + objectMap["objectType"] = fvrb.ObjectType + } + return json.Marshal(objectMap) +} + +// AsFeatureValidationResponse is the BasicFeatureValidationResponseBase implementation for FeatureValidationResponseBase. +func (fvrb FeatureValidationResponseBase) AsFeatureValidationResponse() (*FeatureValidationResponse, bool) { + return nil, false +} + +// AsFeatureValidationResponseBase is the BasicFeatureValidationResponseBase implementation for FeatureValidationResponseBase. +func (fvrb FeatureValidationResponseBase) AsFeatureValidationResponseBase() (*FeatureValidationResponseBase, bool) { + return &fvrb, true +} + +// AsBasicFeatureValidationResponseBase is the BasicFeatureValidationResponseBase implementation for FeatureValidationResponseBase. +func (fvrb FeatureValidationResponseBase) AsBasicFeatureValidationResponseBase() (BasicFeatureValidationResponseBase, bool) { + return &fvrb, true +} + +// FeatureValidationResponseBaseModel ... +type FeatureValidationResponseBaseModel struct { + autorest.Response `json:"-"` + Value BasicFeatureValidationResponseBase `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for FeatureValidationResponseBaseModel struct. +func (fvrbm *FeatureValidationResponseBaseModel) UnmarshalJSON(body []byte) error { + fvrb, err := unmarshalBasicFeatureValidationResponseBase(body) + if err != nil { + return err + } + fvrbm.Value = fvrb + + return nil +} + +// ImmediateCopyOption immediate copy Option +type ImmediateCopyOption struct { + // ObjectType - Possible values include: 'ObjectTypeBasicCopyOptionObjectTypeCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeCopyOnExpiryOption', 'ObjectTypeBasicCopyOptionObjectTypeCustomCopyOption', 'ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption' + ObjectType ObjectTypeBasicCopyOption `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ImmediateCopyOption. +func (ico ImmediateCopyOption) MarshalJSON() ([]byte, error) { + ico.ObjectType = ObjectTypeBasicCopyOptionObjectTypeImmediateCopyOption + objectMap := make(map[string]interface{}) + if ico.ObjectType != "" { + objectMap["objectType"] = ico.ObjectType + } + return json.Marshal(objectMap) +} + +// AsCopyOnExpiryOption is the BasicCopyOption implementation for ImmediateCopyOption. +func (ico ImmediateCopyOption) AsCopyOnExpiryOption() (*CopyOnExpiryOption, bool) { + return nil, false +} + +// AsCustomCopyOption is the BasicCopyOption implementation for ImmediateCopyOption. +func (ico ImmediateCopyOption) AsCustomCopyOption() (*CustomCopyOption, bool) { + return nil, false +} + +// AsImmediateCopyOption is the BasicCopyOption implementation for ImmediateCopyOption. +func (ico ImmediateCopyOption) AsImmediateCopyOption() (*ImmediateCopyOption, bool) { + return &ico, true +} + +// AsCopyOption is the BasicCopyOption implementation for ImmediateCopyOption. +func (ico ImmediateCopyOption) AsCopyOption() (*CopyOption, bool) { + return nil, false +} + +// AsBasicCopyOption is the BasicCopyOption implementation for ImmediateCopyOption. +func (ico ImmediateCopyOption) AsBasicCopyOption() (BasicCopyOption, bool) { + return &ico, true +} + +// InnerError inner Error +type InnerError struct { + // AdditionalInfo - Any Key value pairs that can be provided to the client for additional verbose information. + AdditionalInfo map[string]*string `json:"additionalInfo"` + // Code - Unique code for this error + Code *string `json:"code,omitempty"` + // EmbeddedInnerError - Child Inner Error, to allow Nesting. + EmbeddedInnerError *InnerError `json:"embeddedInnerError,omitempty"` +} + +// MarshalJSON is the custom marshaler for InnerError. +func (ie InnerError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ie.AdditionalInfo != nil { + objectMap["additionalInfo"] = ie.AdditionalInfo + } + if ie.Code != nil { + objectMap["code"] = ie.Code + } + if ie.EmbeddedInnerError != nil { + objectMap["embeddedInnerError"] = ie.EmbeddedInnerError + } + return json.Marshal(objectMap) +} + +// BasicItemLevelRestoreCriteria class to contain criteria for item level restore +type BasicItemLevelRestoreCriteria interface { + AsRangeBasedItemLevelRestoreCriteria() (*RangeBasedItemLevelRestoreCriteria, bool) + AsItemLevelRestoreCriteria() (*ItemLevelRestoreCriteria, bool) +} + +// ItemLevelRestoreCriteria class to contain criteria for item level restore +type ItemLevelRestoreCriteria struct { + // ObjectType - Possible values include: 'ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria', 'ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria' + ObjectType ObjectTypeBasicItemLevelRestoreCriteria `json:"objectType,omitempty"` +} + +func unmarshalBasicItemLevelRestoreCriteria(body []byte) (BasicItemLevelRestoreCriteria, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria): + var rbilrc RangeBasedItemLevelRestoreCriteria + err := json.Unmarshal(body, &rbilrc) + return rbilrc, err + default: + var ilrc ItemLevelRestoreCriteria + err := json.Unmarshal(body, &ilrc) + return ilrc, err + } +} +func unmarshalBasicItemLevelRestoreCriteriaArray(body []byte) ([]BasicItemLevelRestoreCriteria, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ilrcArray := make([]BasicItemLevelRestoreCriteria, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ilrc, err := unmarshalBasicItemLevelRestoreCriteria(*rawMessage) + if err != nil { + return nil, err + } + ilrcArray[index] = ilrc + } + return ilrcArray, nil +} + +// MarshalJSON is the custom marshaler for ItemLevelRestoreCriteria. +func (ilrc ItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { + ilrc.ObjectType = ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria + objectMap := make(map[string]interface{}) + if ilrc.ObjectType != "" { + objectMap["objectType"] = ilrc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsRangeBasedItemLevelRestoreCriteria is the BasicItemLevelRestoreCriteria implementation for ItemLevelRestoreCriteria. +func (ilrc ItemLevelRestoreCriteria) AsRangeBasedItemLevelRestoreCriteria() (*RangeBasedItemLevelRestoreCriteria, bool) { + return nil, false +} + +// AsItemLevelRestoreCriteria is the BasicItemLevelRestoreCriteria implementation for ItemLevelRestoreCriteria. +func (ilrc ItemLevelRestoreCriteria) AsItemLevelRestoreCriteria() (*ItemLevelRestoreCriteria, bool) { + return &ilrc, true +} + +// AsBasicItemLevelRestoreCriteria is the BasicItemLevelRestoreCriteria implementation for ItemLevelRestoreCriteria. +func (ilrc ItemLevelRestoreCriteria) AsBasicItemLevelRestoreCriteria() (BasicItemLevelRestoreCriteria, bool) { + return &ilrc, true +} + +// ItemLevelRestoreTargetInfo restore target info for Item level restore operation +type ItemLevelRestoreTargetInfo struct { + // RestoreCriteria - Restore Criteria + RestoreCriteria *[]BasicItemLevelRestoreCriteria `json:"restoreCriteria,omitempty"` + // DatasourceInfo - Information of target DS + DatasourceInfo *Datasource `json:"datasourceInfo,omitempty"` + // DatasourceSetInfo - Information of target DS Set + DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` + // DatasourceAuthCredentials - Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials BasicAuthCredentials `json:"datasourceAuthCredentials,omitempty"` + // RecoveryOption - Recovery Option + RecoveryOption *string `json:"recoveryOption,omitempty"` + // RestoreLocation - Target Restore region + RestoreLocation *string `json:"restoreLocation,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo' + ObjectType ObjectTypeBasicRestoreTargetInfoBase `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ItemLevelRestoreTargetInfo. +func (ilrti ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { + ilrti.ObjectType = ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo + objectMap := make(map[string]interface{}) + if ilrti.RestoreCriteria != nil { + objectMap["restoreCriteria"] = ilrti.RestoreCriteria + } + if ilrti.DatasourceInfo != nil { + objectMap["datasourceInfo"] = ilrti.DatasourceInfo + } + if ilrti.DatasourceSetInfo != nil { + objectMap["datasourceSetInfo"] = ilrti.DatasourceSetInfo + } + objectMap["datasourceAuthCredentials"] = ilrti.DatasourceAuthCredentials + if ilrti.RecoveryOption != nil { + objectMap["recoveryOption"] = ilrti.RecoveryOption + } + if ilrti.RestoreLocation != nil { + objectMap["restoreLocation"] = ilrti.RestoreLocation + } + if ilrti.ObjectType != "" { + objectMap["objectType"] = ilrti.ObjectType + } + return json.Marshal(objectMap) +} + +// AsItemLevelRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for ItemLevelRestoreTargetInfo. +func (ilrti ItemLevelRestoreTargetInfo) AsItemLevelRestoreTargetInfo() (*ItemLevelRestoreTargetInfo, bool) { + return &ilrti, true +} + +// AsRestoreFilesTargetInfo is the BasicRestoreTargetInfoBase implementation for ItemLevelRestoreTargetInfo. +func (ilrti ItemLevelRestoreTargetInfo) AsRestoreFilesTargetInfo() (*RestoreFilesTargetInfo, bool) { + return nil, false +} + +// AsRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for ItemLevelRestoreTargetInfo. +func (ilrti ItemLevelRestoreTargetInfo) AsRestoreTargetInfo() (*RestoreTargetInfo, bool) { + return nil, false +} + +// AsRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for ItemLevelRestoreTargetInfo. +func (ilrti ItemLevelRestoreTargetInfo) AsRestoreTargetInfoBase() (*RestoreTargetInfoBase, bool) { + return nil, false +} + +// AsBasicRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for ItemLevelRestoreTargetInfo. +func (ilrti ItemLevelRestoreTargetInfo) AsBasicRestoreTargetInfoBase() (BasicRestoreTargetInfoBase, bool) { + return &ilrti, true +} + +// UnmarshalJSON is the custom unmarshaler for ItemLevelRestoreTargetInfo struct. +func (ilrti *ItemLevelRestoreTargetInfo) 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 "restoreCriteria": + if v != nil { + restoreCriteria, err := unmarshalBasicItemLevelRestoreCriteriaArray(*v) + if err != nil { + return err + } + ilrti.RestoreCriteria = &restoreCriteria + } + case "datasourceInfo": + if v != nil { + var datasourceInfo Datasource + err = json.Unmarshal(*v, &datasourceInfo) + if err != nil { + return err + } + ilrti.DatasourceInfo = &datasourceInfo + } + case "datasourceSetInfo": + if v != nil { + var datasourceSetInfo DatasourceSet + err = json.Unmarshal(*v, &datasourceSetInfo) + if err != nil { + return err + } + ilrti.DatasourceSetInfo = &datasourceSetInfo + } + case "datasourceAuthCredentials": + if v != nil { + datasourceAuthCredentials, err := unmarshalBasicAuthCredentials(*v) + if err != nil { + return err + } + ilrti.DatasourceAuthCredentials = datasourceAuthCredentials + } + case "recoveryOption": + if v != nil { + var recoveryOption string + err = json.Unmarshal(*v, &recoveryOption) + if err != nil { + return err + } + ilrti.RecoveryOption = &recoveryOption + } + case "restoreLocation": + if v != nil { + var restoreLocation string + err = json.Unmarshal(*v, &restoreLocation) + if err != nil { + return err + } + ilrti.RestoreLocation = &restoreLocation + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicRestoreTargetInfoBase + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + ilrti.ObjectType = objectType + } + } + } + + return nil +} + +// JobExtendedInfo extended Information about the job +type JobExtendedInfo struct { + // AdditionalDetails - Job's Additional Details + AdditionalDetails map[string]*string `json:"additionalDetails"` + // BackupInstanceState - READ-ONLY; State of the Backup Instance + BackupInstanceState *string `json:"backupInstanceState,omitempty"` + // DataTransferredInBytes - READ-ONLY; Number of bytes transferred + DataTransferredInBytes *float64 `json:"dataTransferredInBytes,omitempty"` + // RecoveryDestination - READ-ONLY; Destination where restore is done + RecoveryDestination *string `json:"recoveryDestination,omitempty"` + // SourceRecoverPoint - READ-ONLY; Details of the Source Recovery Point + SourceRecoverPoint *RestoreJobRecoveryPointDetails `json:"sourceRecoverPoint,omitempty"` + // SubTasks - READ-ONLY; List of Sub Tasks of the job + SubTasks *[]JobSubTask `json:"subTasks,omitempty"` + // TargetRecoverPoint - READ-ONLY; Details of the Target Recovery Point + TargetRecoverPoint *RestoreJobRecoveryPointDetails `json:"targetRecoverPoint,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobExtendedInfo. +func (jei JobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if jei.AdditionalDetails != nil { + objectMap["additionalDetails"] = jei.AdditionalDetails + } + return json.Marshal(objectMap) +} + +// JobSubTask details of Job's Sub Task +type JobSubTask struct { + // AdditionalDetails - Additional details of Sub Tasks + AdditionalDetails map[string]*string `json:"additionalDetails"` + // TaskID - Task Id of the Sub Task + TaskID *int32 `json:"taskId,omitempty"` + // TaskName - Name of the Sub Task + TaskName *string `json:"taskName,omitempty"` + // TaskProgress - READ-ONLY; Progress of the Sub Task + TaskProgress *string `json:"taskProgress,omitempty"` + // TaskStatus - Status of the Sub Task + TaskStatus *string `json:"taskStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobSubTask. +func (jst JobSubTask) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if jst.AdditionalDetails != nil { + objectMap["additionalDetails"] = jst.AdditionalDetails + } + if jst.TaskID != nil { + objectMap["taskId"] = jst.TaskID + } + if jst.TaskName != nil { + objectMap["taskName"] = jst.TaskName + } + if jst.TaskStatus != nil { + objectMap["taskStatus"] = jst.TaskStatus + } + return json.Marshal(objectMap) +} + +// BasicOperationExtendedInfo operation Extended Info +type BasicOperationExtendedInfo interface { + AsOperationJobExtendedInfo() (*OperationJobExtendedInfo, bool) + AsOperationExtendedInfo() (*OperationExtendedInfo, bool) +} + +// OperationExtendedInfo operation Extended Info +type OperationExtendedInfo struct { + // ObjectType - Possible values include: 'ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo', 'ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo' + ObjectType ObjectTypeBasicOperationExtendedInfo `json:"objectType,omitempty"` +} + +func unmarshalBasicOperationExtendedInfo(body []byte) (BasicOperationExtendedInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo): + var ojei OperationJobExtendedInfo + err := json.Unmarshal(body, &ojei) + return ojei, err + default: + var oei OperationExtendedInfo + err := json.Unmarshal(body, &oei) + return oei, err + } +} +func unmarshalBasicOperationExtendedInfoArray(body []byte) ([]BasicOperationExtendedInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oeiArray := make([]BasicOperationExtendedInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + oei, err := unmarshalBasicOperationExtendedInfo(*rawMessage) + if err != nil { + return nil, err + } + oeiArray[index] = oei + } + return oeiArray, nil +} + +// MarshalJSON is the custom marshaler for OperationExtendedInfo. +func (oei OperationExtendedInfo) MarshalJSON() ([]byte, error) { + oei.ObjectType = ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo + objectMap := make(map[string]interface{}) + if oei.ObjectType != "" { + objectMap["objectType"] = oei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationJobExtendedInfo is the BasicOperationExtendedInfo implementation for OperationExtendedInfo. +func (oei OperationExtendedInfo) AsOperationJobExtendedInfo() (*OperationJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationExtendedInfo is the BasicOperationExtendedInfo implementation for OperationExtendedInfo. +func (oei OperationExtendedInfo) AsOperationExtendedInfo() (*OperationExtendedInfo, bool) { + return &oei, true +} + +// AsBasicOperationExtendedInfo is the BasicOperationExtendedInfo implementation for OperationExtendedInfo. +func (oei OperationExtendedInfo) AsBasicOperationExtendedInfo() (BasicOperationExtendedInfo, bool) { + return &oei, true +} + +// OperationJobExtendedInfo operation Job Extended Info +type OperationJobExtendedInfo struct { + autorest.Response `json:"-"` + // JobID - Arm Id of the job created for this operation. + JobID *string `json:"jobId,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicOperationExtendedInfoObjectTypeOperationExtendedInfo', 'ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo' + ObjectType ObjectTypeBasicOperationExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationJobExtendedInfo. +func (ojei OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { + ojei.ObjectType = ObjectTypeBasicOperationExtendedInfoObjectTypeOperationJobExtendedInfo + objectMap := make(map[string]interface{}) + if ojei.JobID != nil { + objectMap["jobId"] = ojei.JobID + } + if ojei.ObjectType != "" { + objectMap["objectType"] = ojei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationJobExtendedInfo is the BasicOperationExtendedInfo implementation for OperationJobExtendedInfo. +func (ojei OperationJobExtendedInfo) AsOperationJobExtendedInfo() (*OperationJobExtendedInfo, bool) { + return &ojei, true +} + +// AsOperationExtendedInfo is the BasicOperationExtendedInfo implementation for OperationJobExtendedInfo. +func (ojei OperationJobExtendedInfo) AsOperationExtendedInfo() (*OperationExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationExtendedInfo is the BasicOperationExtendedInfo implementation for OperationJobExtendedInfo. +func (ojei OperationJobExtendedInfo) AsBasicOperationExtendedInfo() (BasicOperationExtendedInfo, bool) { + return &ojei, true +} + +// OperationResource operation Resource +type OperationResource struct { + autorest.Response `json:"-"` + // EndTime - End time of the operation + EndTime *date.Time `json:"endTime,omitempty"` + // Error - Required if status == failed or status == canceled. This is the OData v4 error format, used by the RPC and will go into the v2.2 Azure REST API guidelines. + // The full set of optional properties (e.g. inner errors / details) can be found in the "Error Response" section. + Error *Error `json:"error,omitempty"` + // ID - It should match what is used to GET the operation result + ID *string `json:"id,omitempty"` + // Name - It must match the last segment of the "id" field, and will typically be a GUID / system generated value + Name *string `json:"name,omitempty"` + // Properties - End time of the operation + Properties BasicOperationExtendedInfo `json:"properties,omitempty"` + // StartTime - Start time of the operation + StartTime *date.Time `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for OperationResource struct. +func (or *OperationResource) 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 "endTime": + if v != nil { + var endTime date.Time + err = json.Unmarshal(*v, &endTime) + if err != nil { + return err + } + or.EndTime = &endTime + } + case "error": + if v != nil { + var errorVar Error + err = json.Unmarshal(*v, &errorVar) + if err != nil { + return err + } + or.Error = &errorVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + or.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + or.Name = &name + } + case "properties": + if v != nil { + properties, err := unmarshalBasicOperationExtendedInfo(*v) + if err != nil { + return err + } + or.Properties = properties + } + case "startTime": + if v != nil { + var startTime date.Time + err = json.Unmarshal(*v, &startTime) + if err != nil { + return err + } + or.StartTime = &startTime + } + case "status": + if v != nil { + var status string + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + or.Status = &status + } + } + } + + return nil +} + +// PatchResourceRequestInput patch Request content for Microsoft.DataProtection resources +type PatchResourceRequestInput struct { + // Identity - Input Managed Identity Details + Identity *DppIdentityDetails `json:"identity,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for PatchResourceRequestInput. +func (prri PatchResourceRequestInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if prri.Identity != nil { + objectMap["identity"] = prri.Identity + } + if prri.Tags != nil { + objectMap["tags"] = prri.Tags + } + return json.Marshal(objectMap) +} + +// PolicyInfo policy Info in backupInstance +type PolicyInfo struct { + PolicyID *string `json:"policyId,omitempty"` + // PolicyVersion - READ-ONLY + PolicyVersion *string `json:"policyVersion,omitempty"` + // PolicyParameters - Policy parameters for the backup instance + PolicyParameters *PolicyParameters `json:"policyParameters,omitempty"` +} + +// MarshalJSON is the custom marshaler for PolicyInfo. +func (pi PolicyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pi.PolicyID != nil { + objectMap["policyId"] = pi.PolicyID + } + if pi.PolicyParameters != nil { + objectMap["policyParameters"] = pi.PolicyParameters + } + return json.Marshal(objectMap) +} + +// PolicyParameters parameters in Policy +type PolicyParameters struct { + // DataStoreParametersList - Gets or sets the DataStore Parameters + DataStoreParametersList *[]BasicDataStoreParameters `json:"dataStoreParametersList,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PolicyParameters struct. +func (pp *PolicyParameters) 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 "dataStoreParametersList": + if v != nil { + dataStoreParametersList, err := unmarshalBasicDataStoreParametersArray(*v) + if err != nil { + return err + } + pp.DataStoreParametersList = &dataStoreParametersList + } + } + } + + return nil +} + +// ProtectionStatusDetails protection status details +type ProtectionStatusDetails struct { + // ErrorDetails - Specifies the protection status error of the resource + ErrorDetails *UserFacingError `json:"errorDetails,omitempty"` + // Status - Specifies the protection status of the resource. Possible values include: 'StatusConfiguringProtection', 'StatusConfiguringProtectionFailed', 'StatusProtectionConfigured', 'StatusProtectionStopped', 'StatusSoftDeleted', 'StatusSoftDeleting' + Status Status `json:"status,omitempty"` +} + +// RangeBasedItemLevelRestoreCriteria item Level target info for restore operation +type RangeBasedItemLevelRestoreCriteria struct { + // MinMatchingValue - minimum value for range prefix match + MinMatchingValue *string `json:"minMatchingValue,omitempty"` + // MaxMatchingValue - maximum value for range prefix match + MaxMatchingValue *string `json:"maxMatchingValue,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeItemLevelRestoreCriteria', 'ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria' + ObjectType ObjectTypeBasicItemLevelRestoreCriteria `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RangeBasedItemLevelRestoreCriteria. +func (rbilrc RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { + rbilrc.ObjectType = ObjectTypeBasicItemLevelRestoreCriteriaObjectTypeRangeBasedItemLevelRestoreCriteria + objectMap := make(map[string]interface{}) + if rbilrc.MinMatchingValue != nil { + objectMap["minMatchingValue"] = rbilrc.MinMatchingValue + } + if rbilrc.MaxMatchingValue != nil { + objectMap["maxMatchingValue"] = rbilrc.MaxMatchingValue + } + if rbilrc.ObjectType != "" { + objectMap["objectType"] = rbilrc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsRangeBasedItemLevelRestoreCriteria is the BasicItemLevelRestoreCriteria implementation for RangeBasedItemLevelRestoreCriteria. +func (rbilrc RangeBasedItemLevelRestoreCriteria) AsRangeBasedItemLevelRestoreCriteria() (*RangeBasedItemLevelRestoreCriteria, bool) { + return &rbilrc, true +} + +// AsItemLevelRestoreCriteria is the BasicItemLevelRestoreCriteria implementation for RangeBasedItemLevelRestoreCriteria. +func (rbilrc RangeBasedItemLevelRestoreCriteria) AsItemLevelRestoreCriteria() (*ItemLevelRestoreCriteria, bool) { + return nil, false +} + +// AsBasicItemLevelRestoreCriteria is the BasicItemLevelRestoreCriteria implementation for RangeBasedItemLevelRestoreCriteria. +func (rbilrc RangeBasedItemLevelRestoreCriteria) AsBasicItemLevelRestoreCriteria() (BasicItemLevelRestoreCriteria, bool) { + return &rbilrc, true +} + +// RecoveryPointDataStoreDetails recoveryPoint datastore details +type RecoveryPointDataStoreDetails struct { + CreationTime *date.Time `json:"creationTime,omitempty"` + ExpiryTime *date.Time `json:"expiryTime,omitempty"` + ID *string `json:"id,omitempty"` + MetaData *string `json:"metaData,omitempty"` + State *string `json:"state,omitempty"` + Type *string `json:"type,omitempty"` + Visible *bool `json:"visible,omitempty"` + // RehydrationExpiryTime - READ-ONLY + RehydrationExpiryTime *date.Time `json:"rehydrationExpiryTime,omitempty"` + // RehydrationStatus - READ-ONLY; Possible values include: 'RehydrationStatusCREATEINPROGRESS', 'RehydrationStatusCOMPLETED', 'RehydrationStatusDELETEINPROGRESS', 'RehydrationStatusDELETED', 'RehydrationStatusFAILED' + RehydrationStatus RehydrationStatus `json:"rehydrationStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPointDataStoreDetails. +func (rpdsd RecoveryPointDataStoreDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpdsd.CreationTime != nil { + objectMap["creationTime"] = rpdsd.CreationTime + } + if rpdsd.ExpiryTime != nil { + objectMap["expiryTime"] = rpdsd.ExpiryTime + } + if rpdsd.ID != nil { + objectMap["id"] = rpdsd.ID + } + if rpdsd.MetaData != nil { + objectMap["metaData"] = rpdsd.MetaData + } + if rpdsd.State != nil { + objectMap["state"] = rpdsd.State + } + if rpdsd.Type != nil { + objectMap["type"] = rpdsd.Type + } + if rpdsd.Visible != nil { + objectMap["visible"] = rpdsd.Visible + } + return json.Marshal(objectMap) +} + +// RecoveryPointsFilters ... +type RecoveryPointsFilters struct { + RestorePointDataStoreID *string `json:"restorePointDataStoreId,omitempty"` + IsVisible *bool `json:"isVisible,omitempty"` + StartDate *string `json:"startDate,omitempty"` + EndDate *string `json:"endDate,omitempty"` + ExtendedInfo *bool `json:"extendedInfo,omitempty"` + RestorePointState *string `json:"restorePointState,omitempty"` +} + +// ResourceGuard ... +type ResourceGuard struct { + // ProvisioningState - READ-ONLY; Provisioning state of the BackupVault resource. Possible values include: 'ProvisioningStateFailed', 'ProvisioningStateProvisioning', 'ProvisioningStateSucceeded', 'ProvisioningStateUnknown', 'ProvisioningStateUpdating' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // AllowAutoApprovals - READ-ONLY; This flag indicates whether auto approval is allowed or not. + AllowAutoApprovals *bool `json:"allowAutoApprovals,omitempty"` + // ResourceGuardOperations - READ-ONLY; {readonly} List of operation details those are protected by the ResourceGuard resource + ResourceGuardOperations *[]ResourceGuardOperation `json:"resourceGuardOperations,omitempty"` + // VaultCriticalOperationExclusionList - READ-ONLY; List of critical operations which are not protected by this resourceGuard + VaultCriticalOperationExclusionList *[]string `json:"vaultCriticalOperationExclusionList,omitempty"` + // Description - READ-ONLY; Description about the pre-req steps to perform all the critical operations. + Description *string `json:"description,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceGuard. +func (rg ResourceGuard) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceGuardOperation this class contains all the details about a critical operation. +type ResourceGuardOperation struct { + // VaultCriticalOperation - READ-ONLY; Name of the critical operation. + VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty"` + // RequestResourceType - READ-ONLY; Type of resource request. + RequestResourceType *string `json:"requestResourceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceGuardOperation. +func (rgo ResourceGuardOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceGuardResource ... +type ResourceGuardResource struct { + autorest.Response `json:"-"` + // Properties - ResourceGuardResource properties + Properties *ResourceGuard `json:"properties,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Identity - Input Managed Identity Details + Identity *DppIdentityDetails `json:"identity,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceGuardResource. +func (rgr ResourceGuardResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rgr.Properties != nil { + objectMap["properties"] = rgr.Properties + } + if rgr.ETag != nil { + objectMap["eTag"] = rgr.ETag + } + if rgr.Identity != nil { + objectMap["identity"] = rgr.Identity + } + if rgr.Location != nil { + objectMap["location"] = rgr.Location + } + if rgr.Tags != nil { + objectMap["tags"] = rgr.Tags + } + if rgr.SystemData != nil { + objectMap["systemData"] = rgr.SystemData + } + return json.Marshal(objectMap) +} + +// ResourceGuardResourceList list of ResourceGuard resources +type ResourceGuardResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ResourceGuardResource `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"` +} + +// ResourceGuardResourceListIterator provides access to a complete listing of ResourceGuardResource values. +type ResourceGuardResourceListIterator struct { + i int + page ResourceGuardResourceListPage +} + +// 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 *ResourceGuardResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardResourceListIterator.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 *ResourceGuardResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceGuardResourceListIterator) 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 ResourceGuardResourceListIterator) Response() ResourceGuardResourceList { + 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 ResourceGuardResourceListIterator) Value() ResourceGuardResource { + if !iter.page.NotDone() { + return ResourceGuardResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceGuardResourceListIterator type. +func NewResourceGuardResourceListIterator(page ResourceGuardResourceListPage) ResourceGuardResourceListIterator { + return ResourceGuardResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rgrl ResourceGuardResourceList) IsEmpty() bool { + return rgrl.Value == nil || len(*rgrl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rgrl ResourceGuardResourceList) hasNextLink() bool { + return rgrl.NextLink != nil && len(*rgrl.NextLink) != 0 +} + +// resourceGuardResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rgrl ResourceGuardResourceList) resourceGuardResourceListPreparer(ctx context.Context) (*http.Request, error) { + if !rgrl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rgrl.NextLink))) +} + +// ResourceGuardResourceListPage contains a page of ResourceGuardResource values. +type ResourceGuardResourceListPage struct { + fn func(context.Context, ResourceGuardResourceList) (ResourceGuardResourceList, error) + rgrl ResourceGuardResourceList +} + +// 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 *ResourceGuardResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rgrl) + if err != nil { + return err + } + page.rgrl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ResourceGuardResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceGuardResourceListPage) NotDone() bool { + return !page.rgrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceGuardResourceListPage) Response() ResourceGuardResourceList { + return page.rgrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceGuardResourceListPage) Values() []ResourceGuardResource { + if page.rgrl.IsEmpty() { + return nil + } + return *page.rgrl.Value +} + +// Creates a new instance of the ResourceGuardResourceListPage type. +func NewResourceGuardResourceListPage(cur ResourceGuardResourceList, getNextPage func(context.Context, ResourceGuardResourceList) (ResourceGuardResourceList, error)) ResourceGuardResourceListPage { + return ResourceGuardResourceListPage{ + fn: getNextPage, + rgrl: cur, + } +} + +// ResourceMoveDetails resourceMoveDetails will be returned in response to GetResource call from ARM +type ResourceMoveDetails struct { + // OperationID - CorrelationId of latest ResourceMove operation attempted + OperationID *string `json:"operationId,omitempty"` + // StartTimeUtc - Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format. + StartTimeUtc *string `json:"startTimeUtc,omitempty"` + // CompletionTimeUtc - Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format. + CompletionTimeUtc *string `json:"completionTimeUtc,omitempty"` + // SourceResourcePath - ARM resource path of source resource + SourceResourcePath *string `json:"sourceResourcePath,omitempty"` + // TargetResourcePath - ARM resource path of target resource used in latest ResourceMove operation + TargetResourcePath *string `json:"targetResourcePath,omitempty"` +} + +// RestorableTimeRange ... +type RestorableTimeRange struct { + // StartTime - Start time for the available restore range + StartTime *string `json:"startTime,omitempty"` + // EndTime - End time for the available restore range + EndTime *string `json:"endTime,omitempty"` + ObjectType *string `json:"objectType,omitempty"` +} + +// RestoreFilesTargetInfo class encapsulating restore as files target parameters +type RestoreFilesTargetInfo struct { + // TargetDetails - Destination of RestoreAsFiles operation, when destination is not a datasource + TargetDetails *TargetDetails `json:"targetDetails,omitempty"` + // RecoveryOption - Recovery Option + RecoveryOption *string `json:"recoveryOption,omitempty"` + // RestoreLocation - Target Restore region + RestoreLocation *string `json:"restoreLocation,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo' + ObjectType ObjectTypeBasicRestoreTargetInfoBase `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestoreFilesTargetInfo. +func (rfti RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { + rfti.ObjectType = ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo + objectMap := make(map[string]interface{}) + if rfti.TargetDetails != nil { + objectMap["targetDetails"] = rfti.TargetDetails + } + if rfti.RecoveryOption != nil { + objectMap["recoveryOption"] = rfti.RecoveryOption + } + if rfti.RestoreLocation != nil { + objectMap["restoreLocation"] = rfti.RestoreLocation + } + if rfti.ObjectType != "" { + objectMap["objectType"] = rfti.ObjectType + } + return json.Marshal(objectMap) +} + +// AsItemLevelRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreFilesTargetInfo. +func (rfti RestoreFilesTargetInfo) AsItemLevelRestoreTargetInfo() (*ItemLevelRestoreTargetInfo, bool) { + return nil, false +} + +// AsRestoreFilesTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreFilesTargetInfo. +func (rfti RestoreFilesTargetInfo) AsRestoreFilesTargetInfo() (*RestoreFilesTargetInfo, bool) { + return &rfti, true +} + +// AsRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreFilesTargetInfo. +func (rfti RestoreFilesTargetInfo) AsRestoreTargetInfo() (*RestoreTargetInfo, bool) { + return nil, false +} + +// AsRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for RestoreFilesTargetInfo. +func (rfti RestoreFilesTargetInfo) AsRestoreTargetInfoBase() (*RestoreTargetInfoBase, bool) { + return nil, false +} + +// AsBasicRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for RestoreFilesTargetInfo. +func (rfti RestoreFilesTargetInfo) AsBasicRestoreTargetInfoBase() (BasicRestoreTargetInfoBase, bool) { + return &rfti, true +} + +// RestoreJobRecoveryPointDetails ... +type RestoreJobRecoveryPointDetails struct { + RecoveryPointID *string `json:"recoveryPointID,omitempty"` + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` +} + +// RestoreTargetInfo class encapsulating restore target parameters +type RestoreTargetInfo struct { + // DatasourceInfo - Information of target DS + DatasourceInfo *Datasource `json:"datasourceInfo,omitempty"` + // DatasourceSetInfo - Information of target DS Set + DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` + // DatasourceAuthCredentials - Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials BasicAuthCredentials `json:"datasourceAuthCredentials,omitempty"` + // RecoveryOption - Recovery Option + RecoveryOption *string `json:"recoveryOption,omitempty"` + // RestoreLocation - Target Restore region + RestoreLocation *string `json:"restoreLocation,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo' + ObjectType ObjectTypeBasicRestoreTargetInfoBase `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestoreTargetInfo. +func (rti RestoreTargetInfo) MarshalJSON() ([]byte, error) { + rti.ObjectType = ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo + objectMap := make(map[string]interface{}) + if rti.DatasourceInfo != nil { + objectMap["datasourceInfo"] = rti.DatasourceInfo + } + if rti.DatasourceSetInfo != nil { + objectMap["datasourceSetInfo"] = rti.DatasourceSetInfo + } + objectMap["datasourceAuthCredentials"] = rti.DatasourceAuthCredentials + if rti.RecoveryOption != nil { + objectMap["recoveryOption"] = rti.RecoveryOption + } + if rti.RestoreLocation != nil { + objectMap["restoreLocation"] = rti.RestoreLocation + } + if rti.ObjectType != "" { + objectMap["objectType"] = rti.ObjectType + } + return json.Marshal(objectMap) +} + +// AsItemLevelRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfo. +func (rti RestoreTargetInfo) AsItemLevelRestoreTargetInfo() (*ItemLevelRestoreTargetInfo, bool) { + return nil, false +} + +// AsRestoreFilesTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfo. +func (rti RestoreTargetInfo) AsRestoreFilesTargetInfo() (*RestoreFilesTargetInfo, bool) { + return nil, false +} + +// AsRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfo. +func (rti RestoreTargetInfo) AsRestoreTargetInfo() (*RestoreTargetInfo, bool) { + return &rti, true +} + +// AsRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfo. +func (rti RestoreTargetInfo) AsRestoreTargetInfoBase() (*RestoreTargetInfoBase, bool) { + return nil, false +} + +// AsBasicRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfo. +func (rti RestoreTargetInfo) AsBasicRestoreTargetInfoBase() (BasicRestoreTargetInfoBase, bool) { + return &rti, true +} + +// UnmarshalJSON is the custom unmarshaler for RestoreTargetInfo struct. +func (rti *RestoreTargetInfo) 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 "datasourceInfo": + if v != nil { + var datasourceInfo Datasource + err = json.Unmarshal(*v, &datasourceInfo) + if err != nil { + return err + } + rti.DatasourceInfo = &datasourceInfo + } + case "datasourceSetInfo": + if v != nil { + var datasourceSetInfo DatasourceSet + err = json.Unmarshal(*v, &datasourceSetInfo) + if err != nil { + return err + } + rti.DatasourceSetInfo = &datasourceSetInfo + } + case "datasourceAuthCredentials": + if v != nil { + datasourceAuthCredentials, err := unmarshalBasicAuthCredentials(*v) + if err != nil { + return err + } + rti.DatasourceAuthCredentials = datasourceAuthCredentials + } + case "recoveryOption": + if v != nil { + var recoveryOption string + err = json.Unmarshal(*v, &recoveryOption) + if err != nil { + return err + } + rti.RecoveryOption = &recoveryOption + } + case "restoreLocation": + if v != nil { + var restoreLocation string + err = json.Unmarshal(*v, &restoreLocation) + if err != nil { + return err + } + rti.RestoreLocation = &restoreLocation + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicRestoreTargetInfoBase + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + rti.ObjectType = objectType + } + } + } + + return nil +} + +// BasicRestoreTargetInfoBase base class common to RestoreTargetInfo and RestoreFilesTargetInfo +type BasicRestoreTargetInfoBase interface { + AsItemLevelRestoreTargetInfo() (*ItemLevelRestoreTargetInfo, bool) + AsRestoreFilesTargetInfo() (*RestoreFilesTargetInfo, bool) + AsRestoreTargetInfo() (*RestoreTargetInfo, bool) + AsRestoreTargetInfoBase() (*RestoreTargetInfoBase, bool) +} + +// RestoreTargetInfoBase base class common to RestoreTargetInfo and RestoreFilesTargetInfo +type RestoreTargetInfoBase struct { + // RecoveryOption - Recovery Option + RecoveryOption *string `json:"recoveryOption,omitempty"` + // RestoreLocation - Target Restore region + RestoreLocation *string `json:"restoreLocation,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo', 'ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo' + ObjectType ObjectTypeBasicRestoreTargetInfoBase `json:"objectType,omitempty"` +} + +func unmarshalBasicRestoreTargetInfoBase(body []byte) (BasicRestoreTargetInfoBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicRestoreTargetInfoBaseObjectTypeItemLevelRestoreTargetInfo): + var ilrti ItemLevelRestoreTargetInfo + err := json.Unmarshal(body, &ilrti) + return ilrti, err + case string(ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreFilesTargetInfo): + var rfti RestoreFilesTargetInfo + err := json.Unmarshal(body, &rfti) + return rfti, err + case string(ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfo): + var rti RestoreTargetInfo + err := json.Unmarshal(body, &rti) + return rti, err + default: + var rtib RestoreTargetInfoBase + err := json.Unmarshal(body, &rtib) + return rtib, err + } +} +func unmarshalBasicRestoreTargetInfoBaseArray(body []byte) ([]BasicRestoreTargetInfoBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rtibArray := make([]BasicRestoreTargetInfoBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rtib, err := unmarshalBasicRestoreTargetInfoBase(*rawMessage) + if err != nil { + return nil, err + } + rtibArray[index] = rtib + } + return rtibArray, nil +} + +// MarshalJSON is the custom marshaler for RestoreTargetInfoBase. +func (rtib RestoreTargetInfoBase) MarshalJSON() ([]byte, error) { + rtib.ObjectType = ObjectTypeBasicRestoreTargetInfoBaseObjectTypeRestoreTargetInfoBase + objectMap := make(map[string]interface{}) + if rtib.RecoveryOption != nil { + objectMap["recoveryOption"] = rtib.RecoveryOption + } + if rtib.RestoreLocation != nil { + objectMap["restoreLocation"] = rtib.RestoreLocation + } + if rtib.ObjectType != "" { + objectMap["objectType"] = rtib.ObjectType + } + return json.Marshal(objectMap) +} + +// AsItemLevelRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfoBase. +func (rtib RestoreTargetInfoBase) AsItemLevelRestoreTargetInfo() (*ItemLevelRestoreTargetInfo, bool) { + return nil, false +} + +// AsRestoreFilesTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfoBase. +func (rtib RestoreTargetInfoBase) AsRestoreFilesTargetInfo() (*RestoreFilesTargetInfo, bool) { + return nil, false +} + +// AsRestoreTargetInfo is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfoBase. +func (rtib RestoreTargetInfoBase) AsRestoreTargetInfo() (*RestoreTargetInfo, bool) { + return nil, false +} + +// AsRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfoBase. +func (rtib RestoreTargetInfoBase) AsRestoreTargetInfoBase() (*RestoreTargetInfoBase, bool) { + return &rtib, true +} + +// AsBasicRestoreTargetInfoBase is the BasicRestoreTargetInfoBase implementation for RestoreTargetInfoBase. +func (rtib RestoreTargetInfoBase) AsBasicRestoreTargetInfoBase() (BasicRestoreTargetInfoBase, bool) { + return &rtib, true +} + +// RetentionTag retention tag +type RetentionTag struct { + // ETag - READ-ONLY; Retention Tag version. + ETag *string `json:"eTag,omitempty"` + // ID - READ-ONLY; Retention Tag version. + ID *string `json:"id,omitempty"` + // TagName - Retention Tag Name to relate it to retention rule. + TagName *string `json:"tagName,omitempty"` +} + +// MarshalJSON is the custom marshaler for RetentionTag. +func (rt RetentionTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rt.TagName != nil { + objectMap["tagName"] = rt.TagName + } + return json.Marshal(objectMap) +} + +// ScheduleBasedBackupCriteria schedule based backup criteria +type ScheduleBasedBackupCriteria struct { + // AbsoluteCriteria - it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" + // and should be part of AbsoluteMarker enum + AbsoluteCriteria *[]AbsoluteMarker `json:"absoluteCriteria,omitempty"` + // DaysOfMonth - This is day of the month from 1 to 28 other wise last of month + DaysOfMonth *[]Day `json:"daysOfMonth,omitempty"` + // DaysOfTheWeek - It should be Sunday/Monday/T..../Saturday + DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` + // MonthsOfYear - It should be January/February/....../December + MonthsOfYear *[]Month `json:"monthsOfYear,omitempty"` + // ScheduleTimes - List of schedule times for backup + ScheduleTimes *[]date.Time `json:"scheduleTimes,omitempty"` + // WeeksOfTheMonth - It should be First/Second/Third/Fourth/Last + WeeksOfTheMonth *[]WeekNumber `json:"weeksOfTheMonth,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicBackupCriteriaObjectTypeBackupCriteria', 'ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria' + ObjectType ObjectTypeBasicBackupCriteria `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ScheduleBasedBackupCriteria. +func (sbbc ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { + sbbc.ObjectType = ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria + objectMap := make(map[string]interface{}) + if sbbc.AbsoluteCriteria != nil { + objectMap["absoluteCriteria"] = sbbc.AbsoluteCriteria + } + if sbbc.DaysOfMonth != nil { + objectMap["daysOfMonth"] = sbbc.DaysOfMonth + } + if sbbc.DaysOfTheWeek != nil { + objectMap["daysOfTheWeek"] = sbbc.DaysOfTheWeek + } + if sbbc.MonthsOfYear != nil { + objectMap["monthsOfYear"] = sbbc.MonthsOfYear + } + if sbbc.ScheduleTimes != nil { + objectMap["scheduleTimes"] = sbbc.ScheduleTimes + } + if sbbc.WeeksOfTheMonth != nil { + objectMap["weeksOfTheMonth"] = sbbc.WeeksOfTheMonth + } + if sbbc.ObjectType != "" { + objectMap["objectType"] = sbbc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsScheduleBasedBackupCriteria is the BasicBackupCriteria implementation for ScheduleBasedBackupCriteria. +func (sbbc ScheduleBasedBackupCriteria) AsScheduleBasedBackupCriteria() (*ScheduleBasedBackupCriteria, bool) { + return &sbbc, true +} + +// AsBackupCriteria is the BasicBackupCriteria implementation for ScheduleBasedBackupCriteria. +func (sbbc ScheduleBasedBackupCriteria) AsBackupCriteria() (*BackupCriteria, bool) { + return nil, false +} + +// AsBasicBackupCriteria is the BasicBackupCriteria implementation for ScheduleBasedBackupCriteria. +func (sbbc ScheduleBasedBackupCriteria) AsBasicBackupCriteria() (BasicBackupCriteria, bool) { + return &sbbc, true +} + +// ScheduleBasedTriggerContext schedule based trigger context +type ScheduleBasedTriggerContext struct { + // Schedule - Schedule for this backup + Schedule *BackupSchedule `json:"schedule,omitempty"` + // TaggingCriteria - List of tags that can be applicable for given schedule. + TaggingCriteria *[]TaggingCriteria `json:"taggingCriteria,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBasicTriggerContextObjectTypeTriggerContext', 'ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext', 'ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext' + ObjectType ObjectTypeBasicTriggerContext `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ScheduleBasedTriggerContext. +func (sbtc ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { + sbtc.ObjectType = ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext + objectMap := make(map[string]interface{}) + if sbtc.Schedule != nil { + objectMap["schedule"] = sbtc.Schedule + } + if sbtc.TaggingCriteria != nil { + objectMap["taggingCriteria"] = sbtc.TaggingCriteria + } + if sbtc.ObjectType != "" { + objectMap["objectType"] = sbtc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAdhocBasedTriggerContext is the BasicTriggerContext implementation for ScheduleBasedTriggerContext. +func (sbtc ScheduleBasedTriggerContext) AsAdhocBasedTriggerContext() (*AdhocBasedTriggerContext, bool) { + return nil, false +} + +// AsScheduleBasedTriggerContext is the BasicTriggerContext implementation for ScheduleBasedTriggerContext. +func (sbtc ScheduleBasedTriggerContext) AsScheduleBasedTriggerContext() (*ScheduleBasedTriggerContext, bool) { + return &sbtc, true +} + +// AsTriggerContext is the BasicTriggerContext implementation for ScheduleBasedTriggerContext. +func (sbtc ScheduleBasedTriggerContext) AsTriggerContext() (*TriggerContext, bool) { + return nil, false +} + +// AsBasicTriggerContext is the BasicTriggerContext implementation for ScheduleBasedTriggerContext. +func (sbtc ScheduleBasedTriggerContext) AsBasicTriggerContext() (BasicTriggerContext, bool) { + return &sbtc, true +} + +// SecretStoreBasedAuthCredentials secret store based authentication credentials. +type SecretStoreBasedAuthCredentials struct { + // SecretStoreResource - Secret store resource + SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeAuthCredentials', 'ObjectTypeSecretStoreBasedAuthCredentials' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecretStoreBasedAuthCredentials. +func (ssbac SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { + ssbac.ObjectType = ObjectTypeSecretStoreBasedAuthCredentials + objectMap := make(map[string]interface{}) + if ssbac.SecretStoreResource != nil { + objectMap["secretStoreResource"] = ssbac.SecretStoreResource + } + if ssbac.ObjectType != "" { + objectMap["objectType"] = ssbac.ObjectType + } + return json.Marshal(objectMap) +} + +// AsSecretStoreBasedAuthCredentials is the BasicAuthCredentials implementation for SecretStoreBasedAuthCredentials. +func (ssbac SecretStoreBasedAuthCredentials) AsSecretStoreBasedAuthCredentials() (*SecretStoreBasedAuthCredentials, bool) { + return &ssbac, true +} + +// AsAuthCredentials is the BasicAuthCredentials implementation for SecretStoreBasedAuthCredentials. +func (ssbac SecretStoreBasedAuthCredentials) AsAuthCredentials() (*AuthCredentials, bool) { + return nil, false +} + +// AsBasicAuthCredentials is the BasicAuthCredentials implementation for SecretStoreBasedAuthCredentials. +func (ssbac SecretStoreBasedAuthCredentials) AsBasicAuthCredentials() (BasicAuthCredentials, bool) { + return &ssbac, true +} + +// SecretStoreResource class representing a secret store resource. +type SecretStoreResource struct { + // URI - Uri to get to the resource + URI *string `json:"uri,omitempty"` + // SecretStoreType - Gets or sets the type of secret store. Possible values include: 'SecretStoreTypeInvalid', 'SecretStoreTypeAzureKeyVault' + SecretStoreType SecretStoreType `json:"secretStoreType,omitempty"` +} + +// SourceLifeCycle source LifeCycle +type SourceLifeCycle struct { + DeleteAfter BasicDeleteOption `json:"deleteAfter,omitempty"` + SourceDataStore *DataStoreInfoBase `json:"sourceDataStore,omitempty"` + TargetDataStoreCopySettings *[]TargetCopySetting `json:"targetDataStoreCopySettings,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SourceLifeCycle struct. +func (slc *SourceLifeCycle) 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 "deleteAfter": + if v != nil { + deleteAfter, err := unmarshalBasicDeleteOption(*v) + if err != nil { + return err + } + slc.DeleteAfter = deleteAfter + } + case "sourceDataStore": + if v != nil { + var sourceDataStore DataStoreInfoBase + err = json.Unmarshal(*v, &sourceDataStore) + if err != nil { + return err + } + slc.SourceDataStore = &sourceDataStore + } + case "targetDataStoreCopySettings": + if v != nil { + var targetDataStoreCopySettings []TargetCopySetting + err = json.Unmarshal(*v, &targetDataStoreCopySettings) + if err != nil { + return err + } + slc.TargetDataStoreCopySettings = &targetDataStoreCopySettings + } + } + } + + return nil +} + +// StorageSetting storage setting +type StorageSetting struct { + // DatastoreType - Gets or sets the type of the datastore. Possible values include: 'StorageSettingStoreTypesArchiveStore', 'StorageSettingStoreTypesSnapshotStore', 'StorageSettingStoreTypesVaultStore' + DatastoreType StorageSettingStoreTypes `json:"datastoreType,omitempty"` + // Type - Gets or sets the type. Possible values include: 'StorageSettingTypesGeoRedundant', 'StorageSettingTypesLocallyRedundant' + Type StorageSettingTypes `json:"type,omitempty"` +} + +// SupportedFeature elements class for feature request +type SupportedFeature struct { + // FeatureName - support feature type. + FeatureName *string `json:"featureName,omitempty"` + // SupportStatus - feature support status. Possible values include: 'FeatureSupportStatusInvalid', 'FeatureSupportStatusNotSupported', 'FeatureSupportStatusAlphaPreview', 'FeatureSupportStatusPrivatePreview', 'FeatureSupportStatusPublicPreview', 'FeatureSupportStatusGenerallyAvailable' + SupportStatus FeatureSupportStatus `json:"supportStatus,omitempty"` + // ExposureControlledFeatures - support feature type. + ExposureControlledFeatures *[]string `json:"exposureControlledFeatures,omitempty"` +} + +// SystemData metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + CreatedByType CreatedByType `json:"createdByType,omitempty"` + // CreatedAt - The timestamp of resource creation (UTC). + CreatedAt *date.Time `json:"createdAt,omitempty"` + // LastModifiedBy - The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` + // LastModifiedAt - The type of identity that last modified the resource. + LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` +} + +// TaggingCriteria tagging criteria +type TaggingCriteria struct { + // Criteria - Criteria which decides whether the tag can be applied to a triggered backup. + Criteria *[]BasicBackupCriteria `json:"criteria,omitempty"` + // IsDefault - Specifies if tag is default. + IsDefault *bool `json:"isDefault,omitempty"` + // TaggingPriority - Retention Tag priority. + TaggingPriority *int64 `json:"taggingPriority,omitempty"` + // TagInfo - Retention tag information + TagInfo *RetentionTag `json:"tagInfo,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TaggingCriteria struct. +func (tc *TaggingCriteria) 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 "criteria": + if v != nil { + criteria, err := unmarshalBasicBackupCriteriaArray(*v) + if err != nil { + return err + } + tc.Criteria = &criteria + } + case "isDefault": + if v != nil { + var isDefault bool + err = json.Unmarshal(*v, &isDefault) + if err != nil { + return err + } + tc.IsDefault = &isDefault + } + case "taggingPriority": + if v != nil { + var taggingPriority int64 + err = json.Unmarshal(*v, &taggingPriority) + if err != nil { + return err + } + tc.TaggingPriority = &taggingPriority + } + case "tagInfo": + if v != nil { + var tagInfo RetentionTag + err = json.Unmarshal(*v, &tagInfo) + if err != nil { + return err + } + tc.TagInfo = &tagInfo + } + } + } + + return nil +} + +// TargetCopySetting target copy settings +type TargetCopySetting struct { + // CopyAfter - It can be CustomCopyOption or ImmediateCopyOption. + CopyAfter BasicCopyOption `json:"copyAfter,omitempty"` + // DataStore - Info of target datastore + DataStore *DataStoreInfoBase `json:"dataStore,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TargetCopySetting struct. +func (tcs *TargetCopySetting) 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 "copyAfter": + if v != nil { + copyAfter, err := unmarshalBasicCopyOption(*v) + if err != nil { + return err + } + tcs.CopyAfter = copyAfter + } + case "dataStore": + if v != nil { + var dataStore DataStoreInfoBase + err = json.Unmarshal(*v, &dataStore) + if err != nil { + return err + } + tcs.DataStore = &dataStore + } + } + } + + return nil +} + +// TargetDetails class encapsulating target details, used where the destination is not a datasource +type TargetDetails struct { + // FilePrefix - Restore operation may create multiple files inside location pointed by Url + // Below will be the common prefix for all of them + FilePrefix *string `json:"filePrefix,omitempty"` + // RestoreTargetLocationType - Denotes the target location where the data will be restored, + // string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. Possible values include: 'RestoreTargetLocationTypeInvalid', 'RestoreTargetLocationTypeAzureBlobs', 'RestoreTargetLocationTypeAzureFiles' + RestoreTargetLocationType RestoreTargetLocationType `json:"restoreTargetLocationType,omitempty"` + // URL - Url denoting the restore destination. It can point to container / file share etc + URL *string `json:"url,omitempty"` +} + +// TriggerBackupRequest trigger backup request +type TriggerBackupRequest struct { + // BackupRuleOptions - Name for the Rule of the Policy which needs to be applied for this backup + BackupRuleOptions *AdHocBackupRuleOptions `json:"backupRuleOptions,omitempty"` +} + +// BasicTriggerContext trigger context +type BasicTriggerContext interface { + AsAdhocBasedTriggerContext() (*AdhocBasedTriggerContext, bool) + AsScheduleBasedTriggerContext() (*ScheduleBasedTriggerContext, bool) + AsTriggerContext() (*TriggerContext, bool) +} + +// TriggerContext trigger context +type TriggerContext struct { + // ObjectType - Possible values include: 'ObjectTypeBasicTriggerContextObjectTypeTriggerContext', 'ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext', 'ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext' + ObjectType ObjectTypeBasicTriggerContext `json:"objectType,omitempty"` +} + +func unmarshalBasicTriggerContext(body []byte) (BasicTriggerContext, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeBasicTriggerContextObjectTypeAdhocBasedTriggerContext): + var abtc AdhocBasedTriggerContext + err := json.Unmarshal(body, &abtc) + return abtc, err + case string(ObjectTypeBasicTriggerContextObjectTypeScheduleBasedTriggerContext): + var sbtc ScheduleBasedTriggerContext + err := json.Unmarshal(body, &sbtc) + return sbtc, err + default: + var tc TriggerContext + err := json.Unmarshal(body, &tc) + return tc, err + } +} +func unmarshalBasicTriggerContextArray(body []byte) ([]BasicTriggerContext, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + tcArray := make([]BasicTriggerContext, len(rawMessages)) + + for index, rawMessage := range rawMessages { + tc, err := unmarshalBasicTriggerContext(*rawMessage) + if err != nil { + return nil, err + } + tcArray[index] = tc + } + return tcArray, nil +} + +// MarshalJSON is the custom marshaler for TriggerContext. +func (tc TriggerContext) MarshalJSON() ([]byte, error) { + tc.ObjectType = ObjectTypeBasicTriggerContextObjectTypeTriggerContext + objectMap := make(map[string]interface{}) + if tc.ObjectType != "" { + objectMap["objectType"] = tc.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAdhocBasedTriggerContext is the BasicTriggerContext implementation for TriggerContext. +func (tc TriggerContext) AsAdhocBasedTriggerContext() (*AdhocBasedTriggerContext, bool) { + return nil, false +} + +// AsScheduleBasedTriggerContext is the BasicTriggerContext implementation for TriggerContext. +func (tc TriggerContext) AsScheduleBasedTriggerContext() (*ScheduleBasedTriggerContext, bool) { + return nil, false +} + +// AsTriggerContext is the BasicTriggerContext implementation for TriggerContext. +func (tc TriggerContext) AsTriggerContext() (*TriggerContext, bool) { + return &tc, true +} + +// AsBasicTriggerContext is the BasicTriggerContext implementation for TriggerContext. +func (tc TriggerContext) AsBasicTriggerContext() (BasicTriggerContext, bool) { + return &tc, true +} + +// UserFacingError error object used by layers that have access to localized content, and propagate that to +// user +type UserFacingError struct { + // Code - Unique code for this error + Code *string `json:"code,omitempty"` + // Details - Additional related Errors + Details *[]UserFacingError `json:"details,omitempty"` + // InnerError - Inner Error + InnerError *InnerError `json:"innerError,omitempty"` + // IsRetryable - Whether the operation will be retryable or not + IsRetryable *bool `json:"isRetryable,omitempty"` + // IsUserError - Whether the operation is due to a user error or service error + IsUserError *bool `json:"isUserError,omitempty"` + // Properties - Any key value pairs that can be injected inside error object + Properties map[string]*string `json:"properties"` + Message *string `json:"message,omitempty"` + // RecommendedAction - RecommendedAction � localized. + RecommendedAction *[]string `json:"recommendedAction,omitempty"` + // Target - Target of the error. + Target *string `json:"target,omitempty"` +} + +// MarshalJSON is the custom marshaler for UserFacingError. +func (ufe UserFacingError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ufe.Code != nil { + objectMap["code"] = ufe.Code + } + if ufe.Details != nil { + objectMap["details"] = ufe.Details + } + if ufe.InnerError != nil { + objectMap["innerError"] = ufe.InnerError + } + if ufe.IsRetryable != nil { + objectMap["isRetryable"] = ufe.IsRetryable + } + if ufe.IsUserError != nil { + objectMap["isUserError"] = ufe.IsUserError + } + if ufe.Properties != nil { + objectMap["properties"] = ufe.Properties + } + if ufe.Message != nil { + objectMap["message"] = ufe.Message + } + if ufe.RecommendedAction != nil { + objectMap["recommendedAction"] = ufe.RecommendedAction + } + if ufe.Target != nil { + objectMap["target"] = ufe.Target + } + return json.Marshal(objectMap) +} + +// ValidateForBackupRequest validate for backup request +type ValidateForBackupRequest struct { + BackupInstance *BackupInstance `json:"backupInstance,omitempty"` +} + +// ValidateRestoreRequestObject validate restore request object +type ValidateRestoreRequestObject struct { + // RestoreRequestObject - Gets or sets the restore request object. + RestoreRequestObject BasicAzureBackupRestoreRequest `json:"restoreRequestObject,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ValidateRestoreRequestObject struct. +func (vrro *ValidateRestoreRequestObject) 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 "restoreRequestObject": + if v != nil { + restoreRequestObject, err := unmarshalBasicAzureBackupRestoreRequest(*v) + if err != nil { + return err + } + vrro.RestoreRequestObject = restoreRequestObject + } + } + } + + return nil +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/operationresult.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/operationresult.go new file mode 100644 index 000000000000..bcce43b586be --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/operationresult.go @@ -0,0 +1,104 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// OperationResultClient is the open API 2.0 Specs for Azure Data Protection service +type OperationResultClient struct { + BaseClient +} + +// NewOperationResultClient creates an instance of the OperationResultClient client. +func NewOperationResultClient(subscriptionID string) OperationResultClient { + return NewOperationResultClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationResultClientWithBaseURI creates an instance of the OperationResultClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationResultClientWithBaseURI(baseURI string, subscriptionID string) OperationResultClient { + return OperationResultClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the operation result for a resource +func (client OperationResultClient) Get(ctx context.Context, operationID string, location string) (result OperationJobExtendedInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationResultClient.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, operationID, location) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.OperationResultClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.OperationResultClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.OperationResultClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client OperationResultClient) GetPreparer(ctx context.Context, operationID string, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "operationId": autorest.Encode("path", operationID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/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 OperationResultClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OperationResultClient) GetResponder(resp *http.Response) (result OperationJobExtendedInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/operations.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/operations.go similarity index 69% rename from services/securityinsight/mgmt/v1.0/securityinsight/operations.go rename to services/dataprotection/mgmt/2021-07-01/dataprotection/operations.go index a9d92aec855b..a06ff8b34c88 100644 --- a/services/securityinsight/mgmt/v1.0/securityinsight/operations.go +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/operations.go @@ -1,4 +1,4 @@ -package securityinsight +package dataprotection // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +14,7 @@ import ( "net/http" ) -// OperationsClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider +// OperationsClient is the open API 2.0 Specs for Azure Data Protection service type OperationsClient struct { BaseClient } @@ -30,14 +30,14 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all operations available Azure Security Insights Resource Provider. -func (client OperationsClient) List(ctx context.Context) (result OperationsListPage, err error) { +// 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.ol.Response.Response != nil { - sc = result.ol.Response.Response.StatusCode + if result.cdr.Response.Response != nil { + sc = result.cdr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -45,23 +45,23 @@ func (client OperationsClient) List(ctx context.Context) (result OperationsListP result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.OperationsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "dataprotection.OperationsClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { - result.ol.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.OperationsClient", "List", resp, "Failure sending request") + result.cdr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.OperationsClient", "List", resp, "Failure sending request") return } - result.ol, err = client.ListResponder(resp) + result.cdr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.OperationsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "dataprotection.OperationsClient", "List", resp, "Failure responding to request") return } - if result.ol.hasNextLink() && result.ol.IsEmpty() { + if result.cdr.hasNextLink() && result.cdr.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -71,7 +71,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationsListP // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-01-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -79,7 +79,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.SecurityInsights/operations"), + autorest.WithPath("/providers/Microsoft.DataProtection/operations"), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -92,7 +92,7 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsList, err error) { +func (client OperationsClient) ListResponder(resp *http.Response) (result ClientDiscoveryResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -103,10 +103,10 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat } // listNextResults retrieves the next set of results, if any. -func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationsList) (result OperationsList, err error) { - req, err := lastResults.operationsListPreparer(ctx) +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, "securityinsight.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "dataprotection.OperationsClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -114,17 +114,17 @@ func (client OperationsClient) listNextResults(ctx context.Context, lastResults resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "securityinsight.OperationsClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "dataprotection.OperationsClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "dataprotection.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 OperationsListIterator, err error) { +func (client OperationsClient) ListComplete(ctx context.Context) (result ClientDiscoveryResponseIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") defer func() { diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/operationstatus.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/operationstatus.go new file mode 100644 index 000000000000..833b6be41cb7 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/operationstatus.go @@ -0,0 +1,104 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// OperationStatusClient is the open API 2.0 Specs for Azure Data Protection service +type OperationStatusClient struct { + BaseClient +} + +// NewOperationStatusClient creates an instance of the OperationStatusClient client. +func NewOperationStatusClient(subscriptionID string) OperationStatusClient { + return NewOperationStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationStatusClientWithBaseURI creates an instance of the OperationStatusClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusClient { + return OperationStatusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get sends the get request. +func (client OperationStatusClient) Get(ctx context.Context, location string, operationID string) (result OperationResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationStatusClient.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, location, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.OperationStatusClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.OperationStatusClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.OperationStatusClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client OperationStatusClient) GetPreparer(ctx context.Context, location string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "operationId": autorest.Encode("path", operationID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{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 OperationStatusClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OperationStatusClient) GetResponder(resp *http.Response) (result OperationResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/recoverypoints.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/recoverypoints.go new file mode 100644 index 000000000000..52ff6fe96f04 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/recoverypoints.go @@ -0,0 +1,238 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 open API 2.0 Specs for Azure Data Protection service +type RecoveryPointsClient struct { + BaseClient +} + +// NewRecoveryPointsClient creates an instance of the RecoveryPointsClient client. +func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient { + return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointsClient { + return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a Recovery Point using recoveryPointId for a Datasource. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +func (client RecoveryPointsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, recoveryPointID string) (result AzureBackupRecoveryPointResource, 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, vaultName, resourceGroupName, backupInstanceName, recoveryPointID) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.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, "dataprotection.RecoveryPointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.RecoveryPointsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RecoveryPointsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, recoveryPointID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}", 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) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RecoveryPointsClient) GetResponder(resp *http.Response) (result AzureBackupRecoveryPointResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns a list of Recovery Points for a DataSource in a vault. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client RecoveryPointsClient) List(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, filter string, skipToken string) (result AzureBackupRecoveryPointResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointsClient.List") + defer func() { + sc := -1 + if result.abrprl.Response.Response != nil { + sc = result.abrprl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, backupInstanceName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.RecoveryPointsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.abrprl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.RecoveryPointsClient", "List", resp, "Failure sending request") + return + } + + result.abrprl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.RecoveryPointsClient", "List", resp, "Failure responding to request") + return + } + if result.abrprl.hasNextLink() && result.abrprl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client RecoveryPointsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints", 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 RecoveryPointsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RecoveryPointsClient) ListResponder(resp *http.Response) (result AzureBackupRecoveryPointResourceList, err error) { + err = autorest.Respond( + resp, + 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 RecoveryPointsClient) listNextResults(ctx context.Context, lastResults AzureBackupRecoveryPointResourceList) (result AzureBackupRecoveryPointResourceList, err error) { + req, err := lastResults.azureBackupRecoveryPointResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.RecoveryPointsClient", "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, "dataprotection.RecoveryPointsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.RecoveryPointsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RecoveryPointsClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, filter string, skipToken string) (result AzureBackupRecoveryPointResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointsClient.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, backupInstanceName, filter, skipToken) + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/resourceguards.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/resourceguards.go new file mode 100644 index 000000000000..f88344d3e0b1 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/resourceguards.go @@ -0,0 +1,1729 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ResourceGuardsClient is the open API 2.0 Specs for Azure Data Protection service +type ResourceGuardsClient struct { + BaseClient +} + +// NewResourceGuardsClient creates an instance of the ResourceGuardsClient client. +func NewResourceGuardsClient(subscriptionID string) ResourceGuardsClient { + return NewResourceGuardsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceGuardsClientWithBaseURI creates an instance of the ResourceGuardsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewResourceGuardsClientWithBaseURI(baseURI string, subscriptionID string) ResourceGuardsClient { + return ResourceGuardsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete sends the delete request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// resourceGuardsName - the name of ResourceGuard +func (client ResourceGuardsClient) Delete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ResourceGuardsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}", 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 ResourceGuardsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get sends the get request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// resourceGuardsName - the name of ResourceGuard +func (client ResourceGuardsClient) Get(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result ResourceGuardResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.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, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ResourceGuardsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}", 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 ResourceGuardsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetResponder(resp *http.Response) (result ResourceGuardResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetBackupSecurityPINRequestsObjects sends the get backup security pin requests objects request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetBackupSecurityPINRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetBackupSecurityPINRequestsObjects") + defer func() { + sc := -1 + if result.dbrl.Response.Response != nil { + sc = result.dbrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getBackupSecurityPINRequestsObjectsNextResults + req, err := client.GetBackupSecurityPINRequestsObjectsPreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetBackupSecurityPINRequestsObjects", nil, "Failure preparing request") + return + } + + resp, err := client.GetBackupSecurityPINRequestsObjectsSender(req) + if err != nil { + result.dbrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetBackupSecurityPINRequestsObjects", resp, "Failure sending request") + return + } + + result.dbrl, err = client.GetBackupSecurityPINRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetBackupSecurityPINRequestsObjects", resp, "Failure responding to request") + return + } + if result.dbrl.hasNextLink() && result.dbrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetBackupSecurityPINRequestsObjectsPreparer prepares the GetBackupSecurityPINRequestsObjects request. +func (client ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBackupSecurityPINRequestsObjectsSender sends the GetBackupSecurityPINRequestsObjects request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetBackupSecurityPINRequestsObjectsResponder handles the response to the GetBackupSecurityPINRequestsObjects request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsResponder(resp *http.Response) (result DppBaseResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getBackupSecurityPINRequestsObjectsNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getBackupSecurityPINRequestsObjectsNextResults(ctx context.Context, lastResults DppBaseResourceList) (result DppBaseResourceList, err error) { + req, err := lastResults.dppBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getBackupSecurityPINRequestsObjectsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetBackupSecurityPINRequestsObjectsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getBackupSecurityPINRequestsObjectsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetBackupSecurityPINRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getBackupSecurityPINRequestsObjectsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetBackupSecurityPINRequestsObjectsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetBackupSecurityPINRequestsObjects") + 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.GetBackupSecurityPINRequestsObjects(ctx, resourceGroupName, resourceGuardsName) + return +} + +// GetDefaultBackupSecurityPINRequestsObject sends the get default backup security pin requests object request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result DppBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetDefaultBackupSecurityPINRequestsObjectPreparer(ctx, resourceGroupName, resourceGuardsName, requestName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultBackupSecurityPINRequestsObject", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultBackupSecurityPINRequestsObjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultBackupSecurityPINRequestsObject", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultBackupSecurityPINRequestsObjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultBackupSecurityPINRequestsObject", resp, "Failure responding to request") + return + } + + return +} + +// GetDefaultBackupSecurityPINRequestsObjectPreparer prepares the GetDefaultBackupSecurityPINRequestsObject request. +func (client ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObjectPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestName": autorest.Encode("path", requestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDefaultBackupSecurityPINRequestsObjectSender sends the GetDefaultBackupSecurityPINRequestsObject request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObjectSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDefaultBackupSecurityPINRequestsObjectResponder handles the response to the GetDefaultBackupSecurityPINRequestsObject request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObjectResponder(resp *http.Response) (result DppBaseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDefaultDeleteProtectedItemRequestsObject sends the get default delete protected item requests object request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result DppBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetDefaultDeleteProtectedItemRequestsObjectPreparer(ctx, resourceGroupName, resourceGuardsName, requestName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDeleteProtectedItemRequestsObject", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultDeleteProtectedItemRequestsObjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDeleteProtectedItemRequestsObject", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultDeleteProtectedItemRequestsObjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDeleteProtectedItemRequestsObject", resp, "Failure responding to request") + return + } + + return +} + +// GetDefaultDeleteProtectedItemRequestsObjectPreparer prepares the GetDefaultDeleteProtectedItemRequestsObject request. +func (client ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObjectPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestName": autorest.Encode("path", requestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDefaultDeleteProtectedItemRequestsObjectSender sends the GetDefaultDeleteProtectedItemRequestsObject request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObjectSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDefaultDeleteProtectedItemRequestsObjectResponder handles the response to the GetDefaultDeleteProtectedItemRequestsObject request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObjectResponder(resp *http.Response) (result DppBaseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDefaultDeleteResourceGuardProxyRequestsObject sends the get default delete resource guard proxy requests object +// request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result DppBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetDefaultDeleteResourceGuardProxyRequestsObjectPreparer(ctx, resourceGroupName, resourceGuardsName, requestName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDeleteResourceGuardProxyRequestsObject", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultDeleteResourceGuardProxyRequestsObjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDeleteResourceGuardProxyRequestsObject", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultDeleteResourceGuardProxyRequestsObjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDeleteResourceGuardProxyRequestsObject", resp, "Failure responding to request") + return + } + + return +} + +// GetDefaultDeleteResourceGuardProxyRequestsObjectPreparer prepares the GetDefaultDeleteResourceGuardProxyRequestsObject request. +func (client ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObjectPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestName": autorest.Encode("path", requestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDefaultDeleteResourceGuardProxyRequestsObjectSender sends the GetDefaultDeleteResourceGuardProxyRequestsObject request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObjectSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDefaultDeleteResourceGuardProxyRequestsObjectResponder handles the response to the GetDefaultDeleteResourceGuardProxyRequestsObject request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObjectResponder(resp *http.Response) (result DppBaseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDefaultDisableSoftDeleteRequestsObject sends the get default disable soft delete requests object request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result DppBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetDefaultDisableSoftDeleteRequestsObjectPreparer(ctx, resourceGroupName, resourceGuardsName, requestName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDisableSoftDeleteRequestsObject", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultDisableSoftDeleteRequestsObjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDisableSoftDeleteRequestsObject", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultDisableSoftDeleteRequestsObjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultDisableSoftDeleteRequestsObject", resp, "Failure responding to request") + return + } + + return +} + +// GetDefaultDisableSoftDeleteRequestsObjectPreparer prepares the GetDefaultDisableSoftDeleteRequestsObject request. +func (client ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObjectPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestName": autorest.Encode("path", requestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDefaultDisableSoftDeleteRequestsObjectSender sends the GetDefaultDisableSoftDeleteRequestsObject request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObjectSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDefaultDisableSoftDeleteRequestsObjectResponder handles the response to the GetDefaultDisableSoftDeleteRequestsObject request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObjectResponder(resp *http.Response) (result DppBaseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDefaultUpdateProtectedItemRequestsObject sends the get default update protected item requests object request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result DppBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetDefaultUpdateProtectedItemRequestsObjectPreparer(ctx, resourceGroupName, resourceGuardsName, requestName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultUpdateProtectedItemRequestsObject", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultUpdateProtectedItemRequestsObjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultUpdateProtectedItemRequestsObject", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultUpdateProtectedItemRequestsObjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultUpdateProtectedItemRequestsObject", resp, "Failure responding to request") + return + } + + return +} + +// GetDefaultUpdateProtectedItemRequestsObjectPreparer prepares the GetDefaultUpdateProtectedItemRequestsObject request. +func (client ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObjectPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestName": autorest.Encode("path", requestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDefaultUpdateProtectedItemRequestsObjectSender sends the GetDefaultUpdateProtectedItemRequestsObject request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObjectSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDefaultUpdateProtectedItemRequestsObjectResponder handles the response to the GetDefaultUpdateProtectedItemRequestsObject request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObjectResponder(resp *http.Response) (result DppBaseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDefaultUpdateProtectionPolicyRequestsObject sends the get default update protection policy requests object +// request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (result DppBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetDefaultUpdateProtectionPolicyRequestsObjectPreparer(ctx, resourceGroupName, resourceGuardsName, requestName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultUpdateProtectionPolicyRequestsObject", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultUpdateProtectionPolicyRequestsObjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultUpdateProtectionPolicyRequestsObject", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultUpdateProtectionPolicyRequestsObjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDefaultUpdateProtectionPolicyRequestsObject", resp, "Failure responding to request") + return + } + + return +} + +// GetDefaultUpdateProtectionPolicyRequestsObjectPreparer prepares the GetDefaultUpdateProtectionPolicyRequestsObject request. +func (client ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObjectPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestName": autorest.Encode("path", requestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDefaultUpdateProtectionPolicyRequestsObjectSender sends the GetDefaultUpdateProtectionPolicyRequestsObject request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObjectSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDefaultUpdateProtectionPolicyRequestsObjectResponder handles the response to the GetDefaultUpdateProtectionPolicyRequestsObject request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObjectResponder(resp *http.Response) (result DppBaseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeleteProtectedItemRequestsObjects sends the get delete protected item requests objects request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDeleteProtectedItemRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects") + defer func() { + sc := -1 + if result.dbrl.Response.Response != nil { + sc = result.dbrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getDeleteProtectedItemRequestsObjectsNextResults + req, err := client.GetDeleteProtectedItemRequestsObjectsPreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDeleteProtectedItemRequestsObjects", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeleteProtectedItemRequestsObjectsSender(req) + if err != nil { + result.dbrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDeleteProtectedItemRequestsObjects", resp, "Failure sending request") + return + } + + result.dbrl, err = client.GetDeleteProtectedItemRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDeleteProtectedItemRequestsObjects", resp, "Failure responding to request") + return + } + if result.dbrl.hasNextLink() && result.dbrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetDeleteProtectedItemRequestsObjectsPreparer prepares the GetDeleteProtectedItemRequestsObjects request. +func (client ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeleteProtectedItemRequestsObjectsSender sends the GetDeleteProtectedItemRequestsObjects request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDeleteProtectedItemRequestsObjectsResponder handles the response to the GetDeleteProtectedItemRequestsObjects request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsResponder(resp *http.Response) (result DppBaseResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getDeleteProtectedItemRequestsObjectsNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsNextResults(ctx context.Context, lastResults DppBaseResourceList) (result DppBaseResourceList, err error) { + req, err := lastResults.dppBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDeleteProtectedItemRequestsObjectsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetDeleteProtectedItemRequestsObjectsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDeleteProtectedItemRequestsObjectsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetDeleteProtectedItemRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDeleteProtectedItemRequestsObjectsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetDeleteProtectedItemRequestsObjectsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects") + 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.GetDeleteProtectedItemRequestsObjects(ctx, resourceGroupName, resourceGuardsName) + return +} + +// GetDeleteResourceGuardProxyRequestsObjects sends the get delete resource guard proxy requests objects request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects") + defer func() { + sc := -1 + if result.dbrl.Response.Response != nil { + sc = result.dbrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getDeleteResourceGuardProxyRequestsObjectsNextResults + req, err := client.GetDeleteResourceGuardProxyRequestsObjectsPreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDeleteResourceGuardProxyRequestsObjects", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeleteResourceGuardProxyRequestsObjectsSender(req) + if err != nil { + result.dbrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDeleteResourceGuardProxyRequestsObjects", resp, "Failure sending request") + return + } + + result.dbrl, err = client.GetDeleteResourceGuardProxyRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDeleteResourceGuardProxyRequestsObjects", resp, "Failure responding to request") + return + } + if result.dbrl.hasNextLink() && result.dbrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetDeleteResourceGuardProxyRequestsObjectsPreparer prepares the GetDeleteResourceGuardProxyRequestsObjects request. +func (client ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeleteResourceGuardProxyRequestsObjectsSender sends the GetDeleteResourceGuardProxyRequestsObjects request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDeleteResourceGuardProxyRequestsObjectsResponder handles the response to the GetDeleteResourceGuardProxyRequestsObjects request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsResponder(resp *http.Response) (result DppBaseResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getDeleteResourceGuardProxyRequestsObjectsNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsNextResults(ctx context.Context, lastResults DppBaseResourceList) (result DppBaseResourceList, err error) { + req, err := lastResults.dppBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDeleteResourceGuardProxyRequestsObjectsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetDeleteResourceGuardProxyRequestsObjectsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDeleteResourceGuardProxyRequestsObjectsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetDeleteResourceGuardProxyRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDeleteResourceGuardProxyRequestsObjectsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetDeleteResourceGuardProxyRequestsObjectsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects") + 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.GetDeleteResourceGuardProxyRequestsObjects(ctx, resourceGroupName, resourceGuardsName) + return +} + +// GetDisableSoftDeleteRequestsObjects sends the get disable soft delete requests objects request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetDisableSoftDeleteRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects") + defer func() { + sc := -1 + if result.dbrl.Response.Response != nil { + sc = result.dbrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getDisableSoftDeleteRequestsObjectsNextResults + req, err := client.GetDisableSoftDeleteRequestsObjectsPreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDisableSoftDeleteRequestsObjects", nil, "Failure preparing request") + return + } + + resp, err := client.GetDisableSoftDeleteRequestsObjectsSender(req) + if err != nil { + result.dbrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDisableSoftDeleteRequestsObjects", resp, "Failure sending request") + return + } + + result.dbrl, err = client.GetDisableSoftDeleteRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetDisableSoftDeleteRequestsObjects", resp, "Failure responding to request") + return + } + if result.dbrl.hasNextLink() && result.dbrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetDisableSoftDeleteRequestsObjectsPreparer prepares the GetDisableSoftDeleteRequestsObjects request. +func (client ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDisableSoftDeleteRequestsObjectsSender sends the GetDisableSoftDeleteRequestsObjects request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetDisableSoftDeleteRequestsObjectsResponder handles the response to the GetDisableSoftDeleteRequestsObjects request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsResponder(resp *http.Response) (result DppBaseResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getDisableSoftDeleteRequestsObjectsNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsNextResults(ctx context.Context, lastResults DppBaseResourceList) (result DppBaseResourceList, err error) { + req, err := lastResults.dppBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDisableSoftDeleteRequestsObjectsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetDisableSoftDeleteRequestsObjectsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDisableSoftDeleteRequestsObjectsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetDisableSoftDeleteRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getDisableSoftDeleteRequestsObjectsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetDisableSoftDeleteRequestsObjectsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects") + 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.GetDisableSoftDeleteRequestsObjects(ctx, resourceGroupName, resourceGuardsName) + return +} + +// GetResourcesInResourceGroup sends the get resources in resource group request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetResourcesInResourceGroup(ctx context.Context, resourceGroupName string) (result ResourceGuardResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetResourcesInResourceGroup") + defer func() { + sc := -1 + if result.rgrl.Response.Response != nil { + sc = result.rgrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getResourcesInResourceGroupNextResults + req, err := client.GetResourcesInResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetResourcesInResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.GetResourcesInResourceGroupSender(req) + if err != nil { + result.rgrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetResourcesInResourceGroup", resp, "Failure sending request") + return + } + + result.rgrl, err = client.GetResourcesInResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetResourcesInResourceGroup", resp, "Failure responding to request") + return + } + if result.rgrl.hasNextLink() && result.rgrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetResourcesInResourceGroupPreparer prepares the GetResourcesInResourceGroup request. +func (client ResourceGuardsClient) GetResourcesInResourceGroupPreparer(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 = "2021-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.DataProtection/resourceGuards", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetResourcesInResourceGroupSender sends the GetResourcesInResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetResourcesInResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResourcesInResourceGroupResponder handles the response to the GetResourcesInResourceGroup request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetResourcesInResourceGroupResponder(resp *http.Response) (result ResourceGuardResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getResourcesInResourceGroupNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getResourcesInResourceGroupNextResults(ctx context.Context, lastResults ResourceGuardResourceList) (result ResourceGuardResourceList, err error) { + req, err := lastResults.resourceGuardResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getResourcesInResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetResourcesInResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getResourcesInResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.GetResourcesInResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getResourcesInResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetResourcesInResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetResourcesInResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ResourceGuardResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetResourcesInResourceGroup") + 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.GetResourcesInResourceGroup(ctx, resourceGroupName) + return +} + +// GetResourcesInSubscription sends the get resources in subscription request. +func (client ResourceGuardsClient) GetResourcesInSubscription(ctx context.Context) (result ResourceGuardResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetResourcesInSubscription") + defer func() { + sc := -1 + if result.rgrl.Response.Response != nil { + sc = result.rgrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getResourcesInSubscriptionNextResults + req, err := client.GetResourcesInSubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetResourcesInSubscription", nil, "Failure preparing request") + return + } + + resp, err := client.GetResourcesInSubscriptionSender(req) + if err != nil { + result.rgrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetResourcesInSubscription", resp, "Failure sending request") + return + } + + result.rgrl, err = client.GetResourcesInSubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetResourcesInSubscription", resp, "Failure responding to request") + return + } + if result.rgrl.hasNextLink() && result.rgrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetResourcesInSubscriptionPreparer prepares the GetResourcesInSubscription request. +func (client ResourceGuardsClient) GetResourcesInSubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetResourcesInSubscriptionSender sends the GetResourcesInSubscription request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetResourcesInSubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResourcesInSubscriptionResponder handles the response to the GetResourcesInSubscription request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetResourcesInSubscriptionResponder(resp *http.Response) (result ResourceGuardResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getResourcesInSubscriptionNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getResourcesInSubscriptionNextResults(ctx context.Context, lastResults ResourceGuardResourceList) (result ResourceGuardResourceList, err error) { + req, err := lastResults.resourceGuardResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getResourcesInSubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetResourcesInSubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getResourcesInSubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.GetResourcesInSubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getResourcesInSubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetResourcesInSubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetResourcesInSubscriptionComplete(ctx context.Context) (result ResourceGuardResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetResourcesInSubscription") + 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.GetResourcesInSubscription(ctx) + return +} + +// GetUpdateProtectedItemRequestsObjects sends the get update protected item requests objects request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetUpdateProtectedItemRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects") + defer func() { + sc := -1 + if result.dbrl.Response.Response != nil { + sc = result.dbrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getUpdateProtectedItemRequestsObjectsNextResults + req, err := client.GetUpdateProtectedItemRequestsObjectsPreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetUpdateProtectedItemRequestsObjects", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpdateProtectedItemRequestsObjectsSender(req) + if err != nil { + result.dbrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetUpdateProtectedItemRequestsObjects", resp, "Failure sending request") + return + } + + result.dbrl, err = client.GetUpdateProtectedItemRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetUpdateProtectedItemRequestsObjects", resp, "Failure responding to request") + return + } + if result.dbrl.hasNextLink() && result.dbrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetUpdateProtectedItemRequestsObjectsPreparer prepares the GetUpdateProtectedItemRequestsObjects request. +func (client ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpdateProtectedItemRequestsObjectsSender sends the GetUpdateProtectedItemRequestsObjects request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetUpdateProtectedItemRequestsObjectsResponder handles the response to the GetUpdateProtectedItemRequestsObjects request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsResponder(resp *http.Response) (result DppBaseResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getUpdateProtectedItemRequestsObjectsNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsNextResults(ctx context.Context, lastResults DppBaseResourceList) (result DppBaseResourceList, err error) { + req, err := lastResults.dppBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getUpdateProtectedItemRequestsObjectsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetUpdateProtectedItemRequestsObjectsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getUpdateProtectedItemRequestsObjectsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetUpdateProtectedItemRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getUpdateProtectedItemRequestsObjectsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetUpdateProtectedItemRequestsObjectsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects") + 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.GetUpdateProtectedItemRequestsObjects(ctx, resourceGroupName, resourceGuardsName) + return +} + +// GetUpdateProtectionPolicyRequestsObjects sends the get update protection policy requests objects request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +func (client ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjects(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects") + defer func() { + sc := -1 + if result.dbrl.Response.Response != nil { + sc = result.dbrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getUpdateProtectionPolicyRequestsObjectsNextResults + req, err := client.GetUpdateProtectionPolicyRequestsObjectsPreparer(ctx, resourceGroupName, resourceGuardsName) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetUpdateProtectionPolicyRequestsObjects", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpdateProtectionPolicyRequestsObjectsSender(req) + if err != nil { + result.dbrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetUpdateProtectionPolicyRequestsObjects", resp, "Failure sending request") + return + } + + result.dbrl, err = client.GetUpdateProtectionPolicyRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "GetUpdateProtectionPolicyRequestsObjects", resp, "Failure responding to request") + return + } + if result.dbrl.hasNextLink() && result.dbrl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetUpdateProtectionPolicyRequestsObjectsPreparer prepares the GetUpdateProtectionPolicyRequestsObjects request. +func (client ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpdateProtectionPolicyRequestsObjectsSender sends the GetUpdateProtectionPolicyRequestsObjects request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetUpdateProtectionPolicyRequestsObjectsResponder handles the response to the GetUpdateProtectionPolicyRequestsObjects request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsResponder(resp *http.Response) (result DppBaseResourceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getUpdateProtectionPolicyRequestsObjectsNextResults retrieves the next set of results, if any. +func (client ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsNextResults(ctx context.Context, lastResults DppBaseResourceList) (result DppBaseResourceList, err error) { + req, err := lastResults.dppBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getUpdateProtectionPolicyRequestsObjectsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetUpdateProtectionPolicyRequestsObjectsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getUpdateProtectionPolicyRequestsObjectsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetUpdateProtectionPolicyRequestsObjectsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "getUpdateProtectionPolicyRequestsObjectsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetUpdateProtectionPolicyRequestsObjectsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsComplete(ctx context.Context, resourceGroupName string, resourceGuardsName string) (result DppBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects") + 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.GetUpdateProtectionPolicyRequestsObjects(ctx, resourceGroupName, resourceGuardsName) + return +} + +// Patch sends the patch request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// resourceGuardsName - the name of ResourceGuard +// parameters - request body for operation +func (client ResourceGuardsClient) Patch(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceRequestInput) (result ResourceGuardResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.Patch") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PatchPreparer(ctx, resourceGroupName, resourceGuardsName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Patch", nil, "Failure preparing request") + return + } + + resp, err := client.PatchSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Patch", resp, "Failure sending request") + return + } + + result, err = client.PatchResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Patch", resp, "Failure responding to request") + return + } + + return +} + +// PatchPreparer prepares the Patch request. +func (client ResourceGuardsClient) PatchPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceRequestInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}", 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 ResourceGuardsClient) PatchSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PatchResponder handles the response to the Patch request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) PatchResponder(resp *http.Response) (result ResourceGuardResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Put sends the put request. +// Parameters: +// resourceGroupName - the name of the resource group where the backup vault is present. +// resourceGuardsName - the name of ResourceGuard +// parameters - request body for operation +func (client ResourceGuardsClient) Put(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource) (result ResourceGuardResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardsClient.Put") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PutPreparer(ctx, resourceGroupName, resourceGuardsName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Put", nil, "Failure preparing request") + return + } + + resp, err := client.PutSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Put", resp, "Failure sending request") + return + } + + result, err = client.PutResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.ResourceGuardsClient", "Put", resp, "Failure responding to request") + return + } + + return +} + +// PutPreparer prepares the Put request. +func (client ResourceGuardsClient) PutPreparer(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGuardsName": autorest.Encode("path", resourceGuardsName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DataProtection/resourceGuards/{resourceGuardsName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutSender sends the Put request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceGuardsClient) PutSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PutResponder handles the response to the Put request. The method always +// closes the http.Response Body. +func (client ResourceGuardsClient) PutResponder(resp *http.Response) (result ResourceGuardResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/restorabletimeranges.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/restorabletimeranges.go new file mode 100644 index 000000000000..29b839900403 --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/restorabletimeranges.go @@ -0,0 +1,113 @@ +package dataprotection + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RestorableTimeRangesClient is the open API 2.0 Specs for Azure Data Protection service +type RestorableTimeRangesClient struct { + BaseClient +} + +// NewRestorableTimeRangesClient creates an instance of the RestorableTimeRangesClient client. +func NewRestorableTimeRangesClient(subscriptionID string) RestorableTimeRangesClient { + return NewRestorableTimeRangesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestorableTimeRangesClientWithBaseURI creates an instance of the RestorableTimeRangesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewRestorableTimeRangesClientWithBaseURI(baseURI string, subscriptionID string) RestorableTimeRangesClient { + return RestorableTimeRangesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Find sends the find request. +// Parameters: +// vaultName - the name of the backup vault. +// resourceGroupName - the name of the resource group where the backup vault is present. +// backupInstanceName - the name of the backup instance +// parameters - request body for operation +func (client RestorableTimeRangesClient) Find(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters AzureBackupFindRestorableTimeRangesRequest) (result AzureBackupFindRestorableTimeRangesResponseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorableTimeRangesClient.Find") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.FindPreparer(ctx, vaultName, resourceGroupName, backupInstanceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.RestorableTimeRangesClient", "Find", nil, "Failure preparing request") + return + } + + resp, err := client.FindSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "dataprotection.RestorableTimeRangesClient", "Find", resp, "Failure sending request") + return + } + + result, err = client.FindResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "dataprotection.RestorableTimeRangesClient", "Find", resp, "Failure responding to request") + return + } + + return +} + +// FindPreparer prepares the Find request. +func (client RestorableTimeRangesClient) FindPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupInstanceName string, parameters AzureBackupFindRestorableTimeRangesRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupInstanceName": autorest.Encode("path", backupInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2021-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// FindSender sends the Find request. The method will close the +// http.Response Body if it receives an error. +func (client RestorableTimeRangesClient) FindSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// FindResponder handles the response to the Find request. The method always +// closes the http.Response Body. +func (client RestorableTimeRangesClient) FindResponder(resp *http.Response) (result AzureBackupFindRestorableTimeRangesResponseResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/dataprotection/mgmt/2021-07-01/dataprotection/version.go b/services/dataprotection/mgmt/2021-07-01/dataprotection/version.go new file mode 100644 index 000000000000..ca2052fa9faa --- /dev/null +++ b/services/dataprotection/mgmt/2021-07-01/dataprotection/version.go @@ -0,0 +1,19 @@ +package dataprotection + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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() + " dataprotection/2021-07-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/CHANGELOG.md b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/CHANGELOG.md index ea04f82cd9c9..7eedd4579e2c 100644 --- a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/CHANGELOG.md +++ b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/CHANGELOG.md @@ -1,9 +1,59 @@ # Change History +## Breaking Changes + +### Removed Constants + +1. ActionAfterReboot.ContinueConfiguration +1. ActionAfterReboot.StopConfiguration +1. ComplianceStatus.Compliant +1. ComplianceStatus.NonCompliant +1. ComplianceStatus.Pending +1. ConfigurationMode.ApplyAndAutoCorrect +1. ConfigurationMode.ApplyAndMonitor +1. ConfigurationMode.ApplyOnly +1. Kind.DSC +1. ProvisioningState.Canceled +1. ProvisioningState.Created +1. ProvisioningState.Failed +1. ProvisioningState.Succeeded +1. Type.Consistency +1. Type.Initial + +### Removed Funcs + +1. Navigation.MarshalJSON() ([]byte, error) + ## Additive Changes +### New Constants + +1. ActionAfterReboot.ActionAfterRebootContinueConfiguration +1. ActionAfterReboot.ActionAfterRebootStopConfiguration +1. AssignmentType.AssignmentTypeApplyAndAutoCorrect +1. AssignmentType.AssignmentTypeApplyAndMonitor +1. AssignmentType.AssignmentTypeAudit +1. AssignmentType.AssignmentTypeDeployAndAutoCorrect +1. ComplianceStatus.ComplianceStatusCompliant +1. ComplianceStatus.ComplianceStatusNonCompliant +1. ComplianceStatus.ComplianceStatusPending +1. ConfigurationMode.ConfigurationModeApplyAndAutoCorrect +1. ConfigurationMode.ConfigurationModeApplyAndMonitor +1. ConfigurationMode.ConfigurationModeApplyOnly +1. Kind.KindDSC +1. ProvisioningState.ProvisioningStateCanceled +1. ProvisioningState.ProvisioningStateCreated +1. ProvisioningState.ProvisioningStateFailed +1. ProvisioningState.ProvisioningStateSucceeded +1. Type.TypeConsistency +1. Type.TypeInitial + ### New Funcs -1. AssignmentReportResourceComplianceReason.MarshalJSON() ([]byte, error) -1. ConfigurationInfo.MarshalJSON() ([]byte, error) -1. VMInfo.MarshalJSON() ([]byte, error) +1. PossibleAssignmentTypeValues() []AssignmentType + +### Struct Changes + +#### New Struct Fields + +1. Navigation.AssignmentType diff --git a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/_meta.json b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/_meta.json index cafdb8913f82..b1b181f97862 100644 --- a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/_meta.json +++ b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/_meta.json @@ -1,11 +1,11 @@ { - "commit": "e0f8b9ab0f5fe5e71b7429ebfea8a33c19ec9d8d", + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", "readme": "/_/azure-rest-api-specs/specification/guestconfiguration/resource-manager/readme.md", "tag": "package-2020-06-25", "use": "@microsoft.azure/autorest.go@2.1.183", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-06-25 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/guestconfiguration/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-06-25 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/guestconfiguration/resource-manager/readme.md", "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } } \ No newline at end of file diff --git a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/enums.go b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/enums.go index efd2ffd17b0c..4c0643909c36 100644 --- a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/enums.go +++ b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/enums.go @@ -10,94 +10,113 @@ package guestconfiguration type ActionAfterReboot string const ( - // ContinueConfiguration ... - ContinueConfiguration ActionAfterReboot = "ContinueConfiguration" - // StopConfiguration ... - StopConfiguration ActionAfterReboot = "StopConfiguration" + // ActionAfterRebootContinueConfiguration ... + ActionAfterRebootContinueConfiguration ActionAfterReboot = "ContinueConfiguration" + // ActionAfterRebootStopConfiguration ... + ActionAfterRebootStopConfiguration ActionAfterReboot = "StopConfiguration" ) // PossibleActionAfterRebootValues returns an array of possible values for the ActionAfterReboot const type. func PossibleActionAfterRebootValues() []ActionAfterReboot { - return []ActionAfterReboot{ContinueConfiguration, StopConfiguration} + return []ActionAfterReboot{ActionAfterRebootContinueConfiguration, ActionAfterRebootStopConfiguration} +} + +// AssignmentType enumerates the values for assignment type. +type AssignmentType string + +const ( + // AssignmentTypeApplyAndAutoCorrect ... + AssignmentTypeApplyAndAutoCorrect AssignmentType = "ApplyAndAutoCorrect" + // AssignmentTypeApplyAndMonitor ... + AssignmentTypeApplyAndMonitor AssignmentType = "ApplyAndMonitor" + // AssignmentTypeAudit ... + AssignmentTypeAudit AssignmentType = "Audit" + // AssignmentTypeDeployAndAutoCorrect ... + AssignmentTypeDeployAndAutoCorrect AssignmentType = "DeployAndAutoCorrect" +) + +// PossibleAssignmentTypeValues returns an array of possible values for the AssignmentType const type. +func PossibleAssignmentTypeValues() []AssignmentType { + return []AssignmentType{AssignmentTypeApplyAndAutoCorrect, AssignmentTypeApplyAndMonitor, AssignmentTypeAudit, AssignmentTypeDeployAndAutoCorrect} } // ComplianceStatus enumerates the values for compliance status. type ComplianceStatus string const ( - // Compliant ... - Compliant ComplianceStatus = "Compliant" - // NonCompliant ... - NonCompliant ComplianceStatus = "NonCompliant" - // Pending ... - Pending ComplianceStatus = "Pending" + // ComplianceStatusCompliant ... + ComplianceStatusCompliant ComplianceStatus = "Compliant" + // ComplianceStatusNonCompliant ... + ComplianceStatusNonCompliant ComplianceStatus = "NonCompliant" + // ComplianceStatusPending ... + ComplianceStatusPending ComplianceStatus = "Pending" ) // PossibleComplianceStatusValues returns an array of possible values for the ComplianceStatus const type. func PossibleComplianceStatusValues() []ComplianceStatus { - return []ComplianceStatus{Compliant, NonCompliant, Pending} + return []ComplianceStatus{ComplianceStatusCompliant, ComplianceStatusNonCompliant, ComplianceStatusPending} } // ConfigurationMode enumerates the values for configuration mode. type ConfigurationMode string const ( - // ApplyAndAutoCorrect ... - ApplyAndAutoCorrect ConfigurationMode = "ApplyAndAutoCorrect" - // ApplyAndMonitor ... - ApplyAndMonitor ConfigurationMode = "ApplyAndMonitor" - // ApplyOnly ... - ApplyOnly ConfigurationMode = "ApplyOnly" + // ConfigurationModeApplyAndAutoCorrect ... + ConfigurationModeApplyAndAutoCorrect ConfigurationMode = "ApplyAndAutoCorrect" + // ConfigurationModeApplyAndMonitor ... + ConfigurationModeApplyAndMonitor ConfigurationMode = "ApplyAndMonitor" + // ConfigurationModeApplyOnly ... + ConfigurationModeApplyOnly ConfigurationMode = "ApplyOnly" ) // PossibleConfigurationModeValues returns an array of possible values for the ConfigurationMode const type. func PossibleConfigurationModeValues() []ConfigurationMode { - return []ConfigurationMode{ApplyAndAutoCorrect, ApplyAndMonitor, ApplyOnly} + return []ConfigurationMode{ConfigurationModeApplyAndAutoCorrect, ConfigurationModeApplyAndMonitor, ConfigurationModeApplyOnly} } // Kind enumerates the values for kind. type Kind string const ( - // DSC ... - DSC Kind = "DSC" + // KindDSC ... + KindDSC Kind = "DSC" ) // PossibleKindValues returns an array of possible values for the Kind const type. func PossibleKindValues() []Kind { - return []Kind{DSC} + return []Kind{KindDSC} } // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string const ( - // Canceled ... - Canceled ProvisioningState = "Canceled" - // Created ... - Created ProvisioningState = "Created" - // Failed ... - Failed ProvisioningState = "Failed" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" + // ProvisioningStateCanceled ... + ProvisioningStateCanceled ProvisioningState = "Canceled" + // ProvisioningStateCreated ... + ProvisioningStateCreated ProvisioningState = "Created" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" ) // PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Canceled, Created, Failed, Succeeded} + return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateFailed, ProvisioningStateSucceeded} } // Type enumerates the values for type. type Type string const ( - // Consistency ... - Consistency Type = "Consistency" - // Initial ... - Initial Type = "Initial" + // TypeConsistency ... + TypeConsistency Type = "Consistency" + // TypeInitial ... + TypeInitial Type = "Initial" ) // PossibleTypeValues returns an array of possible values for the Type const type. func PossibleTypeValues() []Type { - return []Type{Consistency, Initial} + return []Type{TypeConsistency, TypeInitial} } diff --git a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/models.go b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/models.go index d0b22097eb8f..a5d993f0c300 100644 --- a/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/models.go +++ b/services/guestconfiguration/mgmt/2020-06-25/guestconfiguration/models.go @@ -75,7 +75,7 @@ type AssignmentProperties struct { TargetResourceID *string `json:"targetResourceId,omitempty"` // GuestConfiguration - The guest configuration to assign. GuestConfiguration *Navigation `json:"guestConfiguration,omitempty"` - // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'Compliant', 'NonCompliant', 'Pending' + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` // LastComplianceStatusChecked - READ-ONLY; Date and time when last compliance status was checked. LastComplianceStatusChecked *date.Time `json:"lastComplianceStatusChecked,omitempty"` @@ -87,7 +87,7 @@ type AssignmentProperties struct { Context *string `json:"context,omitempty"` // AssignmentHash - READ-ONLY; Combined hash of the configuration package and parameters. AssignmentHash *string `json:"assignmentHash,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Created' + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateCreated' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -120,9 +120,9 @@ type AssignmentReport struct { StartTime *date.Time `json:"startTime,omitempty"` // EndTime - READ-ONLY; End date and time of the guest configuration assignment compliance status check. EndTime *date.Time `json:"endTime,omitempty"` - // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'Compliant', 'NonCompliant', 'Pending' + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` - // OperationType - READ-ONLY; Type of report, Consistency or Initial. Possible values include: 'Consistency', 'Initial' + // OperationType - READ-ONLY; Type of report, Consistency or Initial. Possible values include: 'TypeConsistency', 'TypeInitial' OperationType Type `json:"operationType,omitempty"` // Resources - The list of resources for which guest configuration assignment compliance is checked. Resources *[]AssignmentReportResource `json:"resources,omitempty"` @@ -145,7 +145,7 @@ func (ar AssignmentReport) MarshalJSON() ([]byte, error) { // AssignmentReportDetails details of the guest configuration assignment report. type AssignmentReportDetails struct { - // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'Compliant', 'NonCompliant', 'Pending' + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` // StartTime - READ-ONLY; Start date and time of the guest configuration assignment compliance status check. StartTime *date.Time `json:"startTime,omitempty"` @@ -153,7 +153,7 @@ type AssignmentReportDetails struct { EndTime *date.Time `json:"endTime,omitempty"` // JobID - READ-ONLY; GUID of the report. JobID *string `json:"jobId,omitempty"` - // OperationType - READ-ONLY; Type of report, Consistency or Initial. Possible values include: 'Consistency', 'Initial' + // OperationType - READ-ONLY; Type of report, Consistency or Initial. Possible values include: 'TypeConsistency', 'TypeInitial' OperationType Type `json:"operationType,omitempty"` // Resources - The list of resources for which guest configuration assignment compliance is checked. Resources *[]AssignmentReportResource `json:"resources,omitempty"` @@ -178,7 +178,7 @@ type AssignmentReportList struct { // AssignmentReportProperties report for the guest configuration assignment. Report contains information // such as compliance status, reason, and more. type AssignmentReportProperties struct { - // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'Compliant', 'NonCompliant', 'Pending' + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` // ReportID - READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group. ReportID *string `json:"reportId,omitempty"` @@ -211,7 +211,7 @@ func (arp AssignmentReportProperties) MarshalJSON() ([]byte, error) { // AssignmentReportResource the guest configuration assignment resource. type AssignmentReportResource struct { - // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'Compliant', 'NonCompliant', 'Pending' + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` // ResourceID - READ-ONLY; Name of the guest configuration assignment resource setting. ResourceID *string `json:"resourceId,omitempty"` @@ -290,11 +290,11 @@ type ConfigurationParameter struct { // ConfigurationSetting configuration setting of LCM (Local Configuration Manager). type ConfigurationSetting struct { - // ConfigurationMode - Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. Possible values include: 'ApplyOnly', 'ApplyAndMonitor', 'ApplyAndAutoCorrect' + // ConfigurationMode - Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. Possible values include: 'ConfigurationModeApplyOnly', 'ConfigurationModeApplyAndMonitor', 'ConfigurationModeApplyAndAutoCorrect' ConfigurationMode ConfigurationMode `json:"configurationMode,omitempty"` // AllowModuleOverwrite - If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false AllowModuleOverwrite *bool `json:"allowModuleOverwrite,omitempty"` - // ActionAfterReboot - Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration. Possible values include: 'ContinueConfiguration', 'StopConfiguration' + // ActionAfterReboot - Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration. Possible values include: 'ActionAfterRebootContinueConfiguration', 'ActionAfterRebootStopConfiguration' ActionAfterReboot ActionAfterReboot `json:"actionAfterReboot,omitempty"` // RefreshFrequencyMins - The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30. RefreshFrequencyMins *float64 `json:"refreshFrequencyMins,omitempty"` @@ -321,43 +321,24 @@ type ErrorResponseError struct { // The artifact is a zip file containing DSC configuration (as MOF) and dependent resources and other // dependencies like modules. type Navigation struct { - // Kind - Kind of the guest configuration. For example:DSC. Possible values include: 'DSC' + // Kind - Kind of the guest configuration. For example:DSC. Possible values include: 'KindDSC' Kind Kind `json:"kind,omitempty"` // Name - Name of the guest configuration. Name *string `json:"name,omitempty"` // Version - Version of the guest configuration. Version *string `json:"version,omitempty"` - // ContentURI - READ-ONLY; Uri of the storage where guest configuration package is uploaded. + // ContentURI - Uri of the storage where guest configuration package is uploaded. ContentURI *string `json:"contentUri,omitempty"` - // ContentHash - READ-ONLY; Combined hash of the guest configuration package and configuration parameters. + // ContentHash - Combined hash of the guest configuration package and configuration parameters. ContentHash *string `json:"contentHash,omitempty"` + // AssignmentType - Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. Possible values include: 'AssignmentTypeAudit', 'AssignmentTypeDeployAndAutoCorrect', 'AssignmentTypeApplyAndAutoCorrect', 'AssignmentTypeApplyAndMonitor' + AssignmentType AssignmentType `json:"assignmentType,omitempty"` // ConfigurationParameter - The configuration parameters for the guest configuration. ConfigurationParameter *[]ConfigurationParameter `json:"configurationParameter,omitempty"` // ConfigurationSetting - The configuration setting for the guest configuration. ConfigurationSetting *ConfigurationSetting `json:"configurationSetting,omitempty"` } -// MarshalJSON is the custom marshaler for Navigation. -func (n Navigation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if n.Kind != "" { - objectMap["kind"] = n.Kind - } - if n.Name != nil { - objectMap["name"] = n.Name - } - if n.Version != nil { - objectMap["version"] = n.Version - } - if n.ConfigurationParameter != nil { - objectMap["configurationParameter"] = n.ConfigurationParameter - } - if n.ConfigurationSetting != nil { - objectMap["configurationSetting"] = n.ConfigurationSetting - } - return json.Marshal(objectMap) -} - // Operation guestConfiguration REST API operation type Operation struct { // Name - Operation name: For ex. providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/write or read diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/CHANGELOG.md b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/CHANGELOG.md new file mode 100644 index 000000000000..52911e4cc5e4 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/CHANGELOG.md @@ -0,0 +1,2 @@ +# Change History + diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/_meta.json b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/_meta.json new file mode 100644 index 000000000000..8e95b7c0ef33 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", + "readme": "/_/azure-rest-api-specs/specification/guestconfiguration/resource-manager/readme.md", + "tag": "package-2021-01-25", + "use": "@microsoft.azure/autorest.go@2.1.183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-01-25 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/guestconfiguration/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreports.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreports.go new file mode 100644 index 000000000000..91bf967cf6f0 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreports.go @@ -0,0 +1,203 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AssignmentReportsClient is the guest Configuration Client +type AssignmentReportsClient struct { + BaseClient +} + +// NewAssignmentReportsClient creates an instance of the AssignmentReportsClient client. +func NewAssignmentReportsClient(subscriptionID string) AssignmentReportsClient { + return NewAssignmentReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAssignmentReportsClientWithBaseURI creates an instance of the AssignmentReportsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewAssignmentReportsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentReportsClient { + return AssignmentReportsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a report for the guest configuration assignment, by reportId. +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - the guest configuration assignment name. +// reportID - the GUID for the guest configuration assignment report. +// VMName - the name of the virtual machine. +func (client AssignmentReportsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, VMName string) (result AssignmentReportType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentReportsClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentReportsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, reportID, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AssignmentReportsClient) GetPreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "reportId": autorest.Encode("path", reportID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-01-25" + 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/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports/{reportId}", 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 AssignmentReportsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AssignmentReportsClient) GetResponder(resp *http.Response) (result AssignmentReportType, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all reports for the guest configuration assignment, latest report first. +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - the guest configuration assignment name. +// VMName - the name of the virtual machine. +func (client AssignmentReportsClient) List(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (result AssignmentReportList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentReportsClient.List") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentReportsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AssignmentReportsClient) ListPreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-01-25" + 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/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports", 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 AssignmentReportsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AssignmentReportsClient) ListResponder(resp *http.Response) (result AssignmentReportList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreportsvmss.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreportsvmss.go new file mode 100644 index 000000000000..b7e77982a865 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentreportsvmss.go @@ -0,0 +1,203 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AssignmentReportsVMSSClient is the guest Configuration Client +type AssignmentReportsVMSSClient struct { + BaseClient +} + +// NewAssignmentReportsVMSSClient creates an instance of the AssignmentReportsVMSSClient client. +func NewAssignmentReportsVMSSClient(subscriptionID string) AssignmentReportsVMSSClient { + return NewAssignmentReportsVMSSClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAssignmentReportsVMSSClientWithBaseURI creates an instance of the AssignmentReportsVMSSClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewAssignmentReportsVMSSClientWithBaseURI(baseURI string, subscriptionID string) AssignmentReportsVMSSClient { + return AssignmentReportsVMSSClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a report for the VMSS guest configuration assignment, by reportId. +// Parameters: +// resourceGroupName - the resource group name. +// name - the guest configuration assignment name. +// ID - the GUID for the guest configuration assignment report. +// vmssName - the name of the virtual machine scale set. +func (client AssignmentReportsVMSSClient) Get(ctx context.Context, resourceGroupName string, name string, ID string, vmssName string) (result AssignmentReportType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentReportsVMSSClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentReportsVMSSClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, ID, vmssName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsVMSSClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsVMSSClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsVMSSClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AssignmentReportsVMSSClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, ID string, vmssName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmssName": autorest.Encode("path", vmssName), + } + + const APIVersion = "2021-01-25" + 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/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name}/reports/{id}", 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 AssignmentReportsVMSSClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AssignmentReportsVMSSClient) GetResponder(resp *http.Response) (result AssignmentReportType, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all reports for the VMSS guest configuration assignment, latest report first. +// Parameters: +// resourceGroupName - the resource group name. +// name - the guest configuration assignment name. +// vmssName - the name of the virtual machine scale set. +func (client AssignmentReportsVMSSClient) List(ctx context.Context, resourceGroupName string, name string, vmssName string) (result AssignmentReportList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentReportsVMSSClient.List") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentReportsVMSSClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, name, vmssName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsVMSSClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsVMSSClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentReportsVMSSClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AssignmentReportsVMSSClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, vmssName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmssName": autorest.Encode("path", vmssName), + } + + const APIVersion = "2021-01-25" + 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/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name}/reports", 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 AssignmentReportsVMSSClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AssignmentReportsVMSSClient) ListResponder(resp *http.Response) (result AssignmentReportList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignments.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignments.go new file mode 100644 index 000000000000..fdba58df1faf --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignments.go @@ -0,0 +1,369 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AssignmentsClient is the guest Configuration Client +type AssignmentsClient struct { + BaseClient +} + +// NewAssignmentsClient creates an instance of the AssignmentsClient client. +func NewAssignmentsClient(subscriptionID string) AssignmentsClient { + return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient { + return AssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates an association between a VM and guest configuration +// Parameters: +// guestConfigurationAssignmentName - name of the guest configuration assignment. +// parameters - parameters supplied to the create or update guest configuration assignment. +// resourceGroupName - the resource group name. +// VMName - the name of the virtual machine. +func (client AssignmentsClient) CreateOrUpdate(ctx context.Context, guestConfigurationAssignmentName string, parameters Assignment, resourceGroupName string, VMName string) (result Assignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.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: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, guestConfigurationAssignmentName, parameters, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, guestConfigurationAssignmentName string, parameters Assignment, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.SystemData = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}", 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 AssignmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AssignmentsClient) CreateOrUpdateResponder(resp *http.Response) (result Assignment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a guest configuration assignment +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - name of the guest configuration assignment +// VMName - the name of the virtual machine. +func (client AssignmentsClient) Delete(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AssignmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}", 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 AssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get information about a guest configuration assignment +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - the guest configuration assignment name. +// VMName - the name of the virtual machine. +func (client AssignmentsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (result Assignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AssignmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-01-25" + 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/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}", 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 AssignmentsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all guest configuration assignments for a virtual machine. +// Parameters: +// resourceGroupName - the resource group name. +// VMName - the name of the virtual machine. +func (client AssignmentsClient) List(ctx context.Context, resourceGroupName string, VMName string) (result AssignmentList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.List") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AssignmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2021-01-25" + 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/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments", 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 AssignmentsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentsvmss.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentsvmss.go new file mode 100644 index 000000000000..d5251aff9c75 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/assignmentsvmss.go @@ -0,0 +1,282 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AssignmentsVMSSClient is the guest Configuration Client +type AssignmentsVMSSClient struct { + BaseClient +} + +// NewAssignmentsVMSSClient creates an instance of the AssignmentsVMSSClient client. +func NewAssignmentsVMSSClient(subscriptionID string) AssignmentsVMSSClient { + return NewAssignmentsVMSSClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAssignmentsVMSSClientWithBaseURI creates an instance of the AssignmentsVMSSClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAssignmentsVMSSClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsVMSSClient { + return AssignmentsVMSSClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete delete a guest configuration assignment for VMSS +// Parameters: +// resourceGroupName - the resource group name. +// name - the guest configuration assignment name. +// vmssName - the name of the virtual machine scale set. +func (client AssignmentsVMSSClient) Delete(ctx context.Context, resourceGroupName string, name string, vmssName string) (result Assignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsVMSSClient.Delete") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsVMSSClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, name, vmssName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AssignmentsVMSSClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, vmssName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmssName": autorest.Encode("path", vmssName), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name}", 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 AssignmentsVMSSClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AssignmentsVMSSClient) DeleteResponder(resp *http.Response) (result Assignment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get information about a guest configuration assignment for VMSS +// Parameters: +// resourceGroupName - the resource group name. +// name - the guest configuration assignment name. +// vmssName - the name of the virtual machine scale set. +func (client AssignmentsVMSSClient) Get(ctx context.Context, resourceGroupName string, name string, vmssName string) (result Assignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsVMSSClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsVMSSClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, vmssName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AssignmentsVMSSClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, vmssName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmssName": autorest.Encode("path", vmssName), + } + + const APIVersion = "2021-01-25" + 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/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name}", 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 AssignmentsVMSSClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AssignmentsVMSSClient) GetResponder(resp *http.Response) (result Assignment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all guest configuration assignments for VMSS. +// Parameters: +// resourceGroupName - the resource group name. +// vmssName - the name of the virtual machine scale set. +func (client AssignmentsVMSSClient) List(ctx context.Context, resourceGroupName string, vmssName string) (result AssignmentList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsVMSSClient.List") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.AssignmentsVMSSClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, vmssName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.AssignmentsVMSSClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AssignmentsVMSSClient) ListPreparer(ctx context.Context, resourceGroupName string, vmssName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmssName": autorest.Encode("path", vmssName), + } + + const APIVersion = "2021-01-25" + 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/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments", 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 AssignmentsVMSSClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AssignmentsVMSSClient) ListResponder(resp *http.Response) (result AssignmentList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/client.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/client.go new file mode 100644 index 000000000000..80deea67bb17 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/client.go @@ -0,0 +1,41 @@ +// Package guestconfiguration implements the Azure ARM Guestconfiguration service API version 2021-01-25. +// +// Guest Configuration Client +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 Guestconfiguration + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Guestconfiguration. +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 using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/enums.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/enums.go new file mode 100644 index 000000000000..2380a4ea7150 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/enums.go @@ -0,0 +1,141 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActionAfterReboot enumerates the values for action after reboot. +type ActionAfterReboot string + +const ( + // ActionAfterRebootContinueConfiguration ... + ActionAfterRebootContinueConfiguration ActionAfterReboot = "ContinueConfiguration" + // ActionAfterRebootStopConfiguration ... + ActionAfterRebootStopConfiguration ActionAfterReboot = "StopConfiguration" +) + +// PossibleActionAfterRebootValues returns an array of possible values for the ActionAfterReboot const type. +func PossibleActionAfterRebootValues() []ActionAfterReboot { + return []ActionAfterReboot{ActionAfterRebootContinueConfiguration, ActionAfterRebootStopConfiguration} +} + +// AssignmentType enumerates the values for assignment type. +type AssignmentType string + +const ( + // AssignmentTypeApplyAndAutoCorrect ... + AssignmentTypeApplyAndAutoCorrect AssignmentType = "ApplyAndAutoCorrect" + // AssignmentTypeApplyAndMonitor ... + AssignmentTypeApplyAndMonitor AssignmentType = "ApplyAndMonitor" + // AssignmentTypeAudit ... + AssignmentTypeAudit AssignmentType = "Audit" + // AssignmentTypeDeployAndAutoCorrect ... + AssignmentTypeDeployAndAutoCorrect AssignmentType = "DeployAndAutoCorrect" +) + +// PossibleAssignmentTypeValues returns an array of possible values for the AssignmentType const type. +func PossibleAssignmentTypeValues() []AssignmentType { + return []AssignmentType{AssignmentTypeApplyAndAutoCorrect, AssignmentTypeApplyAndMonitor, AssignmentTypeAudit, AssignmentTypeDeployAndAutoCorrect} +} + +// ComplianceStatus enumerates the values for compliance status. +type ComplianceStatus string + +const ( + // ComplianceStatusCompliant ... + ComplianceStatusCompliant ComplianceStatus = "Compliant" + // ComplianceStatusNonCompliant ... + ComplianceStatusNonCompliant ComplianceStatus = "NonCompliant" + // ComplianceStatusPending ... + ComplianceStatusPending ComplianceStatus = "Pending" +) + +// PossibleComplianceStatusValues returns an array of possible values for the ComplianceStatus const type. +func PossibleComplianceStatusValues() []ComplianceStatus { + return []ComplianceStatus{ComplianceStatusCompliant, ComplianceStatusNonCompliant, ComplianceStatusPending} +} + +// ConfigurationMode enumerates the values for configuration mode. +type ConfigurationMode string + +const ( + // ConfigurationModeApplyAndAutoCorrect ... + ConfigurationModeApplyAndAutoCorrect ConfigurationMode = "ApplyAndAutoCorrect" + // ConfigurationModeApplyAndMonitor ... + ConfigurationModeApplyAndMonitor ConfigurationMode = "ApplyAndMonitor" + // ConfigurationModeApplyOnly ... + ConfigurationModeApplyOnly ConfigurationMode = "ApplyOnly" +) + +// PossibleConfigurationModeValues returns an array of possible values for the ConfigurationMode const type. +func PossibleConfigurationModeValues() []ConfigurationMode { + return []ConfigurationMode{ConfigurationModeApplyAndAutoCorrect, ConfigurationModeApplyAndMonitor, ConfigurationModeApplyOnly} +} + +// CreatedByType enumerates the values for created by type. +type CreatedByType string + +const ( + // CreatedByTypeApplication ... + CreatedByTypeApplication CreatedByType = "Application" + // CreatedByTypeKey ... + CreatedByTypeKey CreatedByType = "Key" + // CreatedByTypeManagedIdentity ... + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + // CreatedByTypeUser ... + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindDSC ... + KindDSC Kind = "DSC" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindDSC} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateCanceled ... + ProvisioningStateCanceled ProvisioningState = "Canceled" + // ProvisioningStateCreated ... + ProvisioningStateCreated ProvisioningState = "Created" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateFailed, ProvisioningStateSucceeded} +} + +// Type enumerates the values for type. +type Type string + +const ( + // TypeConsistency ... + TypeConsistency Type = "Consistency" + // TypeInitial ... + TypeInitial Type = "Initial" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{TypeConsistency, TypeInitial} +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/guestconfigurationapi/interfaces.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/guestconfigurationapi/interfaces.go new file mode 100644 index 000000000000..f8e616090832 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/guestconfigurationapi/interfaces.go @@ -0,0 +1,73 @@ +package guestconfigurationapi + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/guestconfiguration/mgmt/2021-01-25/guestconfiguration" + "github.com/Azure/go-autorest/autorest" +) + +// AssignmentsClientAPI contains the set of methods on the AssignmentsClient type. +type AssignmentsClientAPI interface { + CreateOrUpdate(ctx context.Context, guestConfigurationAssignmentName string, parameters guestconfiguration.Assignment, resourceGroupName string, VMName string) (result guestconfiguration.Assignment, err error) + Delete(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (result guestconfiguration.Assignment, err error) + List(ctx context.Context, resourceGroupName string, VMName string) (result guestconfiguration.AssignmentList, err error) +} + +var _ AssignmentsClientAPI = (*guestconfiguration.AssignmentsClient)(nil) + +// AssignmentReportsClientAPI contains the set of methods on the AssignmentReportsClient type. +type AssignmentReportsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, VMName string) (result guestconfiguration.AssignmentReportType, err error) + List(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, VMName string) (result guestconfiguration.AssignmentReportList, err error) +} + +var _ AssignmentReportsClientAPI = (*guestconfiguration.AssignmentReportsClient)(nil) + +// HCRPAssignmentsClientAPI contains the set of methods on the HCRPAssignmentsClient type. +type HCRPAssignmentsClientAPI interface { + CreateOrUpdate(ctx context.Context, guestConfigurationAssignmentName string, parameters guestconfiguration.Assignment, resourceGroupName string, machineName string) (result guestconfiguration.Assignment, err error) + Delete(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (result guestconfiguration.Assignment, err error) + List(ctx context.Context, resourceGroupName string, machineName string) (result guestconfiguration.AssignmentList, err error) +} + +var _ HCRPAssignmentsClientAPI = (*guestconfiguration.HCRPAssignmentsClient)(nil) + +// HCRPAssignmentReportsClientAPI contains the set of methods on the HCRPAssignmentReportsClient type. +type HCRPAssignmentReportsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, machineName string) (result guestconfiguration.AssignmentReportType, err error) + List(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (result guestconfiguration.AssignmentReportList, err error) +} + +var _ HCRPAssignmentReportsClientAPI = (*guestconfiguration.HCRPAssignmentReportsClient)(nil) + +// AssignmentsVMSSClientAPI contains the set of methods on the AssignmentsVMSSClient type. +type AssignmentsVMSSClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, name string, vmssName string) (result guestconfiguration.Assignment, err error) + Get(ctx context.Context, resourceGroupName string, name string, vmssName string) (result guestconfiguration.Assignment, err error) + List(ctx context.Context, resourceGroupName string, vmssName string) (result guestconfiguration.AssignmentList, err error) +} + +var _ AssignmentsVMSSClientAPI = (*guestconfiguration.AssignmentsVMSSClient)(nil) + +// AssignmentReportsVMSSClientAPI contains the set of methods on the AssignmentReportsVMSSClient type. +type AssignmentReportsVMSSClientAPI interface { + Get(ctx context.Context, resourceGroupName string, name string, ID string, vmssName string) (result guestconfiguration.AssignmentReportType, err error) + List(ctx context.Context, resourceGroupName string, name string, vmssName string) (result guestconfiguration.AssignmentReportList, err error) +} + +var _ AssignmentReportsVMSSClientAPI = (*guestconfiguration.AssignmentReportsVMSSClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result guestconfiguration.OperationList, err error) +} + +var _ OperationsClientAPI = (*guestconfiguration.OperationsClient)(nil) diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignmentreports.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignmentreports.go new file mode 100644 index 000000000000..2266b7ac80b1 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignmentreports.go @@ -0,0 +1,203 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// HCRPAssignmentReportsClient is the guest Configuration Client +type HCRPAssignmentReportsClient struct { + BaseClient +} + +// NewHCRPAssignmentReportsClient creates an instance of the HCRPAssignmentReportsClient client. +func NewHCRPAssignmentReportsClient(subscriptionID string) HCRPAssignmentReportsClient { + return NewHCRPAssignmentReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHCRPAssignmentReportsClientWithBaseURI creates an instance of the HCRPAssignmentReportsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewHCRPAssignmentReportsClientWithBaseURI(baseURI string, subscriptionID string) HCRPAssignmentReportsClient { + return HCRPAssignmentReportsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a report for the guest configuration assignment, by reportId. +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - the guest configuration assignment name. +// reportID - the GUID for the guest configuration assignment report. +// machineName - the name of the ARC machine. +func (client HCRPAssignmentReportsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, machineName string) (result AssignmentReportType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HCRPAssignmentReportsClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.HCRPAssignmentReportsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, reportID, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentReportsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentReportsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentReportsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client HCRPAssignmentReportsClient) GetPreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "machineName": autorest.Encode("path", machineName), + "reportId": autorest.Encode("path", reportID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports/{reportId}", 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 HCRPAssignmentReportsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HCRPAssignmentReportsClient) GetResponder(resp *http.Response) (result AssignmentReportType, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all reports for the guest configuration assignment, latest report first. +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - the guest configuration assignment name. +// machineName - the name of the ARC machine. +func (client HCRPAssignmentReportsClient) List(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (result AssignmentReportList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HCRPAssignmentReportsClient.List") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.HCRPAssignmentReportsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentReportsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentReportsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentReportsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client HCRPAssignmentReportsClient) ListPreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "machineName": autorest.Encode("path", machineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports", 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 HCRPAssignmentReportsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client HCRPAssignmentReportsClient) ListResponder(resp *http.Response) (result AssignmentReportList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignments.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignments.go new file mode 100644 index 000000000000..5119747b6ffb --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/hcrpassignments.go @@ -0,0 +1,369 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// HCRPAssignmentsClient is the guest Configuration Client +type HCRPAssignmentsClient struct { + BaseClient +} + +// NewHCRPAssignmentsClient creates an instance of the HCRPAssignmentsClient client. +func NewHCRPAssignmentsClient(subscriptionID string) HCRPAssignmentsClient { + return NewHCRPAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHCRPAssignmentsClientWithBaseURI creates an instance of the HCRPAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewHCRPAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) HCRPAssignmentsClient { + return HCRPAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates an association between a ARC machine and guest configuration +// Parameters: +// guestConfigurationAssignmentName - name of the guest configuration assignment. +// parameters - parameters supplied to the create or update guest configuration assignment. +// resourceGroupName - the resource group name. +// machineName - the name of the ARC machine. +func (client HCRPAssignmentsClient) CreateOrUpdate(ctx context.Context, guestConfigurationAssignmentName string, parameters Assignment, resourceGroupName string, machineName string) (result Assignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HCRPAssignmentsClient.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: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.HCRPAssignmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, guestConfigurationAssignmentName, parameters, resourceGroupName, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client HCRPAssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, guestConfigurationAssignmentName string, parameters Assignment, resourceGroupName string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "machineName": autorest.Encode("path", machineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.SystemData = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}", 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 HCRPAssignmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client HCRPAssignmentsClient) CreateOrUpdateResponder(resp *http.Response) (result Assignment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a guest configuration assignment +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - name of the guest configuration assignment +// machineName - the name of the ARC machine. +func (client HCRPAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HCRPAssignmentsClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.HCRPAssignmentsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client HCRPAssignmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "machineName": autorest.Encode("path", machineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}", 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 HCRPAssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client HCRPAssignmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get information about a guest configuration assignment +// Parameters: +// resourceGroupName - the resource group name. +// guestConfigurationAssignmentName - the guest configuration assignment name. +// machineName - the name of the ARC machine. +func (client HCRPAssignmentsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (result Assignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HCRPAssignmentsClient.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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.HCRPAssignmentsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, guestConfigurationAssignmentName, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client HCRPAssignmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "guestConfigurationAssignmentName": autorest.Encode("path", guestConfigurationAssignmentName), + "machineName": autorest.Encode("path", machineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}", 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 HCRPAssignmentsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HCRPAssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all guest configuration assignments for an ARC machine. +// Parameters: +// resourceGroupName - the resource group name. +// machineName - the name of the ARC machine. +func (client HCRPAssignmentsClient) List(ctx context.Context, resourceGroupName string, machineName string) (result AssignmentList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HCRPAssignmentsClient.List") + 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.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("guestconfiguration.HCRPAssignmentsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.HCRPAssignmentsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client HCRPAssignmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "machineName": autorest.Encode("path", machineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments", 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 HCRPAssignmentsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client HCRPAssignmentsClient) ListResponder(resp *http.Response) (result AssignmentList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/models.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/models.go new file mode 100644 index 000000000000..972d69ac3061 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/models.go @@ -0,0 +1,570 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration" + +// Assignment guest configuration assignment is an association between a machine and guest configuration. +type Assignment struct { + autorest.Response `json:"-"` + // Properties - Properties of the Guest configuration assignment. + Properties *AssignmentProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty"` + // ID - READ-ONLY; ARM resource id of the guest configuration assignment. + ID *string `json:"id,omitempty"` + // Name - Name of the guest configuration assignment. + Name *string `json:"name,omitempty"` + // Location - Region where the VM is located. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Assignment. +func (a Assignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if a.Properties != nil { + objectMap["properties"] = a.Properties + } + if a.Name != nil { + objectMap["name"] = a.Name + } + if a.Location != nil { + objectMap["location"] = a.Location + } + return json.Marshal(objectMap) +} + +// AssignmentInfo information about the guest configuration assignment. +type AssignmentInfo struct { + // Name - READ-ONLY; Name of the guest configuration assignment. + Name *string `json:"name,omitempty"` + // Configuration - Information about the configuration. + Configuration *ConfigurationInfo `json:"configuration,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentInfo. +func (ai AssignmentInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ai.Configuration != nil { + objectMap["configuration"] = ai.Configuration + } + return json.Marshal(objectMap) +} + +// AssignmentList the response of the list guest configuration assignment operation. +type AssignmentList struct { + autorest.Response `json:"-"` + // Value - Result of the list guest configuration assignment operation. + Value *[]Assignment `json:"value,omitempty"` +} + +// AssignmentProperties guest configuration assignment properties. +type AssignmentProperties struct { + // TargetResourceID - READ-ONLY; VM resource Id. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // GuestConfiguration - The guest configuration to assign. + GuestConfiguration *Navigation `json:"guestConfiguration,omitempty"` + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' + ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` + // LastComplianceStatusChecked - READ-ONLY; Date and time when last compliance status was checked. + LastComplianceStatusChecked *date.Time `json:"lastComplianceStatusChecked,omitempty"` + // LatestReportID - READ-ONLY; Id of the latest report for the guest configuration assignment. + LatestReportID *string `json:"latestReportId,omitempty"` + // LatestAssignmentReport - Last reported guest configuration assignment report. + LatestAssignmentReport *AssignmentReport `json:"latestAssignmentReport,omitempty"` + // Context - The source which initiated the guest configuration assignment. Ex: Azure Policy + Context *string `json:"context,omitempty"` + // AssignmentHash - READ-ONLY; Combined hash of the configuration package and parameters. + AssignmentHash *string `json:"assignmentHash,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateCreated' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ResourceType - READ-ONLY; Type of the resource - VMSS / VM + ResourceType *string `json:"resourceType,omitempty"` + // VmssVMList - The list of VM Compliance data for VMSS + VmssVMList *[]VMSSVMInfo `json:"vmssVMList,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentProperties. +func (ap AssignmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.GuestConfiguration != nil { + objectMap["guestConfiguration"] = ap.GuestConfiguration + } + if ap.LatestAssignmentReport != nil { + objectMap["latestAssignmentReport"] = ap.LatestAssignmentReport + } + if ap.Context != nil { + objectMap["context"] = ap.Context + } + if ap.VmssVMList != nil { + objectMap["vmssVMList"] = ap.VmssVMList + } + return json.Marshal(objectMap) +} + +// AssignmentReport ... +type AssignmentReport struct { + // ID - READ-ONLY; ARM resource id of the report for the guest configuration assignment. + ID *string `json:"id,omitempty"` + // ReportID - READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group. + ReportID *string `json:"reportId,omitempty"` + // Assignment - Configuration details of the guest configuration assignment. + Assignment *AssignmentInfo `json:"assignment,omitempty"` + // VM - Information about the VM. + VM *VMInfo `json:"vm,omitempty"` + // StartTime - READ-ONLY; Start date and time of the guest configuration assignment compliance status check. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; End date and time of the guest configuration assignment compliance status check. + EndTime *date.Time `json:"endTime,omitempty"` + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' + ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` + // OperationType - READ-ONLY; Type of report, Consistency or Initial. Possible values include: 'TypeConsistency', 'TypeInitial' + OperationType Type `json:"operationType,omitempty"` + // Resources - The list of resources for which guest configuration assignment compliance is checked. + Resources *[]AssignmentReportResource `json:"resources,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentReport. +func (ar AssignmentReport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ar.Assignment != nil { + objectMap["assignment"] = ar.Assignment + } + if ar.VM != nil { + objectMap["vm"] = ar.VM + } + if ar.Resources != nil { + objectMap["resources"] = ar.Resources + } + return json.Marshal(objectMap) +} + +// AssignmentReportDetails details of the guest configuration assignment report. +type AssignmentReportDetails struct { + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' + ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` + // StartTime - READ-ONLY; Start date and time of the guest configuration assignment compliance status check. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; End date and time of the guest configuration assignment compliance status check. + EndTime *date.Time `json:"endTime,omitempty"` + // JobID - READ-ONLY; GUID of the report. + JobID *string `json:"jobId,omitempty"` + // OperationType - READ-ONLY; Type of report, Consistency or Initial. Possible values include: 'TypeConsistency', 'TypeInitial' + OperationType Type `json:"operationType,omitempty"` + // Resources - The list of resources for which guest configuration assignment compliance is checked. + Resources *[]AssignmentReportResource `json:"resources,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentReportDetails. +func (ard AssignmentReportDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ard.Resources != nil { + objectMap["resources"] = ard.Resources + } + return json.Marshal(objectMap) +} + +// AssignmentReportList list of guest configuration assignment reports. +type AssignmentReportList struct { + autorest.Response `json:"-"` + // Value - List of reports for the guest configuration. Report contains information such as compliance status, reason and more. + Value *[]AssignmentReportType `json:"value,omitempty"` +} + +// AssignmentReportProperties report for the guest configuration assignment. Report contains information +// such as compliance status, reason, and more. +type AssignmentReportProperties struct { + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' + ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` + // ReportID - READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group. + ReportID *string `json:"reportId,omitempty"` + // Assignment - Configuration details of the guest configuration assignment. + Assignment *AssignmentInfo `json:"assignment,omitempty"` + // VM - Information about the VM. + VM *VMInfo `json:"vm,omitempty"` + // StartTime - READ-ONLY; Start date and time of the guest configuration assignment compliance status check. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; End date and time of the guest configuration assignment compliance status check. + EndTime *date.Time `json:"endTime,omitempty"` + // Details - Details of the assignment report. + Details *AssignmentReportDetails `json:"details,omitempty"` + // VmssResourceID - READ-ONLY; Azure resource Id of the VMSS. + VmssResourceID *string `json:"vmssResourceId,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentReportProperties. +func (arp AssignmentReportProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if arp.Assignment != nil { + objectMap["assignment"] = arp.Assignment + } + if arp.VM != nil { + objectMap["vm"] = arp.VM + } + if arp.Details != nil { + objectMap["details"] = arp.Details + } + return json.Marshal(objectMap) +} + +// AssignmentReportResource the guest configuration assignment resource. +type AssignmentReportResource struct { + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' + ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` + // ResourceID - READ-ONLY; Name of the guest configuration assignment resource setting. + ResourceID *string `json:"resourceId,omitempty"` + // Reasons - Compliance reason and reason code for a resource. + Reasons *[]AssignmentReportResourceComplianceReason `json:"reasons,omitempty"` + // Properties - READ-ONLY; Properties of a guest configuration assignment resource. + Properties interface{} `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentReportResource. +func (arr AssignmentReportResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if arr.Reasons != nil { + objectMap["reasons"] = arr.Reasons + } + return json.Marshal(objectMap) +} + +// AssignmentReportResourceComplianceReason reason and code for the compliance of the guest configuration +// assignment resource. +type AssignmentReportResourceComplianceReason struct { + // Phrase - READ-ONLY; Reason for the compliance of the guest configuration assignment resource. + Phrase *string `json:"phrase,omitempty"` + // Code - READ-ONLY; Code for the compliance of the guest configuration assignment resource. + Code *string `json:"code,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentReportResourceComplianceReason. +func (arrcr AssignmentReportResourceComplianceReason) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AssignmentReportType report for the guest configuration assignment. Report contains information such as +// compliance status, reason, and more. +type AssignmentReportType struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; ARM resource id of the report for the guest configuration assignment. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group. + Name *string `json:"name,omitempty"` + // Properties - Properties of the guest configuration report. + Properties *AssignmentReportProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentReportType. +func (art AssignmentReportType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if art.Properties != nil { + objectMap["properties"] = art.Properties + } + return json.Marshal(objectMap) +} + +// ConfigurationInfo information about the configuration. +type ConfigurationInfo struct { + // Name - READ-ONLY; Name of the configuration. + Name *string `json:"name,omitempty"` + // Version - READ-ONLY; Version of the configuration. + Version *string `json:"version,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConfigurationInfo. +func (ci ConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ConfigurationParameter represents a configuration parameter. +type ConfigurationParameter struct { + // Name - Name of the configuration parameter. + Name *string `json:"name,omitempty"` + // Value - Value of the configuration parameter. + Value *string `json:"value,omitempty"` +} + +// ConfigurationSetting configuration setting of LCM (Local Configuration Manager). +type ConfigurationSetting struct { + // ConfigurationMode - Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. Possible values include: 'ConfigurationModeApplyOnly', 'ConfigurationModeApplyAndMonitor', 'ConfigurationModeApplyAndAutoCorrect' + ConfigurationMode ConfigurationMode `json:"configurationMode,omitempty"` + // AllowModuleOverwrite - If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false + AllowModuleOverwrite *bool `json:"allowModuleOverwrite,omitempty"` + // ActionAfterReboot - Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration. Possible values include: 'ActionAfterRebootContinueConfiguration', 'ActionAfterRebootStopConfiguration' + ActionAfterReboot ActionAfterReboot `json:"actionAfterReboot,omitempty"` + // RefreshFrequencyMins - The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30. + RefreshFrequencyMins *float64 `json:"refreshFrequencyMins,omitempty"` + // RebootIfNeeded - Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the xPendingReboot module. + RebootIfNeeded *bool `json:"rebootIfNeeded,omitempty"` + // ConfigurationModeFrequencyMins - How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15. + ConfigurationModeFrequencyMins *float64 `json:"configurationModeFrequencyMins,omitempty"` +} + +// ErrorResponse error response of an operation failure +type ErrorResponse struct { + Error *ErrorResponseError `json:"error,omitempty"` +} + +// ErrorResponseError ... +type ErrorResponseError struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Detail error message indicating why the operation failed. + Message *string `json:"message,omitempty"` +} + +// Navigation guest configuration is an artifact that encapsulates DSC configuration and its dependencies. +// The artifact is a zip file containing DSC configuration (as MOF) and dependent resources and other +// dependencies like modules. +type Navigation struct { + // Kind - Kind of the guest configuration. For example:DSC. Possible values include: 'KindDSC' + Kind Kind `json:"kind,omitempty"` + // Name - Name of the guest configuration. + Name *string `json:"name,omitempty"` + // Version - Version of the guest configuration. + Version *string `json:"version,omitempty"` + // ContentURI - Uri of the storage where guest configuration package is uploaded. + ContentURI *string `json:"contentUri,omitempty"` + // ContentHash - Combined hash of the guest configuration package and configuration parameters. + ContentHash *string `json:"contentHash,omitempty"` + // AssignmentType - Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. Possible values include: 'AssignmentTypeAudit', 'AssignmentTypeDeployAndAutoCorrect', 'AssignmentTypeApplyAndAutoCorrect', 'AssignmentTypeApplyAndMonitor' + AssignmentType AssignmentType `json:"assignmentType,omitempty"` + // ConfigurationParameter - The configuration parameters for the guest configuration. + ConfigurationParameter *[]ConfigurationParameter `json:"configurationParameter,omitempty"` + // ConfigurationSetting - The configuration setting for the guest configuration. + ConfigurationSetting *ConfigurationSetting `json:"configurationSetting,omitempty"` +} + +// Operation guestConfiguration REST API operation +type Operation struct { + // Name - Operation name: For ex. providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/write or read + Name *string `json:"name,omitempty"` + // Display - Provider, Resource, Operation and description values. + Display *OperationDisplay `json:"display,omitempty"` + // OperationProperties - Provider, Resource, Operation and description values. + *OperationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if o.Name != nil { + objectMap["name"] = o.Name + } + if o.Display != nil { + objectMap["display"] = o.Display + } + if o.OperationProperties != nil { + objectMap["properties"] = o.OperationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Operation struct. +func (o *Operation) 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 + } + o.Name = &name + } + case "display": + if v != nil { + var display OperationDisplay + err = json.Unmarshal(*v, &display) + if err != nil { + return err + } + o.Display = &display + } + case "properties": + if v != nil { + var operationProperties OperationProperties + err = json.Unmarshal(*v, &operationProperties) + if err != nil { + return err + } + o.OperationProperties = &operationProperties + } + } + } + + return nil +} + +// OperationDisplay provider, Resource, Operation and description values. +type OperationDisplay struct { + // Provider - Service provider: Microsoft.GuestConfiguration + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed: For ex. + Resource *string `json:"resource,omitempty"` + // Operation - Operation type: Read, write, delete, etc. + Operation *string `json:"operation,omitempty"` + // Description - Description about operation. + Description *string `json:"description,omitempty"` +} + +// OperationList the response model for the list of Automation operations +type OperationList struct { + autorest.Response `json:"-"` + // Value - List of Automation operations supported by the Automation resource provider. + Value *[]Operation `json:"value,omitempty"` +} + +// OperationProperties provider, Resource, Operation and description values. +type OperationProperties struct { + // StatusCode - Service provider: Microsoft.GuestConfiguration + StatusCode *string `json:"statusCode,omitempty"` +} + +// ProxyResource ARM proxy resource. +type ProxyResource struct { + // ID - READ-ONLY; ARM resource id of the guest configuration assignment. + ID *string `json:"id,omitempty"` + // Name - Name of the guest configuration assignment. + Name *string `json:"name,omitempty"` + // Location - Region where the VM is located. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProxyResource. +func (pr ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pr.Name != nil { + objectMap["name"] = pr.Name + } + if pr.Location != nil { + objectMap["location"] = pr.Location + } + return json.Marshal(objectMap) +} + +// Resource the core properties of ARM resources +type Resource struct { + // ID - READ-ONLY; ARM resource id of the guest configuration assignment. + ID *string `json:"id,omitempty"` + // Name - Name of the guest configuration assignment. + Name *string `json:"name,omitempty"` + // Location - Region where the VM is located. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Name != nil { + objectMap["name"] = r.Name + } + if r.Location != nil { + objectMap["location"] = r.Location + } + return json.Marshal(objectMap) +} + +// SystemData metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + CreatedByType CreatedByType `json:"createdByType,omitempty"` + // CreatedAt - The timestamp of resource creation (UTC). + CreatedAt *date.Time `json:"createdAt,omitempty"` + // LastModifiedBy - The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` + // LastModifiedAt - The timestamp of resource last modification (UTC) + LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` +} + +// TrackedResource the resource model definition for a ARM tracked top level resource +type TrackedResource struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; ARM resource id of the guest configuration assignment. + ID *string `json:"id,omitempty"` + // Name - Name of the guest configuration assignment. + Name *string `json:"name,omitempty"` + // Location - Region where the VM is located. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; The type of the resource. + 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.Tags != nil { + objectMap["tags"] = tr.Tags + } + if tr.Name != nil { + objectMap["name"] = tr.Name + } + if tr.Location != nil { + objectMap["location"] = tr.Location + } + return json.Marshal(objectMap) +} + +// VMInfo information about the VM. +type VMInfo struct { + // ID - READ-ONLY; Azure resource Id of the VM. + ID *string `json:"id,omitempty"` + // UUID - READ-ONLY; UUID(Universally Unique Identifier) of the VM. + UUID *string `json:"uuid,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMInfo. +func (vi VMInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VMSSVMInfo information about VMSS VM +type VMSSVMInfo struct { + // VMID - READ-ONLY; UUID of the VM. + VMID *string `json:"vmId,omitempty"` + // VMResourceID - READ-ONLY; Azure resource Id of the VM. + VMResourceID *string `json:"vmResourceId,omitempty"` + // ComplianceStatus - READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration. Possible values include: 'ComplianceStatusCompliant', 'ComplianceStatusNonCompliant', 'ComplianceStatusPending' + ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty"` + // LatestReportID - READ-ONLY; Id of the latest report for the guest configuration assignment. + LatestReportID *string `json:"latestReportId,omitempty"` + // LastComplianceChecked - READ-ONLY; Date and time when last compliance status was checked. + LastComplianceChecked *date.Time `json:"lastComplianceChecked,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMSSVMInfo. +func (vi VMSSVMInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/operations.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/operations.go new file mode 100644 index 000000000000..8a26e3907427 --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/operations.go @@ -0,0 +1,98 @@ +package guestconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 guest Configuration Client +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 using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available GuestConfiguration REST API operations. +func (client OperationsClient) List(ctx context.Context) (result OperationList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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, "guestconfiguration.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "guestconfiguration.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "guestconfiguration.OperationsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2021-01-25" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.GuestConfiguration/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) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/version.go b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/version.go new file mode 100644 index 000000000000..c958c51fb52f --- /dev/null +++ b/services/guestconfiguration/mgmt/2021-01-25/guestconfiguration/version.go @@ -0,0 +1,19 @@ +package guestconfiguration + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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() + " guestconfiguration/2021-01-25" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/CHANGELOG.md b/services/netapp/mgmt/2021-06-01/netapp/CHANGELOG.md new file mode 100644 index 000000000000..52911e4cc5e4 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/CHANGELOG.md @@ -0,0 +1,2 @@ +# Change History + diff --git a/services/netapp/mgmt/2021-06-01/netapp/_meta.json b/services/netapp/mgmt/2021-06-01/netapp/_meta.json new file mode 100644 index 000000000000..908ced6f5ada --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", + "readme": "/_/azure-rest-api-specs/specification/netapp/resource-manager/readme.md", + "tag": "package-netapp-2021-06-01", + "use": "@microsoft.azure/autorest.go@2.1.183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-netapp-2021-06-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/netapp/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/services/netapp/mgmt/2021-06-01/netapp/accountbackups.go b/services/netapp/mgmt/2021-06-01/netapp/accountbackups.go new file mode 100644 index 000000000000..881bea19effd --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/accountbackups.go @@ -0,0 +1,289 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AccountBackupsClient is the microsoft NetApp Files Azure Resource Provider specification +type AccountBackupsClient struct { + BaseClient +} + +// NewAccountBackupsClient creates an instance of the AccountBackupsClient client. +func NewAccountBackupsClient(subscriptionID string) AccountBackupsClient { + return NewAccountBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAccountBackupsClientWithBaseURI creates an instance of the AccountBackupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAccountBackupsClientWithBaseURI(baseURI string, subscriptionID string) AccountBackupsClient { + return AccountBackupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete delete the specified Backup for a Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// backupName - the name of the backup +func (client AccountBackupsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, backupName string) (result AccountBackupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountBackupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountBackupsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, backupName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AccountBackupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, backupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupName": autorest.Encode("path", backupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}", 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 AccountBackupsClient) DeleteSender(req *http.Request) (future AccountBackupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AccountBackupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified backup for a Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// backupName - the name of the backup +func (client AccountBackupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupName string) (result Backup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountBackupsClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountBackupsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, backupName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AccountBackupsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, backupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupName": autorest.Encode("path", backupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}", 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 AccountBackupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AccountBackupsClient) GetResponder(resp *http.Response) (result Backup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all Backups for a Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client AccountBackupsClient) List(ctx context.Context, resourceGroupName string, accountName string) (result BackupsList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountBackupsClient.List") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountBackupsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AccountBackupsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/accountBackups", 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 AccountBackupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AccountBackupsClient) ListResponder(resp *http.Response) (result BackupsList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/accounts.go b/services/netapp/mgmt/2021-06-01/netapp/accounts.go new file mode 100644 index 000000000000..aeea392c9960 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/accounts.go @@ -0,0 +1,626 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AccountsClient is the microsoft NetApp Files Azure Resource Provider specification +type AccountsClient struct { + BaseClient +} + +// NewAccountsClient creates an instance of the AccountsClient client. +func NewAccountsClient(subscriptionID string) AccountsClient { + return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { + return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update the specified NetApp account within the resource group +// Parameters: +// body - netApp Account object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client AccountsClient) CreateOrUpdate(ctx context.Context, body Account, resourceGroupName string, accountName string) (result AccountsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, 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("netapp.AccountsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, body, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AccountsClient) CreateOrUpdatePreparer(ctx context.Context, body Account, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Etag = nil + body.Type = nil + body.SystemData = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", pathParameters), + autorest.WithJSON(body), + 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 AccountsClient) CreateOrUpdateSender(req *http.Request) (future AccountsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AccountsClient) CreateOrUpdateResponder(resp *http.Response) (result Account, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete the specified NetApp account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result AccountsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}", 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 AccountsClient) DeleteSender(req *http.Request) (future AccountsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the NetApp account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AccountsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}", 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 AccountsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AccountsClient) GetResponder(resp *http.Response) (result Account, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list and describe all NetApp accounts in the resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client AccountsClient) List(ctx context.Context, resourceGroupName string) (result AccountListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.List") + defer func() { + sc := -1 + if result.al.Response.Response != nil { + sc = result.al.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.al.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "List", resp, "Failure sending request") + return + } + + result.al, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "List", resp, "Failure responding to request") + return + } + if result.al.hasNextLink() && result.al.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AccountsClient) ListPreparer(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 = "2021-06-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.NetApp/netAppAccounts", 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 AccountsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AccountsClient) ListResponder(resp *http.Response) (result AccountList, err error) { + err = autorest.Respond( + resp, + 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 AccountsClient) listNextResults(ctx context.Context, lastResults AccountList) (result AccountList, err error) { + req, err := lastResults.accountListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "netapp.AccountsClient", "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, "netapp.AccountsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AccountsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AccountListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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) + return +} + +// ListBySubscription list and describe all NetApp accounts in the subscription. +func (client AccountsClient) ListBySubscription(ctx context.Context) (result AccountListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListBySubscription") + defer func() { + sc := -1 + if result.al.Response.Response != nil { + sc = result.al.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.al.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.al, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.al.hasNextLink() && result.al.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client AccountsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts", 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 AccountsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client AccountsClient) ListBySubscriptionResponder(resp *http.Response) (result AccountList, err error) { + err = autorest.Respond( + resp, + 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 AccountsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AccountList) (result AccountList, err error) { + req, err := lastResults.accountListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "netapp.AccountsClient", "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, "netapp.AccountsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client AccountsClient) ListBySubscriptionComplete(ctx context.Context) (result AccountListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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 +} + +// Update patch the specified NetApp account +// Parameters: +// body - netApp Account object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client AccountsClient) Update(ctx context.Context, body AccountPatch, resourceGroupName string, accountName string) (result AccountsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.AccountsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, body, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client AccountsClient) UpdatePreparer(ctx context.Context, body AccountPatch, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.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.NetApp/netAppAccounts/{accountName}", pathParameters), + autorest.WithJSON(body), + 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 AccountsClient) UpdateSender(req *http.Request) (future AccountsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/backuppolicies.go b/services/netapp/mgmt/2021-06-01/netapp/backuppolicies.go new file mode 100644 index 000000000000..5ed7acc601fc --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/backuppolicies.go @@ -0,0 +1,481 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BackupPoliciesClient is the microsoft NetApp Files Azure Resource Provider specification +type BackupPoliciesClient struct { + BaseClient +} + +// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client. +func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { + return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient { + return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create a backup policy for Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// backupPolicyName - backup policy Name which uniquely identify backup policy. +// body - backup policy object supplied in the body of the operation. +func (client BackupPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy) (result BackupPoliciesCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.BackupPolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupPoliciesClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, backupPolicyName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client BackupPoliciesClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Etag = nil + body.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", pathParameters), + autorest.WithJSON(body), + 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 BackupPoliciesClient) CreateSender(req *http.Request) (future BackupPoliciesCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) CreateResponder(resp *http.Response) (result BackupPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete backup policy +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// backupPolicyName - backup policy Name which uniquely identify backup policy. +func (client BackupPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (result BackupPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupPoliciesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, backupPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BackupPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", 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 BackupPoliciesClient) DeleteSender(req *http.Request) (future BackupPoliciesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a particular backup Policy +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// backupPolicyName - backup policy Name which uniquely identify backup policy. +func (client BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (result BackupPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, backupPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", 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 BackupPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) GetResponder(resp *http.Response) (result BackupPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list backup policies for Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client BackupPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result BackupPoliciesList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.List") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupPoliciesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client BackupPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/backupPolicies", 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 BackupPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) ListResponder(resp *http.Response) (result BackupPoliciesList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update patch a backup policy for Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// backupPolicyName - backup policy Name which uniquely identify backup policy. +// body - backup policy object supplied in the body of the operation. +func (client BackupPoliciesClient) Update(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch) (result BackupPoliciesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupPoliciesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, backupPolicyName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BackupPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupPolicyName": autorest.Encode("path", backupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.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.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", pathParameters), + autorest.WithJSON(body), + 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 BackupPoliciesClient) UpdateSender(req *http.Request) (future BackupPoliciesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BackupPoliciesClient) UpdateResponder(resp *http.Response) (result BackupPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/backups.go b/services/netapp/mgmt/2021-06-01/netapp/backups.go new file mode 100644 index 000000000000..5ccf780878bc --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/backups.go @@ -0,0 +1,738 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BackupsClient is the microsoft NetApp Files Azure Resource Provider specification +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 using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBackupsClientWithBaseURI(baseURI string, subscriptionID string) BackupsClient { + return BackupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create a backup for the volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// backupName - the name of the backup +// body - backup object supplied in the body of the operation. +func (client BackupsClient) Create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body Backup) (result BackupsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.BackupProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.BackupProperties.BackupID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.BackupProperties.BackupID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.BackupProperties.BackupID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.BackupProperties.BackupID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client BackupsClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body Backup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupName": autorest.Encode("path", backupName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", pathParameters), + autorest.WithJSON(body), + 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 BackupsClient) CreateSender(req *http.Request) (future BackupsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client BackupsClient) CreateResponder(resp *http.Response) (result Backup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a backup of the volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// backupName - the name of the backup +func (client BackupsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string) (result BackupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, poolName, volumeName, backupName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BackupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupName": autorest.Encode("path", backupName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", 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 BackupsClient) DeleteSender(req *http.Request) (future BackupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BackupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified backup of the volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// backupName - the name of the backup +func (client BackupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string) (result Backup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, poolName, volumeName, backupName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupName": autorest.Encode("path", backupName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", 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 BackupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupsClient) GetResponder(resp *http.Response) (result Backup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStatus get the status of the backup for a volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client BackupsClient) GetStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result BackupStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.GetStatus") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "GetStatus", err.Error()) + } + + req, err := client.GetStatusPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "GetStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "GetStatus", resp, "Failure sending request") + return + } + + result, err = client.GetStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "GetStatus", resp, "Failure responding to request") + return + } + + return +} + +// GetStatusPreparer prepares the GetStatus request. +func (client BackupsClient) GetStatusPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetStatusSender sends the GetStatus request. The method will close the +// http.Response Body if it receives an error. +func (client BackupsClient) GetStatusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetStatusResponder handles the response to the GetStatus request. The method always +// closes the http.Response Body. +func (client BackupsClient) GetStatusResponder(resp *http.Response) (result BackupStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVolumeRestoreStatus get the status of the restore for a volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client BackupsClient) GetVolumeRestoreStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result RestoreStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.GetVolumeRestoreStatus") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "GetVolumeRestoreStatus", err.Error()) + } + + req, err := client.GetVolumeRestoreStatusPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "GetVolumeRestoreStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetVolumeRestoreStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "GetVolumeRestoreStatus", resp, "Failure sending request") + return + } + + result, err = client.GetVolumeRestoreStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "GetVolumeRestoreStatus", resp, "Failure responding to request") + return + } + + return +} + +// GetVolumeRestoreStatusPreparer prepares the GetVolumeRestoreStatus request. +func (client BackupsClient) GetVolumeRestoreStatusPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVolumeRestoreStatusSender sends the GetVolumeRestoreStatus request. The method will close the +// http.Response Body if it receives an error. +func (client BackupsClient) GetVolumeRestoreStatusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetVolumeRestoreStatusResponder handles the response to the GetVolumeRestoreStatus request. The method always +// closes the http.Response Body. +func (client BackupsClient) GetVolumeRestoreStatusResponder(resp *http.Response) (result RestoreStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all backups for a volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client BackupsClient) List(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result BackupsList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.List") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client BackupsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups", 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 BackupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BackupsClient) ListResponder(resp *http.Response) (result BackupsList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update patch a backup for the volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// backupName - the name of the backup +// body - backup object supplied in the body of the operation. +func (client BackupsClient) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body *BackupPatch) (result BackupsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.BackupsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BackupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body *BackupPatch) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "backupName": autorest.Encode("path", backupName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if body != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(body)) + } + 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 BackupsClient) UpdateSender(req *http.Request) (future BackupsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BackupsClient) UpdateResponder(resp *http.Response) (result Backup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/client.go b/services/netapp/mgmt/2021-06-01/netapp/client.go new file mode 100644 index 000000000000..0a9c729f12ff --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/client.go @@ -0,0 +1,41 @@ +// Package netapp implements the Azure ARM Netapp service API version 2021-06-01. +// +// Microsoft NetApp Files Azure Resource Provider specification +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 Netapp + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Netapp. +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 using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/enums.go b/services/netapp/mgmt/2021-06-01/netapp/enums.go new file mode 100644 index 000000000000..e7646debe07f --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/enums.go @@ -0,0 +1,286 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActiveDirectoryStatus enumerates the values for active directory status. +type ActiveDirectoryStatus string + +const ( + // ActiveDirectoryStatusCreated Active Directory created but not in use + ActiveDirectoryStatusCreated ActiveDirectoryStatus = "Created" + // ActiveDirectoryStatusDeleted Active Directory Deleted + ActiveDirectoryStatusDeleted ActiveDirectoryStatus = "Deleted" + // ActiveDirectoryStatusError Error with the Active Directory + ActiveDirectoryStatusError ActiveDirectoryStatus = "Error" + // ActiveDirectoryStatusInUse Active Directory in use by SMB Volume + ActiveDirectoryStatusInUse ActiveDirectoryStatus = "InUse" + // ActiveDirectoryStatusUpdating Active Directory Updating + ActiveDirectoryStatusUpdating ActiveDirectoryStatus = "Updating" +) + +// PossibleActiveDirectoryStatusValues returns an array of possible values for the ActiveDirectoryStatus const type. +func PossibleActiveDirectoryStatusValues() []ActiveDirectoryStatus { + return []ActiveDirectoryStatus{ActiveDirectoryStatusCreated, ActiveDirectoryStatusDeleted, ActiveDirectoryStatusError, ActiveDirectoryStatusInUse, ActiveDirectoryStatusUpdating} +} + +// AvsDataStore enumerates the values for avs data store. +type AvsDataStore string + +const ( + // AvsDataStoreDisabled avsDataStore is disabled + AvsDataStoreDisabled AvsDataStore = "Disabled" + // AvsDataStoreEnabled avsDataStore is enabled + AvsDataStoreEnabled AvsDataStore = "Enabled" +) + +// PossibleAvsDataStoreValues returns an array of possible values for the AvsDataStore const type. +func PossibleAvsDataStoreValues() []AvsDataStore { + return []AvsDataStore{AvsDataStoreDisabled, AvsDataStoreEnabled} +} + +// BackupType enumerates the values for backup type. +type BackupType string + +const ( + // BackupTypeManual Manual backup + BackupTypeManual BackupType = "Manual" + // BackupTypeScheduled Scheduled backup + BackupTypeScheduled BackupType = "Scheduled" +) + +// PossibleBackupTypeValues returns an array of possible values for the BackupType const type. +func PossibleBackupTypeValues() []BackupType { + return []BackupType{BackupTypeManual, BackupTypeScheduled} +} + +// CheckNameResourceTypes enumerates the values for check name resource types. +type CheckNameResourceTypes string + +const ( + // CheckNameResourceTypesMicrosoftNetAppnetAppAccounts ... + CheckNameResourceTypesMicrosoftNetAppnetAppAccounts CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts" + // CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools ... + CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" + // CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes ... + CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + // CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots ... + CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +) + +// PossibleCheckNameResourceTypesValues returns an array of possible values for the CheckNameResourceTypes const type. +func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { + return []CheckNameResourceTypes{CheckNameResourceTypesMicrosoftNetAppnetAppAccounts, CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools, CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes, CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots} +} + +// CheckQuotaNameResourceTypes enumerates the values for check quota name resource types. +type CheckQuotaNameResourceTypes string + +const ( + // CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccounts ... + CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccounts CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts" + // CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools ... + CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" + // CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes ... + CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + // CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots ... + CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +) + +// PossibleCheckQuotaNameResourceTypesValues returns an array of possible values for the CheckQuotaNameResourceTypes const type. +func PossibleCheckQuotaNameResourceTypesValues() []CheckQuotaNameResourceTypes { + return []CheckQuotaNameResourceTypes{CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccounts, CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools, CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes, CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots} +} + +// ChownMode enumerates the values for chown mode. +type ChownMode string + +const ( + // ChownModeRestricted ... + ChownModeRestricted ChownMode = "Restricted" + // ChownModeUnrestricted ... + ChownModeUnrestricted ChownMode = "Unrestricted" +) + +// PossibleChownModeValues returns an array of possible values for the ChownMode const type. +func PossibleChownModeValues() []ChownMode { + return []ChownMode{ChownModeRestricted, ChownModeUnrestricted} +} + +// CreatedByType enumerates the values for created by type. +type CreatedByType string + +const ( + // CreatedByTypeApplication ... + CreatedByTypeApplication CreatedByType = "Application" + // CreatedByTypeKey ... + CreatedByTypeKey CreatedByType = "Key" + // CreatedByTypeManagedIdentity ... + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + // CreatedByTypeUser ... + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} +} + +// EncryptionType enumerates the values for encryption type. +type EncryptionType string + +const ( + // EncryptionTypeDouble EncryptionType Double, volumes will use double encryption at rest + EncryptionTypeDouble EncryptionType = "Double" + // EncryptionTypeSingle EncryptionType Single, volumes will use single encryption at rest + EncryptionTypeSingle EncryptionType = "Single" +) + +// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type. +func PossibleEncryptionTypeValues() []EncryptionType { + return []EncryptionType{EncryptionTypeDouble, EncryptionTypeSingle} +} + +// EndpointType enumerates the values for endpoint type. +type EndpointType string + +const ( + // EndpointTypeDst ... + EndpointTypeDst EndpointType = "dst" + // EndpointTypeSrc ... + EndpointTypeSrc EndpointType = "src" +) + +// PossibleEndpointTypeValues returns an array of possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{EndpointTypeDst, EndpointTypeSrc} +} + +// InAvailabilityReasonType enumerates the values for in availability reason type. +type InAvailabilityReasonType string + +const ( + // InAvailabilityReasonTypeAlreadyExists ... + InAvailabilityReasonTypeAlreadyExists InAvailabilityReasonType = "AlreadyExists" + // InAvailabilityReasonTypeInvalid ... + InAvailabilityReasonTypeInvalid InAvailabilityReasonType = "Invalid" +) + +// PossibleInAvailabilityReasonTypeValues returns an array of possible values for the InAvailabilityReasonType const type. +func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { + return []InAvailabilityReasonType{InAvailabilityReasonTypeAlreadyExists, InAvailabilityReasonTypeInvalid} +} + +// MetricAggregationType enumerates the values for metric aggregation type. +type MetricAggregationType string + +const ( + // MetricAggregationTypeAverage ... + MetricAggregationTypeAverage MetricAggregationType = "Average" +) + +// PossibleMetricAggregationTypeValues returns an array of possible values for the MetricAggregationType const type. +func PossibleMetricAggregationTypeValues() []MetricAggregationType { + return []MetricAggregationType{MetricAggregationTypeAverage} +} + +// MirrorState enumerates the values for mirror state. +type MirrorState string + +const ( + // MirrorStateBroken ... + MirrorStateBroken MirrorState = "Broken" + // MirrorStateMirrored ... + MirrorStateMirrored MirrorState = "Mirrored" + // MirrorStateUninitialized ... + MirrorStateUninitialized MirrorState = "Uninitialized" +) + +// PossibleMirrorStateValues returns an array of possible values for the MirrorState const type. +func PossibleMirrorStateValues() []MirrorState { + return []MirrorState{MirrorStateBroken, MirrorStateMirrored, MirrorStateUninitialized} +} + +// QosType enumerates the values for qos type. +type QosType string + +const ( + // QosTypeAuto qos type Auto + QosTypeAuto QosType = "Auto" + // QosTypeManual qos type Manual + QosTypeManual QosType = "Manual" +) + +// PossibleQosTypeValues returns an array of possible values for the QosType const type. +func PossibleQosTypeValues() []QosType { + return []QosType{QosTypeAuto, QosTypeManual} +} + +// RelationshipStatus enumerates the values for relationship status. +type RelationshipStatus string + +const ( + // RelationshipStatusIdle ... + RelationshipStatusIdle RelationshipStatus = "Idle" + // RelationshipStatusTransferring ... + RelationshipStatusTransferring RelationshipStatus = "Transferring" +) + +// PossibleRelationshipStatusValues returns an array of possible values for the RelationshipStatus const type. +func PossibleRelationshipStatusValues() []RelationshipStatus { + return []RelationshipStatus{RelationshipStatusIdle, RelationshipStatusTransferring} +} + +// ReplicationSchedule enumerates the values for replication schedule. +type ReplicationSchedule string + +const ( + // ReplicationSchedule10minutely ... + ReplicationSchedule10minutely ReplicationSchedule = "_10minutely" + // ReplicationScheduleDaily ... + ReplicationScheduleDaily ReplicationSchedule = "daily" + // ReplicationScheduleHourly ... + ReplicationScheduleHourly ReplicationSchedule = "hourly" +) + +// PossibleReplicationScheduleValues returns an array of possible values for the ReplicationSchedule const type. +func PossibleReplicationScheduleValues() []ReplicationSchedule { + return []ReplicationSchedule{ReplicationSchedule10minutely, ReplicationScheduleDaily, ReplicationScheduleHourly} +} + +// SecurityStyle enumerates the values for security style. +type SecurityStyle string + +const ( + // SecurityStyleNtfs ... + SecurityStyleNtfs SecurityStyle = "ntfs" + // SecurityStyleUnix ... + SecurityStyleUnix SecurityStyle = "unix" +) + +// PossibleSecurityStyleValues returns an array of possible values for the SecurityStyle const type. +func PossibleSecurityStyleValues() []SecurityStyle { + return []SecurityStyle{SecurityStyleNtfs, SecurityStyleUnix} +} + +// ServiceLevel enumerates the values for service level. +type ServiceLevel string + +const ( + // ServiceLevelPremium Premium service level + ServiceLevelPremium ServiceLevel = "Premium" + // ServiceLevelStandard Standard service level + ServiceLevelStandard ServiceLevel = "Standard" + // ServiceLevelStandardZRS Zone redundant storage service level + ServiceLevelStandardZRS ServiceLevel = "StandardZRS" + // ServiceLevelUltra Ultra service level + ServiceLevelUltra ServiceLevel = "Ultra" +) + +// PossibleServiceLevelValues returns an array of possible values for the ServiceLevel const type. +func PossibleServiceLevelValues() []ServiceLevel { + return []ServiceLevel{ServiceLevelPremium, ServiceLevelStandard, ServiceLevelStandardZRS, ServiceLevelUltra} +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/models.go b/services/netapp/mgmt/2021-06-01/netapp/models.go new file mode 100644 index 000000000000..9a03a6d8bfa2 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/models.go @@ -0,0 +1,4333 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/netapp/mgmt/2021-06-01/netapp" + +// Account netApp account resource +type Account struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // AccountProperties - NetApp Account properties + *AccountProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for Account. +func (a Account) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if a.Location != nil { + objectMap["location"] = a.Location + } + if a.Tags != nil { + objectMap["tags"] = a.Tags + } + if a.AccountProperties != nil { + objectMap["properties"] = a.AccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Account struct. +func (a *Account) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + a.Location = &location + } + 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 "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + a.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + a.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + a.Tags = tags + } + case "properties": + if v != nil { + var accountProperties AccountProperties + err = json.Unmarshal(*v, &accountProperties) + if err != nil { + return err + } + a.AccountProperties = &accountProperties + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + a.SystemData = &systemData + } + } + } + + return nil +} + +// AccountBackupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AccountBackupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountBackupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountBackupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountBackupsDeleteFuture.Result. +func (future *AccountBackupsDeleteFuture) result(client AccountBackupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountBackupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.AccountBackupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AccountEncryption encryption settings +type AccountEncryption struct { + // KeySource - Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + KeySource *string `json:"keySource,omitempty"` +} + +// AccountList list of NetApp account resources +type AccountList struct { + autorest.Response `json:"-"` + // Value - Multiple NetApp accounts + Value *[]Account `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AccountListIterator provides access to a complete listing of Account values. +type AccountListIterator struct { + i int + page AccountListPage +} + +// 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 *AccountListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountListIterator.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 *AccountListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AccountListIterator) 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 AccountListIterator) Response() AccountList { + 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 AccountListIterator) Value() Account { + if !iter.page.NotDone() { + return Account{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AccountListIterator type. +func NewAccountListIterator(page AccountListPage) AccountListIterator { + return AccountListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (al AccountList) IsEmpty() bool { + return al.Value == nil || len(*al.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (al AccountList) hasNextLink() bool { + return al.NextLink != nil && len(*al.NextLink) != 0 +} + +// accountListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (al AccountList) accountListPreparer(ctx context.Context) (*http.Request, error) { + if !al.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(al.NextLink))) +} + +// AccountListPage contains a page of Account values. +type AccountListPage struct { + fn func(context.Context, AccountList) (AccountList, error) + al AccountList +} + +// 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 *AccountListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.al) + if err != nil { + return err + } + page.al = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AccountListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AccountListPage) NotDone() bool { + return !page.al.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AccountListPage) Response() AccountList { + return page.al +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AccountListPage) Values() []Account { + if page.al.IsEmpty() { + return nil + } + return *page.al.Value +} + +// Creates a new instance of the AccountListPage type. +func NewAccountListPage(cur AccountList, getNextPage func(context.Context, AccountList) (AccountList, error)) AccountListPage { + return AccountListPage{ + fn: getNextPage, + al: cur, + } +} + +// AccountPatch netApp account patch resource +type AccountPatch struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // AccountProperties - NetApp Account properties + *AccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccountPatch. +func (ap AccountPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.Location != nil { + objectMap["location"] = ap.Location + } + if ap.Tags != nil { + objectMap["tags"] = ap.Tags + } + if ap.AccountProperties != nil { + objectMap["properties"] = ap.AccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AccountPatch struct. +func (ap *AccountPatch) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ap.Location = &location + } + 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 "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ap.Tags = tags + } + case "properties": + if v != nil { + var accountProperties AccountProperties + err = json.Unmarshal(*v, &accountProperties) + if err != nil { + return err + } + ap.AccountProperties = &accountProperties + } + } + } + + return nil +} + +// AccountProperties netApp account properties +type AccountProperties struct { + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` + // ActiveDirectories - Active Directories + ActiveDirectories *[]ActiveDirectory `json:"activeDirectories,omitempty"` + // Encryption - Encryption settings + Encryption *AccountEncryption `json:"encryption,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccountProperties. +func (ap AccountProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.ActiveDirectories != nil { + objectMap["activeDirectories"] = ap.ActiveDirectories + } + if ap.Encryption != nil { + objectMap["encryption"] = ap.Encryption + } + return json.Marshal(objectMap) +} + +// AccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AccountsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (Account, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsCreateOrUpdateFuture.Result. +func (future *AccountsCreateOrUpdateFuture) result(client AccountsClient) (a Account, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + a.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.AccountsCreateOrUpdateFuture") + 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, "netapp.AccountsCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request") + } + } + return +} + +// AccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AccountsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsDeleteFuture.Result. +func (future *AccountsDeleteFuture) result(client AccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.AccountsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AccountsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (Account, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsUpdateFuture.Result. +func (future *AccountsUpdateFuture) result(client AccountsClient) (a Account, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + a.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.AccountsUpdateFuture") + 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.UpdateResponder(a.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsUpdateFuture", "Result", a.Response.Response, "Failure responding to request") + } + } + return +} + +// ActiveDirectory active Directory +type ActiveDirectory struct { + // ActiveDirectoryID - Id of the Active Directory + ActiveDirectoryID *string `json:"activeDirectoryId,omitempty"` + // Username - Username of Active Directory domain administrator + Username *string `json:"username,omitempty"` + // Password - Plain text password of Active Directory domain administrator, value is masked in the response + Password *string `json:"password,omitempty"` + // Domain - Name of the Active Directory domain + Domain *string `json:"domain,omitempty"` + // DNS - Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain + DNS *string `json:"dns,omitempty"` + // Status - READ-ONLY; Status of the Active Directory. Possible values include: 'ActiveDirectoryStatusCreated', 'ActiveDirectoryStatusInUse', 'ActiveDirectoryStatusDeleted', 'ActiveDirectoryStatusError', 'ActiveDirectoryStatusUpdating' + Status ActiveDirectoryStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Any details in regards to the Status of the Active Directory + StatusDetails *string `json:"statusDetails,omitempty"` + // SmbServerName - NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + SmbServerName *string `json:"smbServerName,omitempty"` + // OrganizationalUnit - The Organizational Unit (OU) within the Windows Active Directory + OrganizationalUnit *string `json:"organizationalUnit,omitempty"` + // Site - The Active Directory site the service will limit Domain Controller discovery to + Site *string `json:"site,omitempty"` + // BackupOperators - Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier + BackupOperators *[]string `json:"backupOperators,omitempty"` + // Administrators - Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier + Administrators *[]string `json:"administrators,omitempty"` + // KdcIP - kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. + KdcIP *string `json:"kdcIP,omitempty"` + // AdName - Name of the active directory machine. This optional parameter is used only while creating kerberos volume + AdName *string `json:"adName,omitempty"` + // ServerRootCACertificate - When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. + ServerRootCACertificate *string `json:"serverRootCACertificate,omitempty"` + // AesEncryption - If enabled, AES encryption will be enabled for SMB communication. + AesEncryption *bool `json:"aesEncryption,omitempty"` + // LdapSigning - Specifies whether or not the LDAP traffic needs to be signed. + LdapSigning *bool `json:"ldapSigning,omitempty"` + // SecurityOperators - Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier + SecurityOperators *[]string `json:"securityOperators,omitempty"` + // LdapOverTLS - Specifies whether or not the LDAP traffic needs to be secured via TLS. + LdapOverTLS *bool `json:"ldapOverTLS,omitempty"` + // AllowLocalNfsUsersWithLdap - If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + AllowLocalNfsUsersWithLdap *bool `json:"allowLocalNfsUsersWithLdap,omitempty"` +} + +// MarshalJSON is the custom marshaler for ActiveDirectory. +func (ad ActiveDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ad.ActiveDirectoryID != nil { + objectMap["activeDirectoryId"] = ad.ActiveDirectoryID + } + if ad.Username != nil { + objectMap["username"] = ad.Username + } + if ad.Password != nil { + objectMap["password"] = ad.Password + } + if ad.Domain != nil { + objectMap["domain"] = ad.Domain + } + if ad.DNS != nil { + objectMap["dns"] = ad.DNS + } + if ad.SmbServerName != nil { + objectMap["smbServerName"] = ad.SmbServerName + } + if ad.OrganizationalUnit != nil { + objectMap["organizationalUnit"] = ad.OrganizationalUnit + } + if ad.Site != nil { + objectMap["site"] = ad.Site + } + if ad.BackupOperators != nil { + objectMap["backupOperators"] = ad.BackupOperators + } + if ad.Administrators != nil { + objectMap["administrators"] = ad.Administrators + } + if ad.KdcIP != nil { + objectMap["kdcIP"] = ad.KdcIP + } + if ad.AdName != nil { + objectMap["adName"] = ad.AdName + } + if ad.ServerRootCACertificate != nil { + objectMap["serverRootCACertificate"] = ad.ServerRootCACertificate + } + if ad.AesEncryption != nil { + objectMap["aesEncryption"] = ad.AesEncryption + } + if ad.LdapSigning != nil { + objectMap["ldapSigning"] = ad.LdapSigning + } + if ad.SecurityOperators != nil { + objectMap["securityOperators"] = ad.SecurityOperators + } + if ad.LdapOverTLS != nil { + objectMap["ldapOverTLS"] = ad.LdapOverTLS + } + if ad.AllowLocalNfsUsersWithLdap != nil { + objectMap["allowLocalNfsUsersWithLdap"] = ad.AllowLocalNfsUsersWithLdap + } + return json.Marshal(objectMap) +} + +// AuthorizeRequest authorize request +type AuthorizeRequest struct { + // RemoteVolumeResourceID - Resource id of the remote volume + RemoteVolumeResourceID *string `json:"remoteVolumeResourceId,omitempty"` +} + +// Backup backup of a Volume +type Backup struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,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"` + // BackupProperties - Backup Properties + *BackupProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Backup. +func (b Backup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if b.Location != nil { + objectMap["location"] = b.Location + } + if b.BackupProperties != nil { + objectMap["properties"] = b.BackupProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Backup struct. +func (b *Backup) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + b.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + b.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + b.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + b.Type = &typeVar + } + case "properties": + if v != nil { + var backupProperties BackupProperties + err = json.Unmarshal(*v, &backupProperties) + if err != nil { + return err + } + b.BackupProperties = &backupProperties + } + } + } + + return nil +} + +// BackupPatch backup patch +type BackupPatch struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // BackupProperties - Backup Properties + *BackupProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupPatch. +func (bp BackupPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bp.Tags != nil { + objectMap["tags"] = bp.Tags + } + if bp.BackupProperties != nil { + objectMap["properties"] = bp.BackupProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackupPatch struct. +func (bp *BackupPatch) 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 "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bp.Tags = tags + } + case "properties": + if v != nil { + var backupProperties BackupProperties + err = json.Unmarshal(*v, &backupProperties) + if err != nil { + return err + } + bp.BackupProperties = &backupProperties + } + } + } + + return nil +} + +// BackupPoliciesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupPoliciesCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupPoliciesClient) (BackupPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupPoliciesCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupPoliciesCreateFuture.Result. +func (future *BackupPoliciesCreateFuture) result(client BackupPoliciesClient) (bp BackupPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.BackupPoliciesCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bp.Response.Response, err = future.GetResult(sender); err == nil && bp.Response.Response.StatusCode != http.StatusNoContent { + bp, err = client.CreateResponder(bp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesCreateFuture", "Result", bp.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupPoliciesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupPoliciesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupPoliciesDeleteFuture.Result. +func (future *BackupPoliciesDeleteFuture) result(client BackupPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.BackupPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// BackupPoliciesList list of Backup Policies +type BackupPoliciesList struct { + autorest.Response `json:"-"` + // Value - A list of backup policies + Value *[]BackupPolicy `json:"value,omitempty"` +} + +// BackupPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupPoliciesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupPoliciesClient) (BackupPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupPoliciesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupPoliciesUpdateFuture.Result. +func (future *BackupPoliciesUpdateFuture) result(client BackupPoliciesClient) (bp BackupPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.BackupPoliciesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bp.Response.Response, err = future.GetResult(sender); err == nil && bp.Response.Response.StatusCode != http.StatusNoContent { + bp, err = client.UpdateResponder(bp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesUpdateFuture", "Result", bp.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupPolicy backup policy information +type BackupPolicy struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // BackupPolicyProperties - Backup policy Properties + *BackupPolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupPolicy. +func (bp BackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bp.Location != nil { + objectMap["location"] = bp.Location + } + if bp.Tags != nil { + objectMap["tags"] = bp.Tags + } + if bp.BackupPolicyProperties != nil { + objectMap["properties"] = bp.BackupPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackupPolicy struct. +func (bp *BackupPolicy) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bp.Tags = tags + } + case "properties": + if v != nil { + var backupPolicyProperties BackupPolicyProperties + err = json.Unmarshal(*v, &backupPolicyProperties) + if err != nil { + return err + } + bp.BackupPolicyProperties = &backupPolicyProperties + } + } + } + + return nil +} + +// BackupPolicyDetails backup policy properties +type BackupPolicyDetails struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // BackupPolicyProperties - Backup policy Properties + *BackupPolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupPolicyDetails. +func (bpd BackupPolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bpd.Location != nil { + objectMap["location"] = bpd.Location + } + if bpd.Tags != nil { + objectMap["tags"] = bpd.Tags + } + if bpd.BackupPolicyProperties != nil { + objectMap["properties"] = bpd.BackupPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackupPolicyDetails struct. +func (bpd *BackupPolicyDetails) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bpd.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bpd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bpd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bpd.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bpd.Tags = tags + } + case "properties": + if v != nil { + var backupPolicyProperties BackupPolicyProperties + err = json.Unmarshal(*v, &backupPolicyProperties) + if err != nil { + return err + } + bpd.BackupPolicyProperties = &backupPolicyProperties + } + } + } + + return nil +} + +// BackupPolicyPatch backup policy Details for create and update +type BackupPolicyPatch struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // BackupPolicyProperties - Backup policy Properties + *BackupPolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupPolicyPatch. +func (bpp BackupPolicyPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bpp.Location != nil { + objectMap["location"] = bpp.Location + } + if bpp.Tags != nil { + objectMap["tags"] = bpp.Tags + } + if bpp.BackupPolicyProperties != nil { + objectMap["properties"] = bpp.BackupPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackupPolicyPatch struct. +func (bpp *BackupPolicyPatch) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bpp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bpp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bpp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bpp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bpp.Tags = tags + } + case "properties": + if v != nil { + var backupPolicyProperties BackupPolicyProperties + err = json.Unmarshal(*v, &backupPolicyProperties) + if err != nil { + return err + } + bpp.BackupPolicyProperties = &backupPolicyProperties + } + } + } + + return nil +} + +// BackupPolicyProperties backup policy properties +type BackupPolicyProperties struct { + // Name - READ-ONLY; Name of backup policy + Name *string `json:"name,omitempty"` + // BackupPolicyID - READ-ONLY; Backup Policy Resource ID + BackupPolicyID *string `json:"backupPolicyId,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` + // DailyBackupsToKeep - Daily backups count to keep + DailyBackupsToKeep *int32 `json:"dailyBackupsToKeep,omitempty"` + // WeeklyBackupsToKeep - Weekly backups count to keep + WeeklyBackupsToKeep *int32 `json:"weeklyBackupsToKeep,omitempty"` + // MonthlyBackupsToKeep - Monthly backups count to keep + MonthlyBackupsToKeep *int32 `json:"monthlyBackupsToKeep,omitempty"` + // VolumesAssigned - READ-ONLY; Volumes using current backup policy + VolumesAssigned *int32 `json:"volumesAssigned,omitempty"` + // Enabled - The property to decide policy is enabled or not + Enabled *bool `json:"enabled,omitempty"` + // VolumeBackups - READ-ONLY; A list of volumes assigned to this policy + VolumeBackups *[]VolumeBackups `json:"volumeBackups,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupPolicyProperties. +func (bpp BackupPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bpp.DailyBackupsToKeep != nil { + objectMap["dailyBackupsToKeep"] = bpp.DailyBackupsToKeep + } + if bpp.WeeklyBackupsToKeep != nil { + objectMap["weeklyBackupsToKeep"] = bpp.WeeklyBackupsToKeep + } + if bpp.MonthlyBackupsToKeep != nil { + objectMap["monthlyBackupsToKeep"] = bpp.MonthlyBackupsToKeep + } + if bpp.Enabled != nil { + objectMap["enabled"] = bpp.Enabled + } + return json.Marshal(objectMap) +} + +// BackupProperties backup properties +type BackupProperties struct { + // BackupID - READ-ONLY; UUID v4 used to identify the Backup + BackupID *string `json:"backupId,omitempty"` + // CreationDate - READ-ONLY; The creation date of the backup + CreationDate *date.Time `json:"creationDate,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` + // Size - READ-ONLY; Size of backup + Size *int64 `json:"size,omitempty"` + // Label - Label for backup + Label *string `json:"label,omitempty"` + // BackupType - READ-ONLY; Type of backup Manual or Scheduled. Possible values include: 'BackupTypeManual', 'BackupTypeScheduled' + BackupType BackupType `json:"backupType,omitempty"` + // FailureReason - READ-ONLY; Failure reason + FailureReason *string `json:"failureReason,omitempty"` + // VolumeName - READ-ONLY; Volume name + VolumeName *string `json:"volumeName,omitempty"` + // UseExistingSnapshot - Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + UseExistingSnapshot *bool `json:"useExistingSnapshot,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupProperties. +func (bp BackupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bp.Label != nil { + objectMap["label"] = bp.Label + } + if bp.UseExistingSnapshot != nil { + objectMap["useExistingSnapshot"] = bp.UseExistingSnapshot + } + return json.Marshal(objectMap) +} + +// BackupsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupsClient) (Backup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupsCreateFuture.Result. +func (future *BackupsCreateFuture) result(client BackupsClient) (b Backup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + b.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.BackupsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if b.Response.Response, err = future.GetResult(sender); err == nil && b.Response.Response.StatusCode != http.StatusNoContent { + b, err = client.CreateResponder(b.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsCreateFuture", "Result", b.Response.Response, "Failure responding to request") + } + } + return +} + +// BackupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupsDeleteFuture.Result. +func (future *BackupsDeleteFuture) result(client BackupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.BackupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// BackupsList list of Backups +type BackupsList struct { + autorest.Response `json:"-"` + // Value - A list of Backups + Value *[]Backup `json:"value,omitempty"` +} + +// BackupStatus backup status +type BackupStatus struct { + autorest.Response `json:"-"` + // Healthy - READ-ONLY; Backup health status + Healthy *bool `json:"healthy,omitempty"` + // RelationshipStatus - READ-ONLY; Status of the backup mirror relationship. Possible values include: 'RelationshipStatusIdle', 'RelationshipStatusTransferring' + RelationshipStatus RelationshipStatus `json:"relationshipStatus,omitempty"` + // MirrorState - READ-ONLY; The status of the backup. Possible values include: 'MirrorStateUninitialized', 'MirrorStateMirrored', 'MirrorStateBroken' + MirrorState MirrorState `json:"mirrorState,omitempty"` + // UnhealthyReason - READ-ONLY; Reason for the unhealthy backup relationship + UnhealthyReason *string `json:"unhealthyReason,omitempty"` + // ErrorMessage - READ-ONLY; Displays error message if the backup is in an error state + ErrorMessage *string `json:"errorMessage,omitempty"` + // LastTransferSize - READ-ONLY; Displays the last transfer size + LastTransferSize *int64 `json:"lastTransferSize,omitempty"` + // LastTransferType - READ-ONLY; Displays the last transfer type + LastTransferType *string `json:"lastTransferType,omitempty"` + // TotalTransferBytes - READ-ONLY; Displays the total bytes transferred + TotalTransferBytes *int64 `json:"totalTransferBytes,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackupStatus. +func (bs BackupStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BackupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BackupsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BackupsClient) (Backup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BackupsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BackupsUpdateFuture.Result. +func (future *BackupsUpdateFuture) result(client BackupsClient) (b Backup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + b.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.BackupsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if b.Response.Response, err = future.GetResult(sender); err == nil && b.Response.Response.StatusCode != http.StatusNoContent { + b, err = client.UpdateResponder(b.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.BackupsUpdateFuture", "Result", b.Response.Response, "Failure responding to request") + } + } + return +} + +// BreakReplicationRequest break replication request +type BreakReplicationRequest struct { + // ForceBreakReplication - If replication is in status transferring and you want to force break the replication, set to true + ForceBreakReplication *bool `json:"forceBreakReplication,omitempty"` +} + +// CapacityPool capacity pool resource +type CapacityPool struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // PoolProperties - Capacity pool properties + *PoolProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityPool. +func (cp CapacityPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cp.Location != nil { + objectMap["location"] = cp.Location + } + if cp.Tags != nil { + objectMap["tags"] = cp.Tags + } + if cp.PoolProperties != nil { + objectMap["properties"] = cp.PoolProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityPool struct. +func (cp *CapacityPool) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cp.Tags = tags + } + case "properties": + if v != nil { + var poolProperties PoolProperties + err = json.Unmarshal(*v, &poolProperties) + if err != nil { + return err + } + cp.PoolProperties = &poolProperties + } + } + } + + return nil +} + +// CapacityPoolList list of capacity pool resources +type CapacityPoolList struct { + autorest.Response `json:"-"` + // Value - List of Capacity pools + Value *[]CapacityPool `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// CapacityPoolListIterator provides access to a complete listing of CapacityPool values. +type CapacityPoolListIterator struct { + i int + page CapacityPoolListPage +} + +// 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 *CapacityPoolListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityPoolListIterator.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 *CapacityPoolListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CapacityPoolListIterator) 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 CapacityPoolListIterator) Response() CapacityPoolList { + 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 CapacityPoolListIterator) Value() CapacityPool { + if !iter.page.NotDone() { + return CapacityPool{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CapacityPoolListIterator type. +func NewCapacityPoolListIterator(page CapacityPoolListPage) CapacityPoolListIterator { + return CapacityPoolListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cpl CapacityPoolList) IsEmpty() bool { + return cpl.Value == nil || len(*cpl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (cpl CapacityPoolList) hasNextLink() bool { + return cpl.NextLink != nil && len(*cpl.NextLink) != 0 +} + +// capacityPoolListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cpl CapacityPoolList) capacityPoolListPreparer(ctx context.Context) (*http.Request, error) { + if !cpl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cpl.NextLink))) +} + +// CapacityPoolListPage contains a page of CapacityPool values. +type CapacityPoolListPage struct { + fn func(context.Context, CapacityPoolList) (CapacityPoolList, error) + cpl CapacityPoolList +} + +// 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 *CapacityPoolListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityPoolListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.cpl) + if err != nil { + return err + } + page.cpl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *CapacityPoolListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CapacityPoolListPage) NotDone() bool { + return !page.cpl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CapacityPoolListPage) Response() CapacityPoolList { + return page.cpl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CapacityPoolListPage) Values() []CapacityPool { + if page.cpl.IsEmpty() { + return nil + } + return *page.cpl.Value +} + +// Creates a new instance of the CapacityPoolListPage type. +func NewCapacityPoolListPage(cur CapacityPoolList, getNextPage func(context.Context, CapacityPoolList) (CapacityPoolList, error)) CapacityPoolListPage { + return CapacityPoolListPage{ + fn: getNextPage, + cpl: cur, + } +} + +// CapacityPoolPatch capacity pool patch resource +type CapacityPoolPatch struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // PoolPatchProperties - Capacity pool properties + *PoolPatchProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityPoolPatch. +func (cpp CapacityPoolPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cpp.Location != nil { + objectMap["location"] = cpp.Location + } + if cpp.Tags != nil { + objectMap["tags"] = cpp.Tags + } + if cpp.PoolPatchProperties != nil { + objectMap["properties"] = cpp.PoolPatchProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityPoolPatch struct. +func (cpp *CapacityPoolPatch) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cpp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cpp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cpp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cpp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cpp.Tags = tags + } + case "properties": + if v != nil { + var poolPatchProperties PoolPatchProperties + err = json.Unmarshal(*v, &poolPatchProperties) + if err != nil { + return err + } + cpp.PoolPatchProperties = &poolPatchProperties + } + } + } + + return nil +} + +// CheckAvailabilityResponse information regarding availability of a resource. +type CheckAvailabilityResponse struct { + autorest.Response `json:"-"` + // IsAvailable - true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. + IsAvailable *bool `json:"isAvailable,omitempty"` + // Reason - Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'InAvailabilityReasonTypeInvalid', 'InAvailabilityReasonTypeAlreadyExists' + Reason InAvailabilityReasonType `json:"reason,omitempty"` + // Message - If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + Message *string `json:"message,omitempty"` +} + +// CloudError an error response from the service. +type CloudError struct { + // Error - Cloud error body. + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody an error response from the service. +type CloudErrorBody 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"` +} + +// DailySchedule daily Schedule properties +type DailySchedule struct { + // SnapshotsToKeep - Daily snapshot count to keep + SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` + // Hour - Indicates which hour in UTC timezone a snapshot should be taken + Hour *int32 `json:"hour,omitempty"` + // Minute - Indicates which minute snapshot should be taken + Minute *int32 `json:"minute,omitempty"` + // UsedBytes - Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 `json:"usedBytes,omitempty"` +} + +// Dimension dimension of blobs, possibly be blob type or access tier. +type Dimension struct { + // Name - Display name of dimension. + Name *string `json:"name,omitempty"` + // DisplayName - Display name of dimension. + DisplayName *string `json:"displayName,omitempty"` +} + +// ExportPolicyRule volume Export Policy Rule +type ExportPolicyRule struct { + // RuleIndex - Order index + RuleIndex *int32 `json:"ruleIndex,omitempty"` + // UnixReadOnly - Read only access + UnixReadOnly *bool `json:"unixReadOnly,omitempty"` + // UnixReadWrite - Read and write access + UnixReadWrite *bool `json:"unixReadWrite,omitempty"` + // Kerberos5ReadOnly - Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later + Kerberos5ReadOnly *bool `json:"kerberos5ReadOnly,omitempty"` + // Kerberos5ReadWrite - Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later + Kerberos5ReadWrite *bool `json:"kerberos5ReadWrite,omitempty"` + // Kerberos5iReadOnly - Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later + Kerberos5iReadOnly *bool `json:"kerberos5iReadOnly,omitempty"` + // Kerberos5iReadWrite - Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later + Kerberos5iReadWrite *bool `json:"kerberos5iReadWrite,omitempty"` + // Kerberos5pReadOnly - Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later + Kerberos5pReadOnly *bool `json:"kerberos5pReadOnly,omitempty"` + // Kerberos5pReadWrite - Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later + Kerberos5pReadWrite *bool `json:"kerberos5pReadWrite,omitempty"` + // Cifs - Allows CIFS protocol + Cifs *bool `json:"cifs,omitempty"` + // Nfsv3 - Allows NFSv3 protocol. Enable only for NFSv3 type volumes + Nfsv3 *bool `json:"nfsv3,omitempty"` + // Nfsv41 - Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes + Nfsv41 *bool `json:"nfsv41,omitempty"` + // AllowedClients - Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names + AllowedClients *string `json:"allowedClients,omitempty"` + // HasRootAccess - Has root access to volume + HasRootAccess *bool `json:"hasRootAccess,omitempty"` + // ChownMode - This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. Possible values include: 'ChownModeRestricted', 'ChownModeUnrestricted' + ChownMode ChownMode `json:"chownMode,omitempty"` +} + +// FilePathAvailabilityRequest file path availability request content - availability is based on the name +// and the subnetId. +type FilePathAvailabilityRequest struct { + // Name - File path to verify. + Name *string `json:"name,omitempty"` + // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + SubnetID *string `json:"subnetId,omitempty"` +} + +// HourlySchedule hourly Schedule properties +type HourlySchedule struct { + // SnapshotsToKeep - Hourly snapshot count to keep + SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` + // Minute - Indicates which minute snapshot should be taken + Minute *int32 `json:"minute,omitempty"` + // UsedBytes - Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 `json:"usedBytes,omitempty"` +} + +// MetricSpecification metric specification of operation. +type MetricSpecification struct { + // Name - Name of metric specification. + Name *string `json:"name,omitempty"` + // DisplayName - Display name of metric specification. + DisplayName *string `json:"displayName,omitempty"` + // DisplayDescription - Display description of metric specification. + DisplayDescription *string `json:"displayDescription,omitempty"` + // Unit - Unit could be Bytes or Count. + Unit *string `json:"unit,omitempty"` + // SupportedAggregationTypes - Support metric aggregation type. + SupportedAggregationTypes *[]MetricAggregationType `json:"supportedAggregationTypes,omitempty"` + // SupportedTimeGrainTypes - The supported time grain types for the metrics. + SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"` + // InternalMetricName - The internal metric name. + InternalMetricName *string `json:"internalMetricName,omitempty"` + // SourceMdmAccount - The source MDM account. + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + // SourceMdmNamespace - The source MDM namespace. + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + // Dimensions - Dimensions of blobs, including blob type and access tier. + Dimensions *[]Dimension `json:"dimensions,omitempty"` + // AggregationType - Aggregation type could be Average. + AggregationType *string `json:"aggregationType,omitempty"` + // FillGapWithZero - The property to decide fill gap with zero or not. + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + // Category - The category this metric specification belong to, could be Capacity. + Category *string `json:"category,omitempty"` + // ResourceIDDimensionNameOverride - Account Resource Id. + ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` +} + +// MonthlySchedule monthly Schedule properties +type MonthlySchedule struct { + // SnapshotsToKeep - Monthly snapshot count to keep + SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` + // DaysOfMonth - Indicates which days of the month snapshot should be taken. A comma delimited string. + DaysOfMonth *string `json:"daysOfMonth,omitempty"` + // Hour - Indicates which hour in UTC timezone a snapshot should be taken + Hour *int32 `json:"hour,omitempty"` + // Minute - Indicates which minute snapshot should be taken + Minute *int32 `json:"minute,omitempty"` + // UsedBytes - Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 `json:"usedBytes,omitempty"` +} + +// MountTarget mount Target +type MountTarget struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // MountTargetProperties - Mount Target Properties + *MountTargetProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for MountTarget. +func (mt MountTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mt.Location != nil { + objectMap["location"] = mt.Location + } + if mt.Tags != nil { + objectMap["tags"] = mt.Tags + } + if mt.MountTargetProperties != nil { + objectMap["properties"] = mt.MountTargetProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MountTarget struct. +func (mt *MountTarget) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mt.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mt.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mt.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mt.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mt.Tags = tags + } + case "properties": + if v != nil { + var mountTargetProperties MountTargetProperties + err = json.Unmarshal(*v, &mountTargetProperties) + if err != nil { + return err + } + mt.MountTargetProperties = &mountTargetProperties + } + } + } + + return nil +} + +// MountTargetProperties mount target properties +type MountTargetProperties struct { + // MountTargetID - READ-ONLY; UUID v4 used to identify the MountTarget + MountTargetID *string `json:"mountTargetId,omitempty"` + // FileSystemID - UUID v4 used to identify the MountTarget + FileSystemID *string `json:"fileSystemId,omitempty"` + // IPAddress - READ-ONLY; The mount target's IPv4 address + IPAddress *string `json:"ipAddress,omitempty"` + // SmbServerFqdn - The SMB server's Fully Qualified Domain Name, FQDN + SmbServerFqdn *string `json:"smbServerFqdn,omitempty"` +} + +// MarshalJSON is the custom marshaler for MountTargetProperties. +func (mtp MountTargetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mtp.FileSystemID != nil { + objectMap["fileSystemId"] = mtp.FileSystemID + } + if mtp.SmbServerFqdn != nil { + objectMap["smbServerFqdn"] = mtp.SmbServerFqdn + } + return json.Marshal(objectMap) +} + +// Operation microsoft.NetApp REST API operation definition. +type Operation struct { + // Name - Operation name: {provider}/{resource}/{operation} + Name *string `json:"name,omitempty"` + // Display - Display metadata associated with the operation. + Display *OperationDisplay `json:"display,omitempty"` + // Origin - The origin of operations. + Origin *string `json:"origin,omitempty"` + // OperationProperties - Properties of operation, include metric specifications. + *OperationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if o.Name != nil { + objectMap["name"] = o.Name + } + if o.Display != nil { + objectMap["display"] = o.Display + } + if o.Origin != nil { + objectMap["origin"] = o.Origin + } + if o.OperationProperties != nil { + objectMap["properties"] = o.OperationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Operation struct. +func (o *Operation) 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 + } + o.Name = &name + } + case "display": + if v != nil { + var display OperationDisplay + err = json.Unmarshal(*v, &display) + if err != nil { + return err + } + o.Display = &display + } + case "origin": + if v != nil { + var origin string + err = json.Unmarshal(*v, &origin) + if err != nil { + return err + } + o.Origin = &origin + } + case "properties": + if v != nil { + var operationProperties OperationProperties + err = json.Unmarshal(*v, &operationProperties) + if err != nil { + return err + } + o.OperationProperties = &operationProperties + } + } + } + + return nil +} + +// OperationDisplay display metadata associated with the operation. +type OperationDisplay struct { + // Provider - Service provider: Microsoft NetApp. + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed etc. + Resource *string `json:"resource,omitempty"` + // Operation - Type of operation: get, read, delete, etc. + Operation *string `json:"operation,omitempty"` + // Description - Operation description. + Description *string `json:"description,omitempty"` +} + +// OperationListResult result of the request to list Cloud Volume 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 Storage operations supported by the Storage resource provider. + Value *[]Operation `json:"value,omitempty"` +} + +// OperationProperties properties of operation, include metric specifications. +type OperationProperties struct { + // ServiceSpecification - One property of operation, include metric specifications. + ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// PoolChangeRequest pool change request +type PoolChangeRequest struct { + // NewPoolResourceID - Resource id of the pool to move volume to + NewPoolResourceID *string `json:"newPoolResourceId,omitempty"` +} + +// PoolPatchProperties patchable pool properties +type PoolPatchProperties struct { + // Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). + Size *int64 `json:"size,omitempty"` + // QosType - The qos type of the pool. Possible values include: 'QosTypeAuto', 'QosTypeManual' + QosType QosType `json:"qosType,omitempty"` +} + +// PoolProperties pool properties +type PoolProperties struct { + // PoolID - READ-ONLY; UUID v4 used to identify the Pool + PoolID *string `json:"poolId,omitempty"` + // Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). + Size *int64 `json:"size,omitempty"` + // ServiceLevel - Possible values include: 'ServiceLevelStandard', 'ServiceLevelPremium', 'ServiceLevelUltra', 'ServiceLevelStandardZRS' + ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` + // TotalThroughputMibps - READ-ONLY; Total throughput of pool in Mibps + TotalThroughputMibps *float64 `json:"totalThroughputMibps,omitempty"` + // UtilizedThroughputMibps - READ-ONLY; Utilized throughput of pool in Mibps + UtilizedThroughputMibps *float64 `json:"utilizedThroughputMibps,omitempty"` + // QosType - The qos type of the pool. Possible values include: 'QosTypeAuto', 'QosTypeManual' + QosType QosType `json:"qosType,omitempty"` + // CoolAccess - If enabled (true) the pool can contain cool Access enabled volumes. + CoolAccess *bool `json:"coolAccess,omitempty"` + // EncryptionType - Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. Possible values include: 'EncryptionTypeSingle', 'EncryptionTypeDouble' + EncryptionType EncryptionType `json:"encryptionType,omitempty"` +} + +// MarshalJSON is the custom marshaler for PoolProperties. +func (pp PoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pp.Size != nil { + objectMap["size"] = pp.Size + } + if pp.ServiceLevel != "" { + objectMap["serviceLevel"] = pp.ServiceLevel + } + if pp.QosType != "" { + objectMap["qosType"] = pp.QosType + } + if pp.CoolAccess != nil { + objectMap["coolAccess"] = pp.CoolAccess + } + if pp.EncryptionType != "" { + objectMap["encryptionType"] = pp.EncryptionType + } + return json.Marshal(objectMap) +} + +// PoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PoolsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PoolsClient) (CapacityPool, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PoolsCreateOrUpdateFuture.Result. +func (future *PoolsCreateOrUpdateFuture) result(client PoolsClient) (cp CapacityPool, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.PoolsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cp.Response.Response, err = future.GetResult(sender); err == nil && cp.Response.Response.StatusCode != http.StatusNoContent { + cp, err = client.CreateOrUpdateResponder(cp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsCreateOrUpdateFuture", "Result", cp.Response.Response, "Failure responding to request") + } + } + return +} + +// PoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type PoolsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PoolsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PoolsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PoolsDeleteFuture.Result. +func (future *PoolsDeleteFuture) result(client PoolsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.PoolsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type PoolsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PoolsClient) (CapacityPool, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PoolsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PoolsUpdateFuture.Result. +func (future *PoolsUpdateFuture) result(client PoolsClient) (cp CapacityPool, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.PoolsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cp.Response.Response, err = future.GetResult(sender); err == nil && cp.Response.Response.StatusCode != http.StatusNoContent { + cp, err = client.UpdateResponder(cp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsUpdateFuture", "Result", cp.Response.Response, "Failure responding to request") + } + } + return +} + +// QuotaAvailabilityRequest quota availability request content. +type QuotaAvailabilityRequest struct { + // Name - Name of the resource to verify. + Name *string `json:"name,omitempty"` + // Type - Resource type used for verification. Possible values include: 'CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccounts', 'CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools', 'CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes', 'CheckQuotaNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots' + Type CheckQuotaNameResourceTypes `json:"type,omitempty"` + // ResourceGroup - Resource group name. + ResourceGroup *string `json:"resourceGroup,omitempty"` +} + +// ReplicationObject replication properties +type ReplicationObject struct { + // ReplicationID - Id + ReplicationID *string `json:"replicationId,omitempty"` + // EndpointType - Indicates whether the local volume is the source or destination for the Volume Replication. Possible values include: 'EndpointTypeSrc', 'EndpointTypeDst' + EndpointType EndpointType `json:"endpointType,omitempty"` + // ReplicationSchedule - Schedule. Possible values include: 'ReplicationSchedule10minutely', 'ReplicationScheduleHourly', 'ReplicationScheduleDaily' + ReplicationSchedule ReplicationSchedule `json:"replicationSchedule,omitempty"` + // RemoteVolumeResourceID - The resource ID of the remote volume. + RemoteVolumeResourceID *string `json:"remoteVolumeResourceId,omitempty"` + // RemoteVolumeRegion - The remote region for the other end of the Volume Replication. + RemoteVolumeRegion *string `json:"remoteVolumeRegion,omitempty"` +} + +// ReplicationStatus replication status +type ReplicationStatus struct { + autorest.Response `json:"-"` + // Healthy - Replication health check + Healthy *bool `json:"healthy,omitempty"` + // RelationshipStatus - Status of the mirror relationship. Possible values include: 'RelationshipStatusIdle', 'RelationshipStatusTransferring' + RelationshipStatus RelationshipStatus `json:"relationshipStatus,omitempty"` + // MirrorState - The status of the replication. Possible values include: 'MirrorStateUninitialized', 'MirrorStateMirrored', 'MirrorStateBroken' + MirrorState MirrorState `json:"mirrorState,omitempty"` + // TotalProgress - The progress of the replication + TotalProgress *string `json:"totalProgress,omitempty"` + // ErrorMessage - Displays error message if the replication is in an error state + ErrorMessage *string `json:"errorMessage,omitempty"` +} + +// ResourceIdentity identity for the resource. +type ResourceIdentity struct { + // PrincipalID - READ-ONLY; Object id of the identity resource + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id of the resource + TenantID *string `json:"tenantId,omitempty"` + // Type - Type of Identity. Supported values are: 'None', 'SystemAssigned' + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceIdentity. +func (ri ResourceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ri.Type != nil { + objectMap["type"] = ri.Type + } + return json.Marshal(objectMap) +} + +// ResourceNameAvailabilityRequest resource name availability request content. +type ResourceNameAvailabilityRequest struct { + // Name - Resource name to verify. + Name *string `json:"name,omitempty"` + // Type - Resource type used for verification. Possible values include: 'CheckNameResourceTypesMicrosoftNetAppnetAppAccounts', 'CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPools', 'CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumes', 'CheckNameResourceTypesMicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots' + Type CheckNameResourceTypes `json:"type,omitempty"` + // ResourceGroup - Resource group name. + ResourceGroup *string `json:"resourceGroup,omitempty"` +} + +// RestoreStatus restore status +type RestoreStatus struct { + autorest.Response `json:"-"` + // Healthy - READ-ONLY; Restore health status + Healthy *bool `json:"healthy,omitempty"` + // RelationshipStatus - READ-ONLY; Status of the restore SnapMirror relationship. Possible values include: 'RelationshipStatusIdle', 'RelationshipStatusTransferring' + RelationshipStatus RelationshipStatus `json:"relationshipStatus,omitempty"` + // MirrorState - READ-ONLY; The status of the restore. Possible values include: 'MirrorStateUninitialized', 'MirrorStateMirrored', 'MirrorStateBroken' + MirrorState MirrorState `json:"mirrorState,omitempty"` + // UnhealthyReason - READ-ONLY; Reason for the unhealthy restore relationship + UnhealthyReason *string `json:"unhealthyReason,omitempty"` + // ErrorMessage - READ-ONLY; Displays error message if the restore is in an error state + ErrorMessage *string `json:"errorMessage,omitempty"` + // TotalTransferBytes - READ-ONLY; Displays the total bytes transferred + TotalTransferBytes *int64 `json:"totalTransferBytes,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestoreStatus. +func (rs RestoreStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServiceSpecification one property of operation, include metric specifications. +type ServiceSpecification struct { + // MetricSpecifications - Metric specifications of operation. + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` +} + +// Snapshot snapshot of a Volume +type Snapshot struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,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"` + // SnapshotProperties - Snapshot Properties + *SnapshotProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Snapshot. +func (s Snapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Location != nil { + objectMap["location"] = s.Location + } + if s.SnapshotProperties != nil { + objectMap["properties"] = s.SnapshotProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Snapshot struct. +func (s *Snapshot) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + s.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + case "properties": + if v != nil { + var snapshotProperties SnapshotProperties + err = json.Unmarshal(*v, &snapshotProperties) + if err != nil { + return err + } + s.SnapshotProperties = &snapshotProperties + } + } + } + + return nil +} + +// SnapshotPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotPoliciesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotPoliciesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotPoliciesDeleteFuture.Result. +func (future *SnapshotPoliciesDeleteFuture) result(client SnapshotPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.SnapshotPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SnapshotPoliciesList list of Snapshot Policies +type SnapshotPoliciesList struct { + autorest.Response `json:"-"` + // Value - A list of snapshot policies + Value *[]SnapshotPolicy `json:"value,omitempty"` +} + +// SnapshotPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotPoliciesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotPoliciesClient) (SnapshotPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotPoliciesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotPoliciesUpdateFuture.Result. +func (future *SnapshotPoliciesUpdateFuture) result(client SnapshotPoliciesClient) (sp SnapshotPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.SnapshotPoliciesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sp.Response.Response, err = future.GetResult(sender); err == nil && sp.Response.Response.StatusCode != http.StatusNoContent { + sp, err = client.UpdateResponder(sp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesUpdateFuture", "Result", sp.Response.Response, "Failure responding to request") + } + } + return +} + +// SnapshotPolicy snapshot policy information +type SnapshotPolicy struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // SnapshotPolicyProperties - Snapshot policy Properties + *SnapshotPolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotPolicy. +func (sp SnapshotPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.Location != nil { + objectMap["location"] = sp.Location + } + if sp.Tags != nil { + objectMap["tags"] = sp.Tags + } + if sp.SnapshotPolicyProperties != nil { + objectMap["properties"] = sp.SnapshotPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SnapshotPolicy struct. +func (sp *SnapshotPolicy) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sp.Tags = tags + } + case "properties": + if v != nil { + var snapshotPolicyProperties SnapshotPolicyProperties + err = json.Unmarshal(*v, &snapshotPolicyProperties) + if err != nil { + return err + } + sp.SnapshotPolicyProperties = &snapshotPolicyProperties + } + } + } + + return nil +} + +// SnapshotPolicyDetails snapshot policy properties +type SnapshotPolicyDetails struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // SnapshotPolicyProperties - Snapshot policy Properties + *SnapshotPolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotPolicyDetails. +func (spd SnapshotPolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spd.Location != nil { + objectMap["location"] = spd.Location + } + if spd.Tags != nil { + objectMap["tags"] = spd.Tags + } + if spd.SnapshotPolicyProperties != nil { + objectMap["properties"] = spd.SnapshotPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SnapshotPolicyDetails struct. +func (spd *SnapshotPolicyDetails) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spd.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spd.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spd.Tags = tags + } + case "properties": + if v != nil { + var snapshotPolicyProperties SnapshotPolicyProperties + err = json.Unmarshal(*v, &snapshotPolicyProperties) + if err != nil { + return err + } + spd.SnapshotPolicyProperties = &snapshotPolicyProperties + } + } + } + + return nil +} + +// SnapshotPolicyPatch snapshot policy Details for create and update +type SnapshotPolicyPatch struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // SnapshotPolicyProperties - Snapshot Policy properties + *SnapshotPolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotPolicyPatch. +func (spp SnapshotPolicyPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spp.Location != nil { + objectMap["location"] = spp.Location + } + if spp.Tags != nil { + objectMap["tags"] = spp.Tags + } + if spp.SnapshotPolicyProperties != nil { + objectMap["properties"] = spp.SnapshotPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SnapshotPolicyPatch struct. +func (spp *SnapshotPolicyPatch) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spp.Tags = tags + } + case "properties": + if v != nil { + var snapshotPolicyProperties SnapshotPolicyProperties + err = json.Unmarshal(*v, &snapshotPolicyProperties) + if err != nil { + return err + } + spp.SnapshotPolicyProperties = &snapshotPolicyProperties + } + } + } + + return nil +} + +// SnapshotPolicyProperties snapshot policy properties +type SnapshotPolicyProperties struct { + // HourlySchedule - Schedule for hourly snapshots + HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` + // DailySchedule - Schedule for daily snapshots + DailySchedule *DailySchedule `json:"dailySchedule,omitempty"` + // WeeklySchedule - Schedule for weekly snapshots + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` + // MonthlySchedule - Schedule for monthly snapshots + MonthlySchedule *MonthlySchedule `json:"monthlySchedule,omitempty"` + // Enabled - The property to decide policy is enabled or not + Enabled *bool `json:"enabled,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotPolicyProperties. +func (spp SnapshotPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spp.HourlySchedule != nil { + objectMap["hourlySchedule"] = spp.HourlySchedule + } + if spp.DailySchedule != nil { + objectMap["dailySchedule"] = spp.DailySchedule + } + if spp.WeeklySchedule != nil { + objectMap["weeklySchedule"] = spp.WeeklySchedule + } + if spp.MonthlySchedule != nil { + objectMap["monthlySchedule"] = spp.MonthlySchedule + } + if spp.Enabled != nil { + objectMap["enabled"] = spp.Enabled + } + return json.Marshal(objectMap) +} + +// SnapshotPolicyVolumeList volumes associated with snapshot policy +type SnapshotPolicyVolumeList struct { + autorest.Response `json:"-"` + // Value - List of volumes + Value *[]interface{} `json:"value,omitempty"` +} + +// SnapshotProperties snapshot properties +type SnapshotProperties struct { + // SnapshotID - READ-ONLY; UUID v4 used to identify the Snapshot + SnapshotID *string `json:"snapshotId,omitempty"` + // Created - READ-ONLY; The creation date of the snapshot + Created *date.Time `json:"created,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotProperties. +func (sp SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SnapshotsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (Snapshot, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsCreateFuture.Result. +func (future *SnapshotsCreateFuture) result(client SnapshotsClient) (s Snapshot, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.SnapshotsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsCreateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsDeleteFuture.Result. +func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.SnapshotsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SnapshotsList list of Snapshots +type SnapshotsList struct { + autorest.Response `json:"-"` + // Value - A list of Snapshots + Value *[]Snapshot `json:"value,omitempty"` +} + +// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SnapshotsClient) (Snapshot, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SnapshotsUpdateFuture.Result. +func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.SnapshotsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.UpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SystemData metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + CreatedByType CreatedByType `json:"createdByType,omitempty"` + // CreatedAt - The timestamp of resource creation (UTC). + CreatedAt *date.Time `json:"createdAt,omitempty"` + // LastModifiedBy - The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` + // LastModifiedAt - The timestamp of resource last modification (UTC) + LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` +} + +// Vault vault information +type Vault struct { + // Location - Resource location + Location *string `json:"location,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"` + // VaultProperties - Vault Properties + *VaultProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Vault. +func (vVar Vault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vVar.Location != nil { + objectMap["location"] = vVar.Location + } + if vVar.VaultProperties != nil { + objectMap["properties"] = vVar.VaultProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Vault struct. +func (vVar *Vault) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vVar.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vVar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vVar.Type = &typeVar + } + case "properties": + if v != nil { + var vaultProperties VaultProperties + err = json.Unmarshal(*v, &vaultProperties) + if err != nil { + return err + } + vVar.VaultProperties = &vaultProperties + } + } + } + + return nil +} + +// VaultList list of Vaults +type VaultList struct { + autorest.Response `json:"-"` + // Value - A list of vaults + Value *[]Vault `json:"value,omitempty"` +} + +// VaultProperties vault properties +type VaultProperties struct { + // VaultName - Vault Name + VaultName *string `json:"vaultName,omitempty"` +} + +// Volume volume resource +type Volume struct { + autorest.Response `json:"-"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // VolumeProperties - Volume properties + *VolumeProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Volume. +func (vVar Volume) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vVar.Location != nil { + objectMap["location"] = vVar.Location + } + if vVar.Tags != nil { + objectMap["tags"] = vVar.Tags + } + if vVar.VolumeProperties != nil { + objectMap["properties"] = vVar.VolumeProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Volume struct. +func (vVar *Volume) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vVar.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vVar.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vVar.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vVar.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vVar.Tags = tags + } + case "properties": + if v != nil { + var volumeProperties VolumeProperties + err = json.Unmarshal(*v, &volumeProperties) + if err != nil { + return err + } + vVar.VolumeProperties = &volumeProperties + } + } + } + + return nil +} + +// VolumeBackupProperties volume Backup Properties +type VolumeBackupProperties struct { + // BackupPolicyID - Backup Policy Resource ID + BackupPolicyID *string `json:"backupPolicyId,omitempty"` + // PolicyEnforced - Policy Enforced + PolicyEnforced *bool `json:"policyEnforced,omitempty"` + // VaultID - Vault Resource ID + VaultID *string `json:"vaultId,omitempty"` + // BackupEnabled - Backup Enabled + BackupEnabled *bool `json:"backupEnabled,omitempty"` +} + +// VolumeBackups volume details using the backup policy +type VolumeBackups struct { + // VolumeName - Volume name + VolumeName *string `json:"volumeName,omitempty"` + // BackupsCount - Total count of backups for volume + BackupsCount *int32 `json:"backupsCount,omitempty"` + // PolicyEnabled - Policy enabled + PolicyEnabled *bool `json:"policyEnabled,omitempty"` +} + +// VolumeList list of volume resources +type VolumeList struct { + autorest.Response `json:"-"` + // Value - List of volumes + Value *[]Volume `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VolumeListIterator provides access to a complete listing of Volume values. +type VolumeListIterator struct { + i int + page VolumeListPage +} + +// 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 *VolumeListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumeListIterator.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 *VolumeListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VolumeListIterator) 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 VolumeListIterator) Response() VolumeList { + 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 VolumeListIterator) Value() Volume { + if !iter.page.NotDone() { + return Volume{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VolumeListIterator type. +func NewVolumeListIterator(page VolumeListPage) VolumeListIterator { + return VolumeListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vl VolumeList) IsEmpty() bool { + return vl.Value == nil || len(*vl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vl VolumeList) hasNextLink() bool { + return vl.NextLink != nil && len(*vl.NextLink) != 0 +} + +// volumeListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vl VolumeList) volumeListPreparer(ctx context.Context) (*http.Request, error) { + if !vl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vl.NextLink))) +} + +// VolumeListPage contains a page of Volume values. +type VolumeListPage struct { + fn func(context.Context, VolumeList) (VolumeList, error) + vl VolumeList +} + +// 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 *VolumeListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumeListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vl) + if err != nil { + return err + } + page.vl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VolumeListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VolumeListPage) NotDone() bool { + return !page.vl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VolumeListPage) Response() VolumeList { + return page.vl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VolumeListPage) Values() []Volume { + if page.vl.IsEmpty() { + return nil + } + return *page.vl.Value +} + +// Creates a new instance of the VolumeListPage type. +func NewVolumeListPage(cur VolumeList, getNextPage func(context.Context, VolumeList) (VolumeList, error)) VolumeListPage { + return VolumeListPage{ + fn: getNextPage, + vl: cur, + } +} + +// VolumePatch volume patch resource +type VolumePatch struct { + // Location - Resource location + Location *string `json:"location,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"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // VolumePatchProperties - Patchable volume properties + *VolumePatchProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for VolumePatch. +func (vp VolumePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vp.Location != nil { + objectMap["location"] = vp.Location + } + if vp.Tags != nil { + objectMap["tags"] = vp.Tags + } + if vp.VolumePatchProperties != nil { + objectMap["properties"] = vp.VolumePatchProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VolumePatch struct. +func (vp *VolumePatch) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vp.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vp.Tags = tags + } + case "properties": + if v != nil { + var volumePatchProperties VolumePatchProperties + err = json.Unmarshal(*v, &volumePatchProperties) + if err != nil { + return err + } + vp.VolumePatchProperties = &volumePatchProperties + } + } + } + + return nil +} + +// VolumePatchProperties patchable volume properties +type VolumePatchProperties struct { + // ServiceLevel - Possible values include: 'ServiceLevelStandard', 'ServiceLevelPremium', 'ServiceLevelUltra', 'ServiceLevelStandardZRS' + ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` + // UsageThreshold - Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. + UsageThreshold *int64 `json:"usageThreshold,omitempty"` + // ExportPolicy - Set of export policy rules + ExportPolicy *VolumePatchPropertiesExportPolicy `json:"exportPolicy,omitempty"` + ThroughputMibps *float64 `json:"throughputMibps,omitempty"` + // DataProtection - DataProtection type volumes include an object containing details of the replication + DataProtection *VolumePatchPropertiesDataProtection `json:"dataProtection,omitempty"` + // IsDefaultQuotaEnabled - Specifies if default quota is enabled for the volume. + IsDefaultQuotaEnabled *bool `json:"isDefaultQuotaEnabled,omitempty"` + // DefaultUserQuotaInKiBs - Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + DefaultUserQuotaInKiBs *int64 `json:"defaultUserQuotaInKiBs,omitempty"` + // DefaultGroupQuotaInKiBs - Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + DefaultGroupQuotaInKiBs *int64 `json:"defaultGroupQuotaInKiBs,omitempty"` +} + +// VolumePatchPropertiesDataProtection dataProtection type volumes include an object containing details of +// the replication +type VolumePatchPropertiesDataProtection struct { + // Backup - Backup Properties + Backup *VolumeBackupProperties `json:"backup,omitempty"` + // Snapshot - Snapshot properties. + Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` +} + +// VolumePatchPropertiesExportPolicy set of export policy rules +type VolumePatchPropertiesExportPolicy struct { + // Rules - Export policy rule + Rules *[]ExportPolicyRule `json:"rules,omitempty"` +} + +// VolumeProperties volume properties +type VolumeProperties struct { + // FileSystemID - READ-ONLY; Unique FileSystem Identifier. + FileSystemID *string `json:"fileSystemId,omitempty"` + // CreationToken - A unique file path for the volume. Used when creating mount targets + CreationToken *string `json:"creationToken,omitempty"` + // ServiceLevel - Possible values include: 'ServiceLevelStandard', 'ServiceLevelPremium', 'ServiceLevelUltra', 'ServiceLevelStandardZRS' + ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` + // UsageThreshold - Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. + UsageThreshold *int64 `json:"usageThreshold,omitempty"` + // ExportPolicy - Set of export policy rules + ExportPolicy *VolumePropertiesExportPolicy `json:"exportPolicy,omitempty"` + // ProtocolTypes - Set of protocol types, default NFSv3, CIFS for SMB protocol + ProtocolTypes *[]string `json:"protocolTypes,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` + // SnapshotID - UUID v4 or resource identifier used to identify the Snapshot. + SnapshotID *string `json:"snapshotId,omitempty"` + // BackupID - UUID v4 or resource identifier used to identify the Backup. + BackupID *string `json:"backupId,omitempty"` + // BaremetalTenantID - READ-ONLY; Unique Baremetal Tenant Identifier. + BaremetalTenantID *string `json:"baremetalTenantId,omitempty"` + // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + SubnetID *string `json:"subnetId,omitempty"` + // MountTargets - READ-ONLY; List of mount targets + MountTargets *[]MountTargetProperties `json:"mountTargets,omitempty"` + // VolumeType - What type of volume is this + VolumeType *string `json:"volumeType,omitempty"` + // DataProtection - DataProtection type volumes include an object containing details of the replication + DataProtection *VolumePropertiesDataProtection `json:"dataProtection,omitempty"` + // IsRestoring - Restoring + IsRestoring *bool `json:"isRestoring,omitempty"` + // SnapshotDirectoryVisible - If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (default to true). + SnapshotDirectoryVisible *bool `json:"snapshotDirectoryVisible,omitempty"` + // KerberosEnabled - Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + KerberosEnabled *bool `json:"kerberosEnabled,omitempty"` + // SecurityStyle - The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. Possible values include: 'SecurityStyleNtfs', 'SecurityStyleUnix' + SecurityStyle SecurityStyle `json:"securityStyle,omitempty"` + // SmbEncryption - Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + SmbEncryption *bool `json:"smbEncryption,omitempty"` + // SmbContinuouslyAvailable - Enables continuously available share property for smb volume. Only applicable for SMB volume + SmbContinuouslyAvailable *bool `json:"smbContinuouslyAvailable,omitempty"` + ThroughputMibps *float64 `json:"throughputMibps,omitempty"` + // EncryptionKeySource - Encryption Key Source. Possible values are: 'Microsoft.NetApp' + EncryptionKeySource *string `json:"encryptionKeySource,omitempty"` + // LdapEnabled - Specifies whether LDAP is enabled or not for a given NFS volume. + LdapEnabled *bool `json:"ldapEnabled,omitempty"` + // CoolAccess - Specifies whether Cool Access(tiering) is enabled for the volume. + CoolAccess *bool `json:"coolAccess,omitempty"` + // CoolnessPeriod - Specifies the number of days after which data that is not accessed by clients will be tiered. + CoolnessPeriod *int32 `json:"coolnessPeriod,omitempty"` + // UnixPermissions - UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + UnixPermissions *string `json:"unixPermissions,omitempty"` + // CloneProgress - READ-ONLY; When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + CloneProgress *int32 `json:"cloneProgress,omitempty"` + // AvsDataStore - Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. Possible values include: 'AvsDataStoreEnabled', 'AvsDataStoreDisabled' + AvsDataStore AvsDataStore `json:"avsDataStore,omitempty"` + // IsDefaultQuotaEnabled - Specifies if default quota is enabled for the volume. + IsDefaultQuotaEnabled *bool `json:"isDefaultQuotaEnabled,omitempty"` + // DefaultUserQuotaInKiBs - Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + DefaultUserQuotaInKiBs *int64 `json:"defaultUserQuotaInKiBs,omitempty"` + // DefaultGroupQuotaInKiBs - Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + DefaultGroupQuotaInKiBs *int64 `json:"defaultGroupQuotaInKiBs,omitempty"` +} + +// MarshalJSON is the custom marshaler for VolumeProperties. +func (vp VolumeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vp.CreationToken != nil { + objectMap["creationToken"] = vp.CreationToken + } + if vp.ServiceLevel != "" { + objectMap["serviceLevel"] = vp.ServiceLevel + } + if vp.UsageThreshold != nil { + objectMap["usageThreshold"] = vp.UsageThreshold + } + if vp.ExportPolicy != nil { + objectMap["exportPolicy"] = vp.ExportPolicy + } + if vp.ProtocolTypes != nil { + objectMap["protocolTypes"] = vp.ProtocolTypes + } + if vp.SnapshotID != nil { + objectMap["snapshotId"] = vp.SnapshotID + } + if vp.BackupID != nil { + objectMap["backupId"] = vp.BackupID + } + if vp.SubnetID != nil { + objectMap["subnetId"] = vp.SubnetID + } + if vp.VolumeType != nil { + objectMap["volumeType"] = vp.VolumeType + } + if vp.DataProtection != nil { + objectMap["dataProtection"] = vp.DataProtection + } + if vp.IsRestoring != nil { + objectMap["isRestoring"] = vp.IsRestoring + } + if vp.SnapshotDirectoryVisible != nil { + objectMap["snapshotDirectoryVisible"] = vp.SnapshotDirectoryVisible + } + if vp.KerberosEnabled != nil { + objectMap["kerberosEnabled"] = vp.KerberosEnabled + } + if vp.SecurityStyle != "" { + objectMap["securityStyle"] = vp.SecurityStyle + } + if vp.SmbEncryption != nil { + objectMap["smbEncryption"] = vp.SmbEncryption + } + if vp.SmbContinuouslyAvailable != nil { + objectMap["smbContinuouslyAvailable"] = vp.SmbContinuouslyAvailable + } + if vp.ThroughputMibps != nil { + objectMap["throughputMibps"] = vp.ThroughputMibps + } + if vp.EncryptionKeySource != nil { + objectMap["encryptionKeySource"] = vp.EncryptionKeySource + } + if vp.LdapEnabled != nil { + objectMap["ldapEnabled"] = vp.LdapEnabled + } + if vp.CoolAccess != nil { + objectMap["coolAccess"] = vp.CoolAccess + } + if vp.CoolnessPeriod != nil { + objectMap["coolnessPeriod"] = vp.CoolnessPeriod + } + if vp.UnixPermissions != nil { + objectMap["unixPermissions"] = vp.UnixPermissions + } + if vp.AvsDataStore != "" { + objectMap["avsDataStore"] = vp.AvsDataStore + } + if vp.IsDefaultQuotaEnabled != nil { + objectMap["isDefaultQuotaEnabled"] = vp.IsDefaultQuotaEnabled + } + if vp.DefaultUserQuotaInKiBs != nil { + objectMap["defaultUserQuotaInKiBs"] = vp.DefaultUserQuotaInKiBs + } + if vp.DefaultGroupQuotaInKiBs != nil { + objectMap["defaultGroupQuotaInKiBs"] = vp.DefaultGroupQuotaInKiBs + } + return json.Marshal(objectMap) +} + +// VolumePropertiesDataProtection dataProtection type volumes include an object containing details of the +// replication +type VolumePropertiesDataProtection struct { + // Backup - Backup Properties + Backup *VolumeBackupProperties `json:"backup,omitempty"` + // Replication - Replication properties + Replication *ReplicationObject `json:"replication,omitempty"` + // Snapshot - Snapshot properties. + Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` +} + +// VolumePropertiesExportPolicy set of export policy rules +type VolumePropertiesExportPolicy struct { + // Rules - Export policy rule + Rules *[]ExportPolicyRule `json:"rules,omitempty"` +} + +// VolumeRevert revert a volume to the snapshot +type VolumeRevert struct { + // SnapshotID - Resource id of the snapshot + SnapshotID *string `json:"snapshotId,omitempty"` +} + +// VolumesAuthorizeReplicationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VolumesAuthorizeReplicationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesAuthorizeReplicationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesAuthorizeReplicationFuture.Result. +func (future *VolumesAuthorizeReplicationFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesAuthorizeReplicationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesAuthorizeReplicationFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesBreakReplicationFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VolumesBreakReplicationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesBreakReplicationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesBreakReplicationFuture.Result. +func (future *VolumesBreakReplicationFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesBreakReplicationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesBreakReplicationFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VolumesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (Volume, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesCreateOrUpdateFuture.Result. +func (future *VolumesCreateOrUpdateFuture) result(client VolumesClient) (vVar Volume, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vVar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vVar.Response.Response, err = future.GetResult(sender); err == nil && vVar.Response.Response.StatusCode != http.StatusNoContent { + vVar, err = client.CreateOrUpdateResponder(vVar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesCreateOrUpdateFuture", "Result", vVar.Response.Response, "Failure responding to request") + } + } + return +} + +// VolumesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VolumesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesDeleteFuture.Result. +func (future *VolumesDeleteFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesDeleteReplicationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VolumesDeleteReplicationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesDeleteReplicationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesDeleteReplicationFuture.Result. +func (future *VolumesDeleteReplicationFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesDeleteReplicationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesDeleteReplicationFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumeSnapshotProperties volume Snapshot Properties +type VolumeSnapshotProperties struct { + // SnapshotPolicyID - Snapshot Policy ResourceId + SnapshotPolicyID *string `json:"snapshotPolicyId,omitempty"` +} + +// VolumesPoolChangeFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VolumesPoolChangeFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesPoolChangeFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesPoolChangeFuture.Result. +func (future *VolumesPoolChangeFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesPoolChangeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesPoolChangeFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesReInitializeReplicationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VolumesReInitializeReplicationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesReInitializeReplicationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesReInitializeReplicationFuture.Result. +func (future *VolumesReInitializeReplicationFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesReInitializeReplicationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesReInitializeReplicationFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesResyncReplicationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VolumesResyncReplicationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesResyncReplicationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesResyncReplicationFuture.Result. +func (future *VolumesResyncReplicationFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesResyncReplicationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesResyncReplicationFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesRevertFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VolumesRevertFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesRevertFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesRevertFuture.Result. +func (future *VolumesRevertFuture) result(client VolumesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesRevertFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesRevertFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VolumesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VolumesClient) (Volume, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VolumesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VolumesUpdateFuture.Result. +func (future *VolumesUpdateFuture) result(client VolumesClient) (vVar Volume, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vVar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("netapp.VolumesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vVar.Response.Response, err = future.GetResult(sender); err == nil && vVar.Response.Response.StatusCode != http.StatusNoContent { + vVar, err = client.UpdateResponder(vVar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesUpdateFuture", "Result", vVar.Response.Response, "Failure responding to request") + } + } + return +} + +// WeeklySchedule weekly Schedule properties, make a snapshot every week at a specific day or days +type WeeklySchedule struct { + // SnapshotsToKeep - Weekly snapshot count to keep + SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` + // Day - Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english + Day *string `json:"day,omitempty"` + // Hour - Indicates which hour in UTC timezone a snapshot should be taken + Hour *int32 `json:"hour,omitempty"` + // Minute - Indicates which minute snapshot should be taken + Minute *int32 `json:"minute,omitempty"` + // UsedBytes - Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 `json:"usedBytes,omitempty"` +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/netappapi/interfaces.go b/services/netapp/mgmt/2021-06-01/netapp/netappapi/interfaces.go new file mode 100644 index 000000000000..806f62949813 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/netappapi/interfaces.go @@ -0,0 +1,137 @@ +package netappapi + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/netapp/mgmt/2021-06-01/netapp" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result netapp.OperationListResult, err error) +} + +var _ OperationsClientAPI = (*netapp.OperationsClient)(nil) + +// ResourceClientAPI contains the set of methods on the ResourceClient type. +type ResourceClientAPI interface { + CheckFilePathAvailability(ctx context.Context, body netapp.FilePathAvailabilityRequest, location string) (result netapp.CheckAvailabilityResponse, err error) + CheckNameAvailability(ctx context.Context, body netapp.ResourceNameAvailabilityRequest, location string) (result netapp.CheckAvailabilityResponse, err error) + CheckQuotaAvailability(ctx context.Context, body netapp.QuotaAvailabilityRequest, location string) (result netapp.CheckAvailabilityResponse, err error) +} + +var _ ResourceClientAPI = (*netapp.ResourceClient)(nil) + +// AccountsClientAPI contains the set of methods on the AccountsClient type. +type AccountsClientAPI interface { + CreateOrUpdate(ctx context.Context, body netapp.Account, resourceGroupName string, accountName string) (result netapp.AccountsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string) (result netapp.AccountsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string) (result netapp.Account, err error) + List(ctx context.Context, resourceGroupName string) (result netapp.AccountListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result netapp.AccountListIterator, err error) + ListBySubscription(ctx context.Context) (result netapp.AccountListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result netapp.AccountListIterator, err error) + Update(ctx context.Context, body netapp.AccountPatch, resourceGroupName string, accountName string) (result netapp.AccountsUpdateFuture, err error) +} + +var _ AccountsClientAPI = (*netapp.AccountsClient)(nil) + +// PoolsClientAPI contains the set of methods on the PoolsClient type. +type PoolsClientAPI interface { + CreateOrUpdate(ctx context.Context, body netapp.CapacityPool, resourceGroupName string, accountName string, poolName string) (result netapp.PoolsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result netapp.PoolsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result netapp.CapacityPool, err error) + List(ctx context.Context, resourceGroupName string, accountName string) (result netapp.CapacityPoolListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result netapp.CapacityPoolListIterator, err error) + Update(ctx context.Context, body netapp.CapacityPoolPatch, resourceGroupName string, accountName string, poolName string) (result netapp.PoolsUpdateFuture, err error) +} + +var _ PoolsClientAPI = (*netapp.PoolsClient)(nil) + +// VolumesClientAPI contains the set of methods on the VolumesClient type. +type VolumesClientAPI interface { + AuthorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body netapp.AuthorizeRequest) (result netapp.VolumesAuthorizeReplicationFuture, err error) + BreakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body *netapp.BreakReplicationRequest) (result netapp.VolumesBreakReplicationFuture, err error) + CreateOrUpdate(ctx context.Context, body netapp.Volume, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.VolumesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.VolumesDeleteFuture, err error) + DeleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.VolumesDeleteReplicationFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.Volume, err error) + List(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result netapp.VolumeListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result netapp.VolumeListIterator, err error) + PoolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body netapp.PoolChangeRequest) (result netapp.VolumesPoolChangeFuture, err error) + ReInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.VolumesReInitializeReplicationFuture, err error) + ReplicationStatusMethod(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.ReplicationStatus, err error) + ResyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.VolumesResyncReplicationFuture, err error) + Revert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body netapp.VolumeRevert) (result netapp.VolumesRevertFuture, err error) + Update(ctx context.Context, body netapp.VolumePatch, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.VolumesUpdateFuture, err error) +} + +var _ VolumesClientAPI = (*netapp.VolumesClient)(nil) + +// SnapshotsClientAPI contains the set of methods on the SnapshotsClient type. +type SnapshotsClientAPI interface { + Create(ctx context.Context, body netapp.Snapshot, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result netapp.SnapshotsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result netapp.SnapshotsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result netapp.Snapshot, err error) + List(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.SnapshotsList, err error) + Update(ctx context.Context, body interface{}, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result netapp.SnapshotsUpdateFuture, err error) +} + +var _ SnapshotsClientAPI = (*netapp.SnapshotsClient)(nil) + +// SnapshotPoliciesClientAPI contains the set of methods on the SnapshotPoliciesClient type. +type SnapshotPoliciesClientAPI interface { + Create(ctx context.Context, body netapp.SnapshotPolicy, resourceGroupName string, accountName string, snapshotPolicyName string) (result netapp.SnapshotPolicy, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (result netapp.SnapshotPoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (result netapp.SnapshotPolicy, err error) + List(ctx context.Context, resourceGroupName string, accountName string) (result netapp.SnapshotPoliciesList, err error) + ListVolumes(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (result netapp.SnapshotPolicyVolumeList, err error) + Update(ctx context.Context, body netapp.SnapshotPolicyPatch, resourceGroupName string, accountName string, snapshotPolicyName string) (result netapp.SnapshotPoliciesUpdateFuture, err error) +} + +var _ SnapshotPoliciesClientAPI = (*netapp.SnapshotPoliciesClient)(nil) + +// BackupsClientAPI contains the set of methods on the BackupsClient type. +type BackupsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body netapp.Backup) (result netapp.BackupsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string) (result netapp.BackupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string) (result netapp.Backup, err error) + GetStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.BackupStatus, err error) + GetVolumeRestoreStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.RestoreStatus, err error) + List(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result netapp.BackupsList, err error) + Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body *netapp.BackupPatch) (result netapp.BackupsUpdateFuture, err error) +} + +var _ BackupsClientAPI = (*netapp.BackupsClient)(nil) + +// AccountBackupsClientAPI contains the set of methods on the AccountBackupsClient type. +type AccountBackupsClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, accountName string, backupName string) (result netapp.AccountBackupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, backupName string) (result netapp.Backup, err error) + List(ctx context.Context, resourceGroupName string, accountName string) (result netapp.BackupsList, err error) +} + +var _ AccountBackupsClientAPI = (*netapp.AccountBackupsClient)(nil) + +// BackupPoliciesClientAPI contains the set of methods on the BackupPoliciesClient type. +type BackupPoliciesClientAPI interface { + Create(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body netapp.BackupPolicy) (result netapp.BackupPoliciesCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (result netapp.BackupPoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (result netapp.BackupPolicy, err error) + List(ctx context.Context, resourceGroupName string, accountName string) (result netapp.BackupPoliciesList, err error) + Update(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body netapp.BackupPolicyPatch) (result netapp.BackupPoliciesUpdateFuture, err error) +} + +var _ BackupPoliciesClientAPI = (*netapp.BackupPoliciesClient)(nil) + +// VaultsClientAPI contains the set of methods on the VaultsClient type. +type VaultsClientAPI interface { + List(ctx context.Context, resourceGroupName string, accountName string) (result netapp.VaultList, err error) +} + +var _ VaultsClientAPI = (*netapp.VaultsClient)(nil) diff --git a/services/netapp/mgmt/2021-06-01/netapp/operations.go b/services/netapp/mgmt/2021-06-01/netapp/operations.go new file mode 100644 index 000000000000..ec80a3510106 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/operations.go @@ -0,0 +1,98 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 microsoft NetApp Files Azure Resource Provider specification +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 using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Microsoft.NetApp Rest API operations +func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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, "netapp.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.OperationsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.NetApp/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) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// 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, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/pools.go b/services/netapp/mgmt/2021-06-01/netapp/pools.go new file mode 100644 index 000000000000..4405aecee6ce --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/pools.go @@ -0,0 +1,549 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PoolsClient is the microsoft NetApp Files Azure Resource Provider specification +type PoolsClient struct { + BaseClient +} + +// NewPoolsClient creates an instance of the PoolsClient client. +func NewPoolsClient(subscriptionID string) PoolsClient { + return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPoolsClientWithBaseURI(baseURI string, subscriptionID string) PoolsClient { + return PoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or Update a capacity pool +// Parameters: +// body - capacity pool object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, resourceGroupName string, accountName string, poolName string) (result PoolsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.PoolProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.PoolProperties.PoolID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.PoolProperties.PoolID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.PoolProperties.PoolID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.PoolProperties.PoolID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`, Chain: nil}, + }}, + {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: int64(4398046511104), 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}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.PoolsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, body, resourceGroupName, accountName, poolName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PoolsClient) CreateOrUpdatePreparer(ctx context.Context, body CapacityPool, resourceGroupName string, accountName string, poolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Etag = nil + body.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", pathParameters), + autorest.WithJSON(body), + 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 PoolsClient) CreateOrUpdateSender(req *http.Request) (future PoolsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PoolsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete the specified capacity pool +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +func (client PoolsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result PoolsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.PoolsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, poolName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", 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 PoolsClient) DeleteSender(req *http.Request) (future PoolsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get details of the specified capacity pool +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +func (client PoolsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result CapacityPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.PoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, poolName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", 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 PoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PoolsClient) GetResponder(resp *http.Response) (result CapacityPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all capacity pools in the NetApp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client PoolsClient) List(ctx context.Context, resourceGroupName string, accountName string) (result CapacityPoolListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.List") + defer func() { + sc := -1 + if result.cpl.Response.Response != nil { + sc = result.cpl.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.PoolsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.cpl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "List", resp, "Failure sending request") + return + } + + result.cpl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "List", resp, "Failure responding to request") + return + } + if result.cpl.hasNextLink() && result.cpl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools", 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 PoolsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PoolsClient) ListResponder(resp *http.Response) (result CapacityPoolList, err error) { + err = autorest.Respond( + resp, + 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 PoolsClient) listNextResults(ctx context.Context, lastResults CapacityPoolList) (result CapacityPoolList, err error) { + req, err := lastResults.capacityPoolListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "netapp.PoolsClient", "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, "netapp.PoolsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PoolsClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result CapacityPoolListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.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, accountName) + return +} + +// Update patch the specified capacity pool +// Parameters: +// body - capacity pool object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +func (client PoolsClient) Update(ctx context.Context, body CapacityPoolPatch, resourceGroupName string, accountName string, poolName string) (result PoolsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.PoolsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, body, resourceGroupName, accountName, poolName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client PoolsClient) UpdatePreparer(ctx context.Context, body CapacityPoolPatch, resourceGroupName string, accountName string, poolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", pathParameters), + autorest.WithJSON(body), + 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 PoolsClient) UpdateSender(req *http.Request) (future PoolsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client PoolsClient) UpdateResponder(resp *http.Response) (result CapacityPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/resource.go b/services/netapp/mgmt/2021-06-01/netapp/resource.go new file mode 100644 index 000000000000..84f69bd20fad --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/resource.go @@ -0,0 +1,284 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ResourceClient is the microsoft NetApp Files Azure Resource Provider specification +type ResourceClient struct { + BaseClient +} + +// NewResourceClient creates an instance of the ResourceClient client. +func NewResourceClient(subscriptionID string) ResourceClient { + return NewResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceClientWithBaseURI creates an instance of the ResourceClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewResourceClientWithBaseURI(baseURI string, subscriptionID string) ResourceClient { + return ResourceClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckFilePathAvailability check if a file path is available. +// Parameters: +// body - file path availability request. +// location - the location +func (client ResourceClient) CheckFilePathAvailability(ctx context.Context, body FilePathAvailabilityRequest, location string) (result CheckAvailabilityResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceClient.CheckFilePathAvailability") + 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: body, + Constraints: []validation.Constraint{{Target: "body.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.SubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.ResourceClient", "CheckFilePathAvailability", err.Error()) + } + + req, err := client.CheckFilePathAvailabilityPreparer(ctx, body, location) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckFilePathAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckFilePathAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckFilePathAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckFilePathAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckFilePathAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckFilePathAvailabilityPreparer prepares the CheckFilePathAvailability request. +func (client ResourceClient) CheckFilePathAvailabilityPreparer(ctx context.Context, body FilePathAvailabilityRequest, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/locations/{location}/checkFilePathAvailability", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckFilePathAvailabilitySender sends the CheckFilePathAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceClient) CheckFilePathAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckFilePathAvailabilityResponder handles the response to the CheckFilePathAvailability request. The method always +// closes the http.Response Body. +func (client ResourceClient) CheckFilePathAvailabilityResponder(resp *http.Response) (result CheckAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CheckNameAvailability check if a resource name is available. +// Parameters: +// body - name availability request. +// location - the location +func (client ResourceClient) CheckNameAvailability(ctx context.Context, body ResourceNameAvailabilityRequest, location string) (result CheckAvailabilityResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceClient.CheckNameAvailability") + 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: body, + Constraints: []validation.Constraint{{Target: "body.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.ResourceGroup", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.ResourceClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, body, location) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckNameAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client ResourceClient) CheckNameAvailabilityPreparer(ctx context.Context, body ResourceNameAvailabilityRequest, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/locations/{location}/checkNameAvailability", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client ResourceClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CheckQuotaAvailability check if a quota is available. +// Parameters: +// body - quota availability request. +// location - the location +func (client ResourceClient) CheckQuotaAvailability(ctx context.Context, body QuotaAvailabilityRequest, location string) (result CheckAvailabilityResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceClient.CheckQuotaAvailability") + 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: body, + Constraints: []validation.Constraint{{Target: "body.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.ResourceGroup", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.ResourceClient", "CheckQuotaAvailability", err.Error()) + } + + req, err := client.CheckQuotaAvailabilityPreparer(ctx, body, location) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckQuotaAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckQuotaAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckQuotaAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckQuotaAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.ResourceClient", "CheckQuotaAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckQuotaAvailabilityPreparer prepares the CheckQuotaAvailability request. +func (client ResourceClient) CheckQuotaAvailabilityPreparer(ctx context.Context, body QuotaAvailabilityRequest, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/locations/{location}/checkQuotaAvailability", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckQuotaAvailabilitySender sends the CheckQuotaAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceClient) CheckQuotaAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckQuotaAvailabilityResponder handles the response to the CheckQuotaAvailability request. The method always +// closes the http.Response Body. +func (client ResourceClient) CheckQuotaAvailabilityResponder(resp *http.Response) (result CheckAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/snapshotpolicies.go b/services/netapp/mgmt/2021-06-01/netapp/snapshotpolicies.go new file mode 100644 index 000000000000..461e5f8d006b --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/snapshotpolicies.go @@ -0,0 +1,566 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SnapshotPoliciesClient is the microsoft NetApp Files Azure Resource Provider specification +type SnapshotPoliciesClient struct { + BaseClient +} + +// NewSnapshotPoliciesClient creates an instance of the SnapshotPoliciesClient client. +func NewSnapshotPoliciesClient(subscriptionID string) SnapshotPoliciesClient { + return NewSnapshotPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSnapshotPoliciesClientWithBaseURI creates an instance of the SnapshotPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSnapshotPoliciesClientWithBaseURI(baseURI string, subscriptionID string) SnapshotPoliciesClient { + return SnapshotPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create a snapshot policy +// Parameters: +// body - snapshot policy object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// snapshotPolicyName - the name of the snapshot policy +func (client SnapshotPoliciesClient) Create(ctx context.Context, body SnapshotPolicy, resourceGroupName string, accountName string, snapshotPolicyName string) (result SnapshotPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotPoliciesClient.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: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.SnapshotPolicyProperties", Name: validation.Null, Rule: true, 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("netapp.SnapshotPoliciesClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, body, resourceGroupName, accountName, snapshotPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Create", resp, "Failure responding to request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SnapshotPoliciesClient) CreatePreparer(ctx context.Context, body SnapshotPolicy, resourceGroupName string, accountName string, snapshotPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotPolicyName": autorest.Encode("path", snapshotPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Etag = nil + body.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", pathParameters), + autorest.WithJSON(body), + 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 SnapshotPoliciesClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SnapshotPoliciesClient) CreateResponder(resp *http.Response) (result SnapshotPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete snapshot policy +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// snapshotPolicyName - the name of the snapshot policy +func (client SnapshotPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (result SnapshotPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotPoliciesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotPoliciesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, snapshotPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SnapshotPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotPolicyName": autorest.Encode("path", snapshotPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", 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 SnapshotPoliciesClient) DeleteSender(req *http.Request) (future SnapshotPoliciesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SnapshotPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a snapshot Policy +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// snapshotPolicyName - the name of the snapshot policy +func (client SnapshotPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (result SnapshotPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotPoliciesClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, snapshotPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SnapshotPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotPolicyName": autorest.Encode("path", snapshotPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", 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 SnapshotPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SnapshotPoliciesClient) GetResponder(resp *http.Response) (result SnapshotPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list snapshot policy +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client SnapshotPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result SnapshotPoliciesList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotPoliciesClient.List") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotPoliciesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SnapshotPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/snapshotPolicies", 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 SnapshotPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SnapshotPoliciesClient) ListResponder(resp *http.Response) (result SnapshotPoliciesList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListVolumes get volumes associated with snapshot policy +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// snapshotPolicyName - the name of the snapshot policy +func (client SnapshotPoliciesClient) ListVolumes(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (result SnapshotPolicyVolumeList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotPoliciesClient.ListVolumes") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotPoliciesClient", "ListVolumes", err.Error()) + } + + req, err := client.ListVolumesPreparer(ctx, resourceGroupName, accountName, snapshotPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "ListVolumes", nil, "Failure preparing request") + return + } + + resp, err := client.ListVolumesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "ListVolumes", resp, "Failure sending request") + return + } + + result, err = client.ListVolumesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "ListVolumes", resp, "Failure responding to request") + return + } + + return +} + +// ListVolumesPreparer prepares the ListVolumes request. +func (client SnapshotPoliciesClient) ListVolumesPreparer(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotPolicyName": autorest.Encode("path", snapshotPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVolumesSender sends the ListVolumes request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotPoliciesClient) ListVolumesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVolumesResponder handles the response to the ListVolumes request. The method always +// closes the http.Response Body. +func (client SnapshotPoliciesClient) ListVolumesResponder(resp *http.Response) (result SnapshotPolicyVolumeList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update patch a snapshot policy +// Parameters: +// body - snapshot policy object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// snapshotPolicyName - the name of the snapshot policy +func (client SnapshotPoliciesClient) Update(ctx context.Context, body SnapshotPolicyPatch, resourceGroupName string, accountName string, snapshotPolicyName string) (result SnapshotPoliciesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotPoliciesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotPoliciesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, body, resourceGroupName, accountName, snapshotPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotPoliciesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SnapshotPoliciesClient) UpdatePreparer(ctx context.Context, body SnapshotPolicyPatch, resourceGroupName string, accountName string, snapshotPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotPolicyName": autorest.Encode("path", snapshotPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.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.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", pathParameters), + autorest.WithJSON(body), + 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 SnapshotPoliciesClient) UpdateSender(req *http.Request) (future SnapshotPoliciesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SnapshotPoliciesClient) UpdateResponder(resp *http.Response) (result SnapshotPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/snapshots.go b/services/netapp/mgmt/2021-06-01/netapp/snapshots.go new file mode 100644 index 000000000000..80de57a27883 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/snapshots.go @@ -0,0 +1,543 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SnapshotsClient is the microsoft NetApp Files Azure Resource Provider specification +type SnapshotsClient struct { + BaseClient +} + +// NewSnapshotsClient creates an instance of the SnapshotsClient client. +func NewSnapshotsClient(subscriptionID string) SnapshotsClient { + return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient { + return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create the specified snapshot within the given volume +// Parameters: +// body - snapshot object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// snapshotName - the name of the snapshot +func (client SnapshotsClient) Create(ctx context.Context, body Snapshot, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result SnapshotsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.SnapshotProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.SnapshotProperties.SnapshotID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.SnapshotProperties.SnapshotID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.SnapshotProperties.SnapshotID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.SnapshotProperties.SnapshotID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{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}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, body, resourceGroupName, accountName, poolName, volumeName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SnapshotsClient) CreatePreparer(ctx context.Context, body Snapshot, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", pathParameters), + autorest.WithJSON(body), + 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 SnapshotsClient) CreateSender(req *http.Request) (future SnapshotsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) CreateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete snapshot +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// snapshotName - the name of the snapshot +func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result SnapshotsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", 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 SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get details of the specified snapshot +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// snapshotName - the name of the snapshot +func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result Snapshot, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", 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 SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all snapshots associated with the volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client SnapshotsClient) List(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result SnapshotsList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SnapshotsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots", 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 SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotsList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update patch a snapshot +// Parameters: +// body - snapshot object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// snapshotName - the name of the snapshot +func (client SnapshotsClient) Update(ctx context.Context, body interface{}, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (result SnapshotsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.SnapshotsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, body, resourceGroupName, accountName, poolName, volumeName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.SnapshotsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SnapshotsClient) UpdatePreparer(ctx context.Context, body interface{}, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", pathParameters), + autorest.WithJSON(body), + 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 SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/vaults.go b/services/netapp/mgmt/2021-06-01/netapp/vaults.go new file mode 100644 index 000000000000..3dece6a95fcd --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/vaults.go @@ -0,0 +1,116 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VaultsClient is the microsoft NetApp Files Azure Resource Provider specification +type VaultsClient struct { + BaseClient +} + +// NewVaultsClient creates an instance of the VaultsClient client. +func NewVaultsClient(subscriptionID string) VaultsClient { + return NewVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVaultsClientWithBaseURI creates an instance of the VaultsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVaultsClientWithBaseURI(baseURI string, subscriptionID string) VaultsClient { + return VaultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list vaults for a Netapp Account +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +func (client VaultsClient) List(ctx context.Context, resourceGroupName string, accountName string) (result VaultList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.List") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VaultsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VaultsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.VaultsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VaultsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VaultsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/vaults", 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 VaultsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VaultsClient) ListResponder(resp *http.Response) (result VaultList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/version.go b/services/netapp/mgmt/2021-06-01/netapp/version.go new file mode 100644 index 000000000000..0ede4076aaa4 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/version.go @@ -0,0 +1,19 @@ +package netapp + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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() + " netapp/2021-06-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/netapp/mgmt/2021-06-01/netapp/volumes.go b/services/netapp/mgmt/2021-06-01/netapp/volumes.go new file mode 100644 index 000000000000..5a3b1c2ee936 --- /dev/null +++ b/services/netapp/mgmt/2021-06-01/netapp/volumes.go @@ -0,0 +1,1405 @@ +package netapp + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VolumesClient is the microsoft NetApp Files Azure Resource Provider specification +type VolumesClient struct { + BaseClient +} + +// NewVolumesClient creates an instance of the VolumesClient client. +func NewVolumesClient(subscriptionID string) VolumesClient { + return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVolumesClientWithBaseURI(baseURI string, subscriptionID string) VolumesClient { + return VolumesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// AuthorizeReplication authorize the replication connection on the source volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// body - authorize request object supplied in the body of the operation. +func (client VolumesClient) AuthorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest) (result VolumesAuthorizeReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.AuthorizeReplication") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "AuthorizeReplication", err.Error()) + } + + req, err := client.AuthorizeReplicationPreparer(ctx, resourceGroupName, accountName, poolName, volumeName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "AuthorizeReplication", nil, "Failure preparing request") + return + } + + result, err = client.AuthorizeReplicationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "AuthorizeReplication", nil, "Failure sending request") + return + } + + return +} + +// AuthorizeReplicationPreparer prepares the AuthorizeReplication request. +func (client VolumesClient) AuthorizeReplicationPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AuthorizeReplicationSender sends the AuthorizeReplication request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) AuthorizeReplicationSender(req *http.Request) (future VolumesAuthorizeReplicationFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// AuthorizeReplicationResponder handles the response to the AuthorizeReplication request. The method always +// closes the http.Response Body. +func (client VolumesClient) AuthorizeReplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// BreakReplication break the replication connection on the destination volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// body - optional body to force break the replication. +func (client VolumesClient) BreakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body *BreakReplicationRequest) (result VolumesBreakReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.BreakReplication") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "BreakReplication", err.Error()) + } + + req, err := client.BreakReplicationPreparer(ctx, resourceGroupName, accountName, poolName, volumeName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "BreakReplication", nil, "Failure preparing request") + return + } + + result, err = client.BreakReplicationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "BreakReplication", nil, "Failure sending request") + return + } + + return +} + +// BreakReplicationPreparer prepares the BreakReplication request. +func (client VolumesClient) BreakReplicationPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body *BreakReplicationRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if body != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(body)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// BreakReplicationSender sends the BreakReplication request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) BreakReplicationSender(req *http.Request) (future VolumesBreakReplicationFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// BreakReplicationResponder handles the response to the BreakReplication request. The method always +// closes the http.Response Body. +func (client VolumesClient) BreakReplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate create or update the specified volume within the capacity pool +// Parameters: +// body - volume object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) CreateOrUpdate(ctx context.Context, body Volume, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.VolumeProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.FileSystemID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.FileSystemID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.FileSystemID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.FileSystemID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`, Chain: nil}, + }}, + {Target: "body.VolumeProperties.CreationToken", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.CreationToken", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "body.VolumeProperties.CreationToken", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "body.VolumeProperties.CreationToken", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-]{0,79}$`, 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: 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}, + {Target: "body.VolumeProperties.SnapshotID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.SnapshotID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$`, Chain: nil}, + }}, + {Target: "body.VolumeProperties.BackupID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.BackupID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.BackupID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.BackupID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$`, Chain: nil}, + }}, + {Target: "body.VolumeProperties.SubnetID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.VolumeProperties.DataProtection", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.DataProtection.Replication", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.DataProtection.Replication.RemoteVolumeResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "body.VolumeProperties.ThroughputMibps", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.ThroughputMibps", Name: validation.InclusiveMaximum, Rule: float64(4500), Chain: nil}, + {Target: "body.VolumeProperties.ThroughputMibps", Name: validation.InclusiveMinimum, Rule: float64(0), Chain: nil}, + }}, + {Target: "body.VolumeProperties.CoolnessPeriod", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.CoolnessPeriod", Name: validation.InclusiveMaximum, Rule: int64(63), Chain: nil}, + {Target: "body.VolumeProperties.CoolnessPeriod", Name: validation.InclusiveMinimum, Rule: int64(7), Chain: nil}, + }}, + {Target: "body.VolumeProperties.UnixPermissions", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.UnixPermissions", Name: validation.MaxLength, Rule: 4, Chain: nil}, + {Target: "body.VolumeProperties.UnixPermissions", Name: validation.MinLength, Rule: 4, 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}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, body, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VolumesClient) CreateOrUpdatePreparer(ctx context.Context, body Volume, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.Etag = nil + body.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", pathParameters), + autorest.WithJSON(body), + 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 VolumesClient) CreateOrUpdateSender(req *http.Request) (future VolumesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VolumesClient) CreateOrUpdateResponder(resp *http.Response) (result Volume, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete the specified volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VolumesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", 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 VolumesClient) DeleteSender(req *http.Request) (future VolumesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VolumesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteReplication delete the replication connection on the destination volume, and send release to the source +// replication +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) DeleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesDeleteReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.DeleteReplication") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "DeleteReplication", err.Error()) + } + + req, err := client.DeleteReplicationPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "DeleteReplication", nil, "Failure preparing request") + return + } + + result, err = client.DeleteReplicationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "DeleteReplication", nil, "Failure sending request") + return + } + + return +} + +// DeleteReplicationPreparer prepares the DeleteReplication request. +func (client VolumesClient) DeleteReplicationPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteReplicationSender sends the DeleteReplication request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) DeleteReplicationSender(req *http.Request) (future VolumesDeleteReplicationFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteReplicationResponder handles the response to the DeleteReplication request. The method always +// closes the http.Response Body. +func (client VolumesClient) DeleteReplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the details of the specified volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result Volume, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VolumesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", 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 VolumesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VolumesClient) GetResponder(resp *http.Response) (result Volume, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all volumes within the capacity pool +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +func (client VolumesClient) List(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result VolumeListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.List") + defer func() { + sc := -1 + if result.vl.Response.Response != nil { + sc = result.vl.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, poolName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "List", resp, "Failure sending request") + return + } + + result.vl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "List", resp, "Failure responding to request") + return + } + if result.vl.hasNextLink() && result.vl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VolumesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes", 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 VolumesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VolumesClient) ListResponder(resp *http.Response) (result VolumeList, err error) { + err = autorest.Respond( + resp, + 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 VolumesClient) listNextResults(ctx context.Context, lastResults VolumeList) (result VolumeList, err error) { + req, err := lastResults.volumeListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "netapp.VolumesClient", "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, "netapp.VolumesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VolumesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result VolumeListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.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, accountName, poolName) + return +} + +// PoolChange moves volume to another pool +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// body - move volume to the pool supplied in the body of the operation. +func (client VolumesClient) PoolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest) (result VolumesPoolChangeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.PoolChange") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.NewPoolResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "PoolChange", err.Error()) + } + + req, err := client.PoolChangePreparer(ctx, resourceGroupName, accountName, poolName, volumeName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "PoolChange", nil, "Failure preparing request") + return + } + + result, err = client.PoolChangeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "PoolChange", nil, "Failure sending request") + return + } + + return +} + +// PoolChangePreparer prepares the PoolChange request. +func (client VolumesClient) PoolChangePreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PoolChangeSender sends the PoolChange request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) PoolChangeSender(req *http.Request) (future VolumesPoolChangeFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PoolChangeResponder handles the response to the PoolChange request. The method always +// closes the http.Response Body. +func (client VolumesClient) PoolChangeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReInitializeReplication re-Initializes the replication connection on the destination volume +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) ReInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesReInitializeReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.ReInitializeReplication") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "ReInitializeReplication", err.Error()) + } + + req, err := client.ReInitializeReplicationPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ReInitializeReplication", nil, "Failure preparing request") + return + } + + result, err = client.ReInitializeReplicationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ReInitializeReplication", nil, "Failure sending request") + return + } + + return +} + +// ReInitializeReplicationPreparer prepares the ReInitializeReplication request. +func (client VolumesClient) ReInitializeReplicationPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReInitializeReplicationSender sends the ReInitializeReplication request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) ReInitializeReplicationSender(req *http.Request) (future VolumesReInitializeReplicationFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReInitializeReplicationResponder handles the response to the ReInitializeReplication request. The method always +// closes the http.Response Body. +func (client VolumesClient) ReInitializeReplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReplicationStatusMethod get the status of the replication +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) ReplicationStatusMethod(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result ReplicationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.ReplicationStatusMethod") + 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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "ReplicationStatusMethod", err.Error()) + } + + req, err := client.ReplicationStatusMethodPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ReplicationStatusMethod", nil, "Failure preparing request") + return + } + + resp, err := client.ReplicationStatusMethodSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ReplicationStatusMethod", resp, "Failure sending request") + return + } + + result, err = client.ReplicationStatusMethodResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ReplicationStatusMethod", resp, "Failure responding to request") + return + } + + return +} + +// ReplicationStatusMethodPreparer prepares the ReplicationStatusMethod request. +func (client VolumesClient) ReplicationStatusMethodPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReplicationStatusMethodSender sends the ReplicationStatusMethod request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) ReplicationStatusMethodSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ReplicationStatusMethodResponder handles the response to the ReplicationStatusMethod request. The method always +// closes the http.Response Body. +func (client VolumesClient) ReplicationStatusMethodResponder(resp *http.Response) (result ReplicationStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ResyncReplication resync the connection on the destination volume. If the operation is ran on the source volume it +// will reverse-resync the connection and sync from destination to source. +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) ResyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesResyncReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.ResyncReplication") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "ResyncReplication", err.Error()) + } + + req, err := client.ResyncReplicationPreparer(ctx, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ResyncReplication", nil, "Failure preparing request") + return + } + + result, err = client.ResyncReplicationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "ResyncReplication", nil, "Failure sending request") + return + } + + return +} + +// ResyncReplicationPreparer prepares the ResyncReplication request. +func (client VolumesClient) ResyncReplicationPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResyncReplicationSender sends the ResyncReplication request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) ResyncReplicationSender(req *http.Request) (future VolumesResyncReplicationFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResyncReplicationResponder handles the response to the ResyncReplication request. The method always +// closes the http.Response Body. +func (client VolumesClient) ResyncReplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Revert revert a volume to the snapshot specified in the body +// Parameters: +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +// body - object for snapshot to revert supplied in the body of the operation. +func (client VolumesClient) Revert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert) (result VolumesRevertFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.Revert") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "Revert", err.Error()) + } + + req, err := client.RevertPreparer(ctx, resourceGroupName, accountName, poolName, volumeName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Revert", nil, "Failure preparing request") + return + } + + result, err = client.RevertSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Revert", nil, "Failure sending request") + return + } + + return +} + +// RevertPreparer prepares the Revert request. +func (client VolumesClient) RevertPreparer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevertSender sends the Revert request. The method will close the +// http.Response Body if it receives an error. +func (client VolumesClient) RevertSender(req *http.Request) (future VolumesRevertFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RevertResponder handles the response to the Revert request. The method always +// closes the http.Response Body. +func (client VolumesClient) RevertResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update patch the specified volume +// Parameters: +// body - volume object supplied in the body of the operation. +// resourceGroupName - the name of the resource group. +// accountName - the name of the NetApp account +// poolName - the name of the capacity pool +// volumeName - the name of the volume +func (client VolumesClient) Update(ctx context.Context, body VolumePatch, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: poolName, + Constraints: []validation.Constraint{{Target: "poolName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "poolName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "poolName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, + {TargetValue: volumeName, + Constraints: []validation.Constraint{{Target: "volumeName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "volumeName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, body, resourceGroupName, accountName, poolName, volumeName) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VolumesClient) UpdatePreparer(ctx context.Context, body VolumePatch, resourceGroupName string, accountName string, poolName string, volumeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "poolName": autorest.Encode("path", poolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "volumeName": autorest.Encode("path", volumeName), + } + + const APIVersion = "2021-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + body.ID = nil + body.Name = nil + body.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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", pathParameters), + autorest.WithJSON(body), + 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 VolumesClient) UpdateSender(req *http.Request) (future VolumesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VolumesClient) UpdateResponder(resp *http.Response) (result Volume, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/CHANGELOG.md b/services/network/mgmt/2021-03-01/network/CHANGELOG.md new file mode 100644 index 000000000000..52911e4cc5e4 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/CHANGELOG.md @@ -0,0 +1,2 @@ +# Change History + diff --git a/services/network/mgmt/2021-03-01/network/_meta.json b/services/network/mgmt/2021-03-01/network/_meta.json new file mode 100644 index 000000000000..49032ab8678d --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", + "readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md", + "tag": "package-2021-03", + "use": "@microsoft.azure/autorest.go@2.1.183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-03 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/network/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/services/network/mgmt/2021-03-01/network/applicationgatewayprivateendpointconnections.go b/services/network/mgmt/2021-03-01/network/applicationgatewayprivateendpointconnections.go new file mode 100644 index 000000000000..7313f858093e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/applicationgatewayprivateendpointconnections.go @@ -0,0 +1,393 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ApplicationGatewayPrivateEndpointConnectionsClient is the network Client +type ApplicationGatewayPrivateEndpointConnectionsClient struct { + BaseClient +} + +// NewApplicationGatewayPrivateEndpointConnectionsClient creates an instance of the +// ApplicationGatewayPrivateEndpointConnectionsClient client. +func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string) ApplicationGatewayPrivateEndpointConnectionsClient { + return NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI creates an instance of the +// ApplicationGatewayPrivateEndpointConnectionsClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewayPrivateEndpointConnectionsClient { + return ApplicationGatewayPrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete deletes the specified private endpoint connection on application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// connectionName - the name of the application gateway private endpoint connection. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string) (result ApplicationGatewayPrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, applicationGatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}", 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 ApplicationGatewayPrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future ApplicationGatewayPrivateEndpointConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified private endpoint connection on application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// connectionName - the name of the application gateway private endpoint connection. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string) (result ApplicationGatewayPrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionsClient.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, applicationGatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}", 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 ApplicationGatewayPrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result ApplicationGatewayPrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all private endpoint connections on an application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewayPrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionsClient.List") + defer func() { + sc := -1 + if result.agpeclr.Response.Response != nil { + sc = result.agpeclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, applicationGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.agpeclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.agpeclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.agpeclr.hasNextLink() && result.agpeclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections", 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 ApplicationGatewayPrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result ApplicationGatewayPrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 ApplicationGatewayPrivateEndpointConnectionsClient) listNextResults(ctx context.Context, lastResults ApplicationGatewayPrivateEndpointConnectionListResult) (result ApplicationGatewayPrivateEndpointConnectionListResult, err error) { + req, err := lastResults.applicationGatewayPrivateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "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, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewayPrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionsClient.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, applicationGatewayName) + return +} + +// Update updates the specified private endpoint connection on application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// connectionName - the name of the application gateway private endpoint connection. +// parameters - parameters supplied to update application gateway private endpoint connection operation. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) Update(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection) (result ApplicationGatewayPrivateEndpointConnectionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}", 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 ApplicationGatewayPrivateEndpointConnectionsClient) UpdateSender(req *http.Request) (future ApplicationGatewayPrivateEndpointConnectionsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ApplicationGatewayPrivateEndpointConnectionsClient) UpdateResponder(resp *http.Response) (result ApplicationGatewayPrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/applicationgatewayprivatelinkresources.go b/services/network/mgmt/2021-03-01/network/applicationgatewayprivatelinkresources.go new file mode 100644 index 000000000000..5426f5731723 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/applicationgatewayprivatelinkresources.go @@ -0,0 +1,151 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ApplicationGatewayPrivateLinkResourcesClient is the network Client +type ApplicationGatewayPrivateLinkResourcesClient struct { + BaseClient +} + +// NewApplicationGatewayPrivateLinkResourcesClient creates an instance of the +// ApplicationGatewayPrivateLinkResourcesClient client. +func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string) ApplicationGatewayPrivateLinkResourcesClient { + return NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI creates an instance of the +// ApplicationGatewayPrivateLinkResourcesClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewayPrivateLinkResourcesClient { + return ApplicationGatewayPrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all private link resources on an application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +func (client ApplicationGatewayPrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewayPrivateLinkResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourcesClient.List") + defer func() { + sc := -1 + if result.agplrlr.Response.Response != nil { + sc = result.agplrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, applicationGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.agplrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "List", resp, "Failure sending request") + return + } + + result.agplrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "List", resp, "Failure responding to request") + return + } + if result.agplrlr.hasNextLink() && result.agplrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ApplicationGatewayPrivateLinkResourcesClient) ListPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}/privateLinkResources", 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 ApplicationGatewayPrivateLinkResourcesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationGatewayPrivateLinkResourcesClient) ListResponder(resp *http.Response) (result ApplicationGatewayPrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + 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 ApplicationGatewayPrivateLinkResourcesClient) listNextResults(ctx context.Context, lastResults ApplicationGatewayPrivateLinkResourceListResult) (result ApplicationGatewayPrivateLinkResourceListResult, err error) { + req, err := lastResults.applicationGatewayPrivateLinkResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "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, "network.ApplicationGatewayPrivateLinkResourcesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationGatewayPrivateLinkResourcesClient) ListComplete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewayPrivateLinkResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourcesClient.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, applicationGatewayName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/applicationgateways.go b/services/network/mgmt/2021-03-01/network/applicationgateways.go new file mode 100644 index 000000000000..b9887abf67f8 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/applicationgateways.go @@ -0,0 +1,1468 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ApplicationGatewaysClient is the network Client +type ApplicationGatewaysClient struct { + BaseClient +} + +// NewApplicationGatewaysClient creates an instance of the ApplicationGatewaysClient client. +func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClient { + return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewaysClient { + return ApplicationGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// BackendHealth gets the backend health of the specified application gateway in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health. +func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (result ApplicationGatewaysBackendHealthFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealth") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.BackendHealthPreparer(ctx, resourceGroupName, applicationGatewayName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure preparing request") + return + } + + result, err = client.BackendHealthSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure sending request") + return + } + + return +} + +// BackendHealthPreparer prepares the BackendHealth request. +func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// BackendHealthSender sends the BackendHealth request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// BackendHealthResponder handles the response to the BackendHealth request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Response) (result ApplicationGatewayBackendHealth, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// BackendHealthOnDemand gets the backend health for given combination of backend pool and http setting of the +// specified application gateway in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// probeRequest - request body for on-demand test probe operation. +// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health. +func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, expand string) (result ApplicationGatewaysBackendHealthOnDemandFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealthOnDemand") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.BackendHealthOnDemandPreparer(ctx, resourceGroupName, applicationGatewayName, probeRequest, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure preparing request") + return + } + + result, err = client.BackendHealthOnDemandSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure sending request") + return + } + + return +} + +// BackendHealthOnDemandPreparer prepares the BackendHealthOnDemand request. +func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand", pathParameters), + autorest.WithJSON(probeRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// BackendHealthOnDemandSender sends the BackendHealthOnDemand request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// BackendHealthOnDemandResponder handles the response to the BackendHealthOnDemand request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) BackendHealthOnDemandResponder(resp *http.Response) (result ApplicationGatewayBackendHealthOnDemand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates the specified application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// parameters - parameters supplied to the create or update application gateway operation. +func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (result ApplicationGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetType", Name: validation.Null, Rule: true, Chain: nil}, + {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: 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: 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: 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: 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: int64(2), Chain: nil}}}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", 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 ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, applicationGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}", 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 ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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, applicationGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}", 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 ApplicationGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (result ApplicationGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSslPredefinedPolicy gets Ssl predefined policy with the specified policy name. +// Parameters: +// predefinedPolicyName - name of Ssl predefined policy. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, predefinedPolicyName string) (result ApplicationGatewaySslPredefinedPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.GetSslPredefinedPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetSslPredefinedPolicyPreparer(ctx, predefinedPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetSslPredefinedPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetSslPredefinedPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure responding to request") + return + } + + return +} + +// GetSslPredefinedPolicyPreparer prepares the GetSslPredefinedPolicy request. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx context.Context, predefinedPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "predefinedPolicyName": autorest.Encode("path", predefinedPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSslPredefinedPolicySender sends the GetSslPredefinedPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetSslPredefinedPolicyResponder handles the response to the GetSslPredefinedPolicy request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicyResponder(resp *http.Response) (result ApplicationGatewaySslPredefinedPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all application gateways in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.List") + defer func() { + sc := -1 + if result.aglr.Response.Response != nil { + sc = result.aglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.aglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.aglr.hasNextLink() && result.aglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ApplicationGatewaysClient) ListPreparer(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 = "2021-03-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.Network/applicationGateways", 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 ApplicationGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListResponder(resp *http.Response) (result ApplicationGatewayListResult, err error) { + err = autorest.Respond( + resp, + 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 ApplicationGatewaysClient) listNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { + req, err := lastResults.applicationGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "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, "network.ApplicationGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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) + return +} + +// ListAll gets all the application gateways in a subscription. +func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result ApplicationGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll") + defer func() { + sc := -1 + if result.aglr.Response.Response != nil { + sc = result.aglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.aglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure sending request") + return + } + + result.aglr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure responding to request") + return + } + if result.aglr.hasNextLink() && result.aglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAllResponder(resp *http.Response) (result ApplicationGatewayListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client ApplicationGatewaysClient) listAllNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { + req, err := lastResults.applicationGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (result ApplicationGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListAvailableRequestHeaders lists all available request headers. +func (client ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context) (result ListString, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableRequestHeaders") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableRequestHeadersPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableRequestHeadersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableRequestHeadersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableRequestHeadersPreparer prepares the ListAvailableRequestHeaders request. +func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableRequestHeadersSender sends the ListAvailableRequestHeaders request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableRequestHeadersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableRequestHeadersResponder handles the response to the ListAvailableRequestHeaders request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableRequestHeadersResponder(resp *http.Response) (result ListString, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableResponseHeaders lists all available response headers. +func (client ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context) (result ListString, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableResponseHeaders") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableResponseHeadersPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableResponseHeadersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableResponseHeadersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableResponseHeadersPreparer prepares the ListAvailableResponseHeaders request. +func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableResponseHeadersSender sends the ListAvailableResponseHeaders request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableResponseHeadersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableResponseHeadersResponder handles the response to the ListAvailableResponseHeaders request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableResponseHeadersResponder(resp *http.Response) (result ListString, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableServerVariables lists all available server variables. +func (client ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context) (result ListString, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableServerVariables") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableServerVariablesPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableServerVariablesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableServerVariablesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableServerVariablesPreparer prepares the ListAvailableServerVariables request. +func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableServerVariablesSender sends the ListAvailableServerVariables request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableServerVariablesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableServerVariablesResponder handles the response to the ListAvailableServerVariables request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableServerVariablesResponder(resp *http.Response) (result ListString, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableSslOptions lists available Ssl options for configuring Ssl policy. +func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context) (result ApplicationGatewayAvailableSslOptions, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslOptions") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableSslOptionsPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableSslOptionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableSslOptionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableSslOptionsPreparer prepares the ListAvailableSslOptions request. +func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableSslOptionsSender sends the ListAvailableSslOptions request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableSslOptionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableSslOptionsResponder handles the response to the ListAvailableSslOptions request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableSslOptionsResponder(resp *http.Response) (result ApplicationGatewayAvailableSslOptions, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableSslPredefinedPolicies lists all SSL predefined policies for configuring Ssl policy. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies") + defer func() { + sc := -1 + if result.agaspp.Response.Response != nil { + sc = result.agaspp.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAvailableSslPredefinedPoliciesNextResults + req, err := client.ListAvailableSslPredefinedPoliciesPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableSslPredefinedPoliciesSender(req) + if err != nil { + result.agaspp.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure sending request") + return + } + + result.agaspp, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure responding to request") + return + } + if result.agaspp.hasNextLink() && result.agaspp.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAvailableSslPredefinedPoliciesPreparer prepares the ListAvailableSslPredefinedPolicies request. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableSslPredefinedPoliciesSender sends the ListAvailableSslPredefinedPolicies request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableSslPredefinedPoliciesResponder handles the response to the ListAvailableSslPredefinedPolicies request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesResponder(resp *http.Response) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAvailableSslPredefinedPoliciesNextResults retrieves the next set of results, if any. +func (client ApplicationGatewaysClient) listAvailableSslPredefinedPoliciesNextResults(ctx context.Context, lastResults ApplicationGatewayAvailableSslPredefinedPolicies) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { + req, err := lastResults.applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAvailableSslPredefinedPoliciesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAvailableSslPredefinedPoliciesComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies") + 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.ListAvailableSslPredefinedPolicies(ctx) + return +} + +// ListAvailableWafRuleSets lists all available web application firewall rule sets. +func (client ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableWafRuleSets") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableWafRuleSetsPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableWafRuleSetsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableWafRuleSetsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure responding to request") + return + } + + return +} + +// ListAvailableWafRuleSetsPreparer prepares the ListAvailableWafRuleSets request. +func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableWafRuleSetsSender sends the ListAvailableWafRuleSets request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableWafRuleSetsResponder handles the response to the ListAvailableWafRuleSets request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsResponder(resp *http.Response) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Start starts the specified application gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, applicationGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Stop stops the specified application gateway in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Stop") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPreparer(ctx, resourceGroupName, applicationGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure preparing request") + return + } + + result, err = client.StopSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure sending request") + return + } + + return +} + +// StopPreparer prepares the Stop request. +func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}/stop", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopSender sends the Stop request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopResponder handles the response to the Stop request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateTags updates the specified application gateway tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// parameters - parameters supplied to update application gateway tags. +func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (result ApplicationGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationGateways/{applicationGatewayName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) UpdateTagsResponder(resp *http.Response) (result ApplicationGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/applicationsecuritygroups.go b/services/network/mgmt/2021-03-01/network/applicationsecuritygroups.go new file mode 100644 index 000000000000..d7193eb68d12 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/applicationsecuritygroups.go @@ -0,0 +1,575 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ApplicationSecurityGroupsClient is the network Client +type ApplicationSecurityGroupsClient struct { + BaseClient +} + +// NewApplicationSecurityGroupsClient creates an instance of the ApplicationSecurityGroupsClient client. +func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecurityGroupsClient { + return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient { + return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an application security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationSecurityGroupName - the name of the application security group. +// parameters - parameters supplied to the create or update ApplicationSecurityGroup operation. +func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (result ApplicationSecurityGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", 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 ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified application security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationSecurityGroupName - the name of the application security group. +func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, applicationSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", 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 ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified application security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationSecurityGroupName - the name of the application security group. +func (client ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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, applicationSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", 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 ApplicationSecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) GetResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the application security groups in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ApplicationSecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.List") + defer func() { + sc := -1 + if result.asglr.Response.Response != nil { + sc = result.asglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.asglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure sending request") + return + } + + result.asglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.asglr.hasNextLink() && result.asglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ApplicationSecurityGroupsClient) ListPreparer(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 = "2021-03-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.Network/applicationSecurityGroups", 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 ApplicationSecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) ListResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 ApplicationSecurityGroupsClient) listNextResults(ctx context.Context, lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) { + req, err := lastResults.applicationSecurityGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "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, "network.ApplicationSecurityGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationSecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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) + return +} + +// ListAll gets all application security groups in a subscription. +func (client ApplicationSecurityGroupsClient) ListAll(ctx context.Context) (result ApplicationSecurityGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.ListAll") + defer func() { + sc := -1 + if result.asglr.Response.Response != nil { + sc = result.asglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.asglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure sending request") + return + } + + result.asglr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.asglr.hasNextLink() && result.asglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) ListAllResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client ApplicationSecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) { + req, err := lastResults.applicationSecurityGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Context) (result ApplicationSecurityGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates an application security group's tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationSecurityGroupName - the name of the application security group. +// parameters - parameters supplied to update application security group tags. +func (client ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (result ApplicationSecurityGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/availabledelegations.go b/services/network/mgmt/2021-03-01/network/availabledelegations.go new file mode 100644 index 000000000000..d134b43106f1 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/availabledelegations.go @@ -0,0 +1,148 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AvailableDelegationsClient is the network Client +type AvailableDelegationsClient struct { + BaseClient +} + +// NewAvailableDelegationsClient creates an instance of the AvailableDelegationsClient client. +func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsClient { + return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableDelegationsClient { + return AvailableDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets all of the available subnet delegations for this subscription in this region. +// Parameters: +// location - the location of the subnet. +func (client AvailableDelegationsClient) List(ctx context.Context, location string) (result AvailableDelegationsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.List") + defer func() { + sc := -1 + if result.adr.Response.Response != nil { + sc = result.adr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.adr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", resp, "Failure sending request") + return + } + + result.adr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", resp, "Failure responding to request") + return + } + if result.adr.hasNextLink() && result.adr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations", 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 AvailableDelegationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, err error) { + err = autorest.Respond( + resp, + 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 AvailableDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) { + req, err := lastResults.availableDelegationsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "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, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailableDelegationsClient) ListComplete(ctx context.Context, location string) (result AvailableDelegationsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.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, location) + return +} diff --git a/services/network/mgmt/2021-03-01/network/availableendpointservices.go b/services/network/mgmt/2021-03-01/network/availableendpointservices.go new file mode 100644 index 000000000000..ef5171246abf --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/availableendpointservices.go @@ -0,0 +1,148 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AvailableEndpointServicesClient is the network Client +type AvailableEndpointServicesClient struct { + BaseClient +} + +// NewAvailableEndpointServicesClient creates an instance of the AvailableEndpointServicesClient client. +func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpointServicesClient { + return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient { + return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list what values of endpoint services are available for use. +// Parameters: +// location - the location to check available endpoint services. +func (client AvailableEndpointServicesClient) List(ctx context.Context, location string) (result EndpointServicesListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableEndpointServicesClient.List") + defer func() { + sc := -1 + if result.eslr.Response.Response != nil { + sc = result.eslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.eslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure sending request") + return + } + + result.eslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure responding to request") + return + } + if result.eslr.hasNextLink() && result.eslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices", 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 AvailableEndpointServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableEndpointServicesClient) ListResponder(resp *http.Response) (result EndpointServicesListResult, err error) { + err = autorest.Respond( + resp, + 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 AvailableEndpointServicesClient) listNextResults(ctx context.Context, lastResults EndpointServicesListResult) (result EndpointServicesListResult, err error) { + req, err := lastResults.endpointServicesListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "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, "network.AvailableEndpointServicesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailableEndpointServicesClient) ListComplete(ctx context.Context, location string) (result EndpointServicesListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableEndpointServicesClient.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, location) + return +} diff --git a/services/network/mgmt/2021-03-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2021-03-01/network/availableprivateendpointtypes.go new file mode 100644 index 000000000000..a1a945639ab5 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/availableprivateendpointtypes.go @@ -0,0 +1,267 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AvailablePrivateEndpointTypesClient is the network Client +type AvailablePrivateEndpointTypesClient struct { + BaseClient +} + +// NewAvailablePrivateEndpointTypesClient creates an instance of the AvailablePrivateEndpointTypesClient client. +func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePrivateEndpointTypesClient { + return NewAvailablePrivateEndpointTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { + return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. +// Parameters: +// location - the location of the domain name. +func (client AvailablePrivateEndpointTypesClient) List(ctx context.Context, location string) (result AvailablePrivateEndpointTypesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.List") + defer func() { + sc := -1 + if result.apetr.Response.Response != nil { + sc = result.apetr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.apetr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", resp, "Failure sending request") + return + } + + result.apetr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", resp, "Failure responding to request") + return + } + if result.apetr.hasNextLink() && result.apetr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailablePrivateEndpointTypesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes", 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 AvailablePrivateEndpointTypesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailablePrivateEndpointTypesClient) ListResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, err error) { + err = autorest.Respond( + resp, + 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 AvailablePrivateEndpointTypesClient) listNextResults(ctx context.Context, lastResults AvailablePrivateEndpointTypesResult) (result AvailablePrivateEndpointTypesResult, err error) { + req, err := lastResults.availablePrivateEndpointTypesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "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, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailablePrivateEndpointTypesClient) ListComplete(ctx context.Context, location string) (result AvailablePrivateEndpointTypesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.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, location) + return +} + +// ListByResourceGroup returns all of the resource types that can be linked to a Private Endpoint in this subscription +// in this region. +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result AvailablePrivateEndpointTypesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.apetr.Response.Response != nil { + sc = result.apetr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, location, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.apetr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.apetr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.apetr.hasNextLink() && result.apetr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/availablePrivateEndpointTypes", 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 AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, err error) { + err = autorest.Respond( + resp, + 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 AvailablePrivateEndpointTypesClient) listByResourceGroupNextResults(ctx context.Context, lastResults AvailablePrivateEndpointTypesResult) (result AvailablePrivateEndpointTypesResult, err error) { + req, err := lastResults.availablePrivateEndpointTypesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "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, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result AvailablePrivateEndpointTypesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.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, location, resourceGroupName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2021-03-01/network/availableresourcegroupdelegations.go new file mode 100644 index 000000000000..d71691d5752e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/availableresourcegroupdelegations.go @@ -0,0 +1,151 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AvailableResourceGroupDelegationsClient is the network Client +type AvailableResourceGroupDelegationsClient struct { + BaseClient +} + +// NewAvailableResourceGroupDelegationsClient creates an instance of the AvailableResourceGroupDelegationsClient +// client. +func NewAvailableResourceGroupDelegationsClient(subscriptionID string) AvailableResourceGroupDelegationsClient { + return NewAvailableResourceGroupDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the +// AvailableResourceGroupDelegationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableResourceGroupDelegationsClient { + return AvailableResourceGroupDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets all of the available subnet delegations for this resource group in this region. +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +func (client AvailableResourceGroupDelegationsClient) List(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.List") + defer func() { + sc := -1 + if result.adr.Response.Response != nil { + sc = result.adr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.adr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", resp, "Failure sending request") + return + } + + result.adr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", resp, "Failure responding to request") + return + } + if result.adr.hasNextLink() && result.adr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/availableDelegations", 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 AvailableResourceGroupDelegationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableResourceGroupDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, err error) { + err = autorest.Respond( + resp, + 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 AvailableResourceGroupDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) { + req, err := lastResults.availableDelegationsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "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, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailableResourceGroupDelegationsClient) ListComplete(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.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, location, resourceGroupName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/availableservicealiases.go b/services/network/mgmt/2021-03-01/network/availableservicealiases.go new file mode 100644 index 000000000000..c6ecd6633464 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/availableservicealiases.go @@ -0,0 +1,266 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AvailableServiceAliasesClient is the network Client +type AvailableServiceAliasesClient struct { + BaseClient +} + +// NewAvailableServiceAliasesClient creates an instance of the AvailableServiceAliasesClient client. +func NewAvailableServiceAliasesClient(subscriptionID string) AvailableServiceAliasesClient { + return NewAvailableServiceAliasesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailableServiceAliasesClientWithBaseURI creates an instance of the AvailableServiceAliasesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewAvailableServiceAliasesClientWithBaseURI(baseURI string, subscriptionID string) AvailableServiceAliasesClient { + return AvailableServiceAliasesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets all available service aliases for this subscription in this region. +// Parameters: +// location - the location. +func (client AvailableServiceAliasesClient) List(ctx context.Context, location string) (result AvailableServiceAliasesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesClient.List") + defer func() { + sc := -1 + if result.asar.Response.Response != nil { + sc = result.asar.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.asar.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "List", resp, "Failure sending request") + return + } + + result.asar, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "List", resp, "Failure responding to request") + return + } + if result.asar.hasNextLink() && result.asar.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailableServiceAliasesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases", 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 AvailableServiceAliasesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableServiceAliasesClient) ListResponder(resp *http.Response) (result AvailableServiceAliasesResult, err error) { + err = autorest.Respond( + resp, + 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 AvailableServiceAliasesClient) listNextResults(ctx context.Context, lastResults AvailableServiceAliasesResult) (result AvailableServiceAliasesResult, err error) { + req, err := lastResults.availableServiceAliasesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "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, "network.AvailableServiceAliasesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailableServiceAliasesClient) ListComplete(ctx context.Context, location string) (result AvailableServiceAliasesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesClient.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, location) + return +} + +// ListByResourceGroup gets all available service aliases for this resource group in this region. +// Parameters: +// resourceGroupName - the name of the resource group. +// location - the location. +func (client AvailableServiceAliasesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, location string) (result AvailableServiceAliasesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.asar.Response.Response != nil { + sc = result.asar.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.asar.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.asar, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.asar.hasNextLink() && result.asar.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client AvailableServiceAliasesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/availableServiceAliases", 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 AvailableServiceAliasesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client AvailableServiceAliasesClient) ListByResourceGroupResponder(resp *http.Response) (result AvailableServiceAliasesResult, err error) { + err = autorest.Respond( + resp, + 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 AvailableServiceAliasesClient) listByResourceGroupNextResults(ctx context.Context, lastResults AvailableServiceAliasesResult) (result AvailableServiceAliasesResult, err error) { + req, err := lastResults.availableServiceAliasesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "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, "network.AvailableServiceAliasesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailableServiceAliasesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, location string) (result AvailableServiceAliasesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesClient.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, location) + return +} diff --git a/services/network/mgmt/2021-03-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2021-03-01/network/azurefirewallfqdntags.go new file mode 100644 index 000000000000..aaca614e9170 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/azurefirewallfqdntags.go @@ -0,0 +1,145 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AzureFirewallFqdnTagsClient is the network Client +type AzureFirewallFqdnTagsClient struct { + BaseClient +} + +// NewAzureFirewallFqdnTagsClient creates an instance of the AzureFirewallFqdnTagsClient client. +func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTagsClient { + return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallFqdnTagsClient { + return AzureFirewallFqdnTagsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListAll gets all the Azure Firewall FQDN Tags in a subscription. +func (client AzureFirewallFqdnTagsClient) ListAll(ctx context.Context) (result AzureFirewallFqdnTagListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll") + defer func() { + sc := -1 + if result.afftlr.Response.Response != nil { + sc = result.afftlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.afftlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", resp, "Failure sending request") + return + } + + result.afftlr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.afftlr.hasNextLink() && result.afftlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client AzureFirewallFqdnTagsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client AzureFirewallFqdnTagsClient) ListAllResponder(resp *http.Response) (result AzureFirewallFqdnTagListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client AzureFirewallFqdnTagsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallFqdnTagListResult) (result AzureFirewallFqdnTagListResult, err error) { + req, err := lastResults.azureFirewallFqdnTagListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client AzureFirewallFqdnTagsClient) ListAllComplete(ctx context.Context) (result AzureFirewallFqdnTagListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll") + 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.ListAll(ctx) + return +} diff --git a/services/network/mgmt/2021-03-01/network/azurefirewalls.go b/services/network/mgmt/2021-03-01/network/azurefirewalls.go new file mode 100644 index 000000000000..64bd06184d34 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/azurefirewalls.go @@ -0,0 +1,584 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AzureFirewallsClient is the network Client +type AzureFirewallsClient struct { + BaseClient +} + +// NewAzureFirewallsClient creates an instance of the AzureFirewallsClient client. +func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { + return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { + return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Azure Firewall. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +// parameters - parameters supplied to the create or update Azure Firewall operation. +func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewallsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: azureFirewallName, + Constraints: []validation.Constraint{{Target: "azureFirewallName", Name: validation.MaxLength, Rule: 56, Chain: nil}, + {Target: "azureFirewallName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.AzureFirewallsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, azureFirewallName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) CreateOrUpdateResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Azure Firewall. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewallsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, azureFirewallName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Azure Firewall. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +func (client AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewall, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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, azureFirewallName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) GetResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Azure Firewalls in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client AzureFirewallsClient) List(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.List") + defer func() { + sc := -1 + if result.aflr.Response.Response != nil { + sc = result.aflr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure sending request") + return + } + + result.aflr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure responding to request") + return + } + if result.aflr.hasNextLink() && result.aflr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AzureFirewallsClient) ListPreparer(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 = "2021-03-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.Network/azureFirewalls", 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 AzureFirewallsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) ListResponder(resp *http.Response) (result AzureFirewallListResult, err error) { + err = autorest.Respond( + resp, + 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 AzureFirewallsClient) listNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) { + req, err := lastResults.azureFirewallListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "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, "network.AzureFirewallsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AzureFirewallsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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) + return +} + +// ListAll gets all the Azure Firewalls in a subscription. +func (client AzureFirewallsClient) ListAll(ctx context.Context) (result AzureFirewallListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll") + defer func() { + sc := -1 + if result.aflr.Response.Response != nil { + sc = result.aflr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.aflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure sending request") + return + } + + result.aflr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.aflr.hasNextLink() && result.aflr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client AzureFirewallsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) ListAllResponder(resp *http.Response) (result AzureFirewallListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client AzureFirewallsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) { + req, err := lastResults.azureFirewallListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result AzureFirewallListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates tags of an Azure Firewall resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +// parameters - parameters supplied to update azure firewall tags. +func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject) (result AzureFirewallsUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, azureFirewallName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/azureFirewalls/{azureFirewallName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (future AzureFirewallsUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) UpdateTagsResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/bastionhosts.go b/services/network/mgmt/2021-03-01/network/bastionhosts.go new file mode 100644 index 000000000000..7e43e9ac2f27 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/bastionhosts.go @@ -0,0 +1,588 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BastionHostsClient is the network Client +type BastionHostsClient struct { + BaseClient +} + +// NewBastionHostsClient creates an instance of the BastionHostsClient client. +func NewBastionHostsClient(subscriptionID string) BastionHostsClient { + return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { + return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Bastion Host. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// parameters - parameters supplied to the create or update Bastion Host operation. +func (client BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost) (result BastionHostsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BastionHostPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BastionHostPropertiesFormat.ScaleUnits", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BastionHostPropertiesFormat.ScaleUnits", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, + {Target: "parameters.BastionHostPropertiesFormat.ScaleUnits", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.BastionHostsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, bastionHostName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", 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 BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) CreateOrUpdateResponder(resp *http.Response) (result BastionHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Bastion Host. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName string, bastionHostName string) (result BastionHostsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, bastionHostName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}", 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 BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Bastion Host. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +func (client BastionHostsClient) Get(ctx context.Context, resourceGroupName string, bastionHostName string) (result BastionHost, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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, bastionHostName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}", 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 BastionHostsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) GetResponder(resp *http.Response) (result BastionHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Bastion Hosts in a subscription. +func (client BastionHostsClient) List(ctx context.Context) (result BastionHostListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.List") + defer func() { + sc := -1 + if result.bhlr.Response.Response != nil { + sc = result.bhlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.bhlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", resp, "Failure sending request") + return + } + + result.bhlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", resp, "Failure responding to request") + return + } + if result.bhlr.hasNextLink() && result.bhlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts", 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 BastionHostsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) ListResponder(resp *http.Response) (result BastionHostListResult, err error) { + err = autorest.Respond( + resp, + 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 BastionHostsClient) listNextResults(ctx context.Context, lastResults BastionHostListResult) (result BastionHostListResult, err error) { + req, err := lastResults.bastionHostListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "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, "network.BastionHostsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BastionHostsClient) ListComplete(ctx context.Context) (result BastionHostListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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 lists all Bastion Hosts in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client BastionHostsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result BastionHostListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.bhlr.Response.Response != nil { + sc = result.bhlr.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, "network.BastionHostsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.bhlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.bhlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.bhlr.hasNextLink() && result.bhlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client BastionHostsClient) 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 = "2021-03-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.Network/bastionHosts", 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 BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) ListByResourceGroupResponder(resp *http.Response) (result BastionHostListResult, err error) { + err = autorest.Respond( + resp, + 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 BastionHostsClient) listByResourceGroupNextResults(ctx context.Context, lastResults BastionHostListResult) (result BastionHostListResult, err error) { + req, err := lastResults.bastionHostListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "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, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client BastionHostsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result BastionHostListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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 +} + +// UpdateTags updates Tags for BastionHost resource +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// parameters - parameters supplied to update BastionHost tags. +func (client BastionHostsClient) UpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject) (result BastionHostsUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, bastionHostName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) UpdateTagsResponder(resp *http.Response) (result BastionHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/bgpservicecommunities.go b/services/network/mgmt/2021-03-01/network/bgpservicecommunities.go new file mode 100644 index 000000000000..2d9880a64721 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/bgpservicecommunities.go @@ -0,0 +1,145 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BgpServiceCommunitiesClient is the network Client +type BgpServiceCommunitiesClient struct { + BaseClient +} + +// NewBgpServiceCommunitiesClient creates an instance of the BgpServiceCommunitiesClient client. +func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunitiesClient { + return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient { + return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets all the available bgp service communities. +func (client BgpServiceCommunitiesClient) List(ctx context.Context) (result BgpServiceCommunityListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunitiesClient.List") + defer func() { + sc := -1 + if result.bsclr.Response.Response != nil { + sc = result.bsclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.bsclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure sending request") + return + } + + result.bsclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure responding to request") + return + } + if result.bsclr.hasNextLink() && result.bsclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities", 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 BgpServiceCommunitiesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BgpServiceCommunitiesClient) ListResponder(resp *http.Response) (result BgpServiceCommunityListResult, err error) { + err = autorest.Respond( + resp, + 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 BgpServiceCommunitiesClient) listNextResults(ctx context.Context, lastResults BgpServiceCommunityListResult) (result BgpServiceCommunityListResult, err error) { + req, err := lastResults.bgpServiceCommunityListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "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, "network.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BgpServiceCommunitiesClient) ListComplete(ctx context.Context) (result BgpServiceCommunityListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunitiesClient.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/network/mgmt/2021-03-01/network/client.go b/services/network/mgmt/2021-03-01/network/client.go new file mode 100644 index 000000000000..8c438d66ed3a --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/client.go @@ -0,0 +1,843 @@ +// Package network implements the Azure ARM Network service API version . +// +// Network Client +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 Network + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Network. +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 using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} + +// CheckDNSNameAvailability checks whether a domain name in the cloudapp.azure.com zone is available for use. +// Parameters: +// location - the location of the domain name. +// domainNameLabel - the domain name to be verified. It must conform to the following regular expression: +// ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. +func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckDNSNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckDNSNameAvailabilityPreparer(ctx, location, domainNameLabel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckDNSNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckDNSNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckDNSNameAvailabilityPreparer prepares the CheckDNSNameAvailability request. +func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, location string, domainNameLabel string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "domainNameLabel": autorest.Encode("query", domainNameLabel), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always +// closes the http.Response Body. +func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response) (result DNSNameAvailabilityResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteBastionShareableLink deletes the Bastion Shareable Links for all the VMs specified in the request. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// bslRequest - post request for all the Bastion Shareable Link endpoints. +func (client BaseClient) DeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (result DeleteBastionShareableLinkFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteBastionShareableLink") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeleteBastionShareableLinkPreparer(ctx, resourceGroupName, bastionHostName, bslRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "DeleteBastionShareableLink", nil, "Failure preparing request") + return + } + + result, err = client.DeleteBastionShareableLinkSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "DeleteBastionShareableLink", nil, "Failure sending request") + return + } + + return +} + +// DeleteBastionShareableLinkPreparer prepares the DeleteBastionShareableLink request. +func (client BaseClient) DeleteBastionShareableLinkPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}/deleteShareableLinks", pathParameters), + autorest.WithJSON(bslRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteBastionShareableLinkSender sends the DeleteBastionShareableLink request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteBastionShareableLinkSender(req *http.Request) (future DeleteBastionShareableLinkFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteBastionShareableLinkResponder handles the response to the DeleteBastionShareableLink request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteBastionShareableLinkResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisconnectActiveSessions returns the list of currently active sessions on the Bastion. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// sessionIds - the list of sessionids to disconnect. +func (client BaseClient) DisconnectActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIds SessionIds) (result BastionSessionDeleteResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisconnectActiveSessions") + defer func() { + sc := -1 + if result.bsdr.Response.Response != nil { + sc = result.bsdr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.disconnectActiveSessionsNextResults + req, err := client.DisconnectActiveSessionsPreparer(ctx, resourceGroupName, bastionHostName, sessionIds) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "DisconnectActiveSessions", nil, "Failure preparing request") + return + } + + resp, err := client.DisconnectActiveSessionsSender(req) + if err != nil { + result.bsdr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BaseClient", "DisconnectActiveSessions", resp, "Failure sending request") + return + } + + result.bsdr, err = client.DisconnectActiveSessionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "DisconnectActiveSessions", resp, "Failure responding to request") + return + } + if result.bsdr.hasNextLink() && result.bsdr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// DisconnectActiveSessionsPreparer prepares the DisconnectActiveSessions request. +func (client BaseClient) DisconnectActiveSessionsPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIds SessionIds) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions", pathParameters), + autorest.WithJSON(sessionIds), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisconnectActiveSessionsSender sends the DisconnectActiveSessions request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DisconnectActiveSessionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DisconnectActiveSessionsResponder handles the response to the DisconnectActiveSessions request. The method always +// closes the http.Response Body. +func (client BaseClient) DisconnectActiveSessionsResponder(resp *http.Response) (result BastionSessionDeleteResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// disconnectActiveSessionsNextResults retrieves the next set of results, if any. +func (client BaseClient) disconnectActiveSessionsNextResults(ctx context.Context, lastResults BastionSessionDeleteResult) (result BastionSessionDeleteResult, err error) { + req, err := lastResults.bastionSessionDeleteResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BaseClient", "disconnectActiveSessionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.DisconnectActiveSessionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.BaseClient", "disconnectActiveSessionsNextResults", resp, "Failure sending next results request") + } + result, err = client.DisconnectActiveSessionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "disconnectActiveSessionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// DisconnectActiveSessionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client BaseClient) DisconnectActiveSessionsComplete(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIds SessionIds) (result BastionSessionDeleteResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisconnectActiveSessions") + 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.DisconnectActiveSessions(ctx, resourceGroupName, bastionHostName, sessionIds) + return +} + +// Generatevirtualwanvpnserverconfigurationvpnprofile generates a unique VPN profile for P2S clients for VirtualWan and +// associated VpnServerConfiguration combination in the specified resource group. +// Parameters: +// resourceGroupName - the resource group name. +// virtualWANName - the name of the VirtualWAN whose associated VpnServerConfigurations is needed. +// vpnClientParams - parameters supplied to the generate VirtualWan VPN profile generation operation. +func (client BaseClient) Generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVpnProfileParameters) (result GeneratevirtualwanvpnserverconfigurationvpnprofileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.Generatevirtualwanvpnserverconfigurationvpnprofile") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GeneratevirtualwanvpnserverconfigurationvpnprofilePreparer(ctx, resourceGroupName, virtualWANName, vpnClientParams) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "Generatevirtualwanvpnserverconfigurationvpnprofile", nil, "Failure preparing request") + return + } + + result, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "Generatevirtualwanvpnserverconfigurationvpnprofile", nil, "Failure sending request") + return + } + + return +} + +// GeneratevirtualwanvpnserverconfigurationvpnprofilePreparer prepares the Generatevirtualwanvpnserverconfigurationvpnprofile request. +func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofilePreparer(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVpnProfileParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{virtualWANName}/GenerateVpnProfile", pathParameters), + autorest.WithJSON(vpnClientParams), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GeneratevirtualwanvpnserverconfigurationvpnprofileSender sends the Generatevirtualwanvpnserverconfigurationvpnprofile request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofileSender(req *http.Request) (future GeneratevirtualwanvpnserverconfigurationvpnprofileFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GeneratevirtualwanvpnserverconfigurationvpnprofileResponder handles the response to the Generatevirtualwanvpnserverconfigurationvpnprofile request. The method always +// closes the http.Response Body. +func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(resp *http.Response) (result VpnProfileResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetActiveSessions returns the list of currently active sessions on the Bastion. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +func (client BaseClient) GetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string) (result GetActiveSessionsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetActiveSessions") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetActiveSessionsPreparer(ctx, resourceGroupName, bastionHostName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "GetActiveSessions", nil, "Failure preparing request") + return + } + + result, err = client.GetActiveSessionsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "GetActiveSessions", nil, "Failure sending request") + return + } + + return +} + +// GetActiveSessionsPreparer prepares the GetActiveSessions request. +func (client BaseClient) GetActiveSessionsPreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}/getActiveSessions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetActiveSessionsSender sends the GetActiveSessions request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetActiveSessionsSender(req *http.Request) (future GetActiveSessionsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetActiveSessionsResponder handles the response to the GetActiveSessions request. The method always +// closes the http.Response Body. +func (client BaseClient) GetActiveSessionsResponder(resp *http.Response) (result BastionActiveSessionListResultPage, err error) { + result.baslr, err = client.getActiveSessionsResponder(resp) + result.fn = client.getActiveSessionsNextResults + return +} + +func (client BaseClient) getActiveSessionsResponder(resp *http.Response) (result BastionActiveSessionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getActiveSessionsNextResults retrieves the next set of results, if any. +func (client BaseClient) getActiveSessionsNextResults(ctx context.Context, lastResults BastionActiveSessionListResult) (result BastionActiveSessionListResult, err error) { + req, err := lastResults.bastionActiveSessionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BaseClient", "getActiveSessionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + var resp *http.Response + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BaseClient", "getActiveSessionsNextResults", resp, "Failure sending next results request") + } + return client.getActiveSessionsResponder(resp) +} + +// GetActiveSessionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client BaseClient) GetActiveSessionsComplete(ctx context.Context, resourceGroupName string, bastionHostName string) (result GetActiveSessionsAllFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetActiveSessions") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + var future GetActiveSessionsFuture + future, err = client.GetActiveSessions(ctx, resourceGroupName, bastionHostName) + result.FutureAPI = future.FutureAPI + return +} + +// GetBastionShareableLink return the Bastion Shareable Links for all the VMs specified in the request. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// bslRequest - post request for all the Bastion Shareable Link endpoints. +func (client BaseClient) GetBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (result BastionShareableLinkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetBastionShareableLink") + defer func() { + sc := -1 + if result.bsllr.Response.Response != nil { + sc = result.bsllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.getBastionShareableLinkNextResults + req, err := client.GetBastionShareableLinkPreparer(ctx, resourceGroupName, bastionHostName, bslRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "GetBastionShareableLink", nil, "Failure preparing request") + return + } + + resp, err := client.GetBastionShareableLinkSender(req) + if err != nil { + result.bsllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BaseClient", "GetBastionShareableLink", resp, "Failure sending request") + return + } + + result.bsllr, err = client.GetBastionShareableLinkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "GetBastionShareableLink", resp, "Failure responding to request") + return + } + if result.bsllr.hasNextLink() && result.bsllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetBastionShareableLinkPreparer prepares the GetBastionShareableLink request. +func (client BaseClient) GetBastionShareableLinkPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}/getShareableLinks", pathParameters), + autorest.WithJSON(bslRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBastionShareableLinkSender sends the GetBastionShareableLink request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetBastionShareableLinkSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetBastionShareableLinkResponder handles the response to the GetBastionShareableLink request. The method always +// closes the http.Response Body. +func (client BaseClient) GetBastionShareableLinkResponder(resp *http.Response) (result BastionShareableLinkListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getBastionShareableLinkNextResults retrieves the next set of results, if any. +func (client BaseClient) getBastionShareableLinkNextResults(ctx context.Context, lastResults BastionShareableLinkListResult) (result BastionShareableLinkListResult, err error) { + req, err := lastResults.bastionShareableLinkListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BaseClient", "getBastionShareableLinkNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetBastionShareableLinkSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.BaseClient", "getBastionShareableLinkNextResults", resp, "Failure sending next results request") + } + result, err = client.GetBastionShareableLinkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "getBastionShareableLinkNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetBastionShareableLinkComplete enumerates all values, automatically crossing page boundaries as required. +func (client BaseClient) GetBastionShareableLinkComplete(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (result BastionShareableLinkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetBastionShareableLink") + 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.GetBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest) + return +} + +// PutBastionShareableLink creates a Bastion Shareable Links for all the VMs specified in the request. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// bslRequest - post request for all the Bastion Shareable Link endpoints. +func (client BaseClient) PutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (result PutBastionShareableLinkFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PutBastionShareableLink") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PutBastionShareableLinkPreparer(ctx, resourceGroupName, bastionHostName, bslRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "PutBastionShareableLink", nil, "Failure preparing request") + return + } + + result, err = client.PutBastionShareableLinkSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "PutBastionShareableLink", nil, "Failure sending request") + return + } + + return +} + +// PutBastionShareableLinkPreparer prepares the PutBastionShareableLink request. +func (client BaseClient) PutBastionShareableLinkPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/bastionHosts/{bastionHostName}/createShareableLinks", pathParameters), + autorest.WithJSON(bslRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutBastionShareableLinkSender sends the PutBastionShareableLink request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) PutBastionShareableLinkSender(req *http.Request) (future PutBastionShareableLinkFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PutBastionShareableLinkResponder handles the response to the PutBastionShareableLink request. The method always +// closes the http.Response Body. +func (client BaseClient) PutBastionShareableLinkResponder(resp *http.Response) (result BastionShareableLinkListResultPage, err error) { + result.bsllr, err = client.putBastionShareableLinkResponder(resp) + result.fn = client.putBastionShareableLinkNextResults + return +} + +func (client BaseClient) putBastionShareableLinkResponder(resp *http.Response) (result BastionShareableLinkListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// putBastionShareableLinkNextResults retrieves the next set of results, if any. +func (client BaseClient) putBastionShareableLinkNextResults(ctx context.Context, lastResults BastionShareableLinkListResult) (result BastionShareableLinkListResult, err error) { + req, err := lastResults.bastionShareableLinkListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BaseClient", "putBastionShareableLinkNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + var resp *http.Response + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BaseClient", "putBastionShareableLinkNextResults", resp, "Failure sending next results request") + } + return client.putBastionShareableLinkResponder(resp) +} + +// PutBastionShareableLinkComplete enumerates all values, automatically crossing page boundaries as required. +func (client BaseClient) PutBastionShareableLinkComplete(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest) (result PutBastionShareableLinkAllFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PutBastionShareableLink") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + var future PutBastionShareableLinkFuture + future, err = client.PutBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest) + result.FutureAPI = future.FutureAPI + return +} + +// SupportedSecurityProviders gives the supported security providers for the virtual wan. +// Parameters: +// resourceGroupName - the resource group name. +// virtualWANName - the name of the VirtualWAN for which supported security providers are needed. +func (client BaseClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWanSecurityProviders, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SupportedSecurityProviders") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SupportedSecurityProvidersPreparer(ctx, resourceGroupName, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", nil, "Failure preparing request") + return + } + + resp, err := client.SupportedSecurityProvidersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure sending request") + return + } + + result, err = client.SupportedSecurityProvidersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure responding to request") + return + } + + return +} + +// SupportedSecurityProvidersPreparer prepares the SupportedSecurityProviders request. +func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{virtualWANName}/supportedSecurityProviders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SupportedSecurityProvidersSender sends the SupportedSecurityProviders request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) SupportedSecurityProvidersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always +// closes the http.Response Body. +func (client BaseClient) SupportedSecurityProvidersResponder(resp *http.Response) (result VirtualWanSecurityProviders, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/connectionmonitors.go b/services/network/mgmt/2021-03-01/network/connectionmonitors.go new file mode 100644 index 000000000000..b6c3ec3a3cbc --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/connectionmonitors.go @@ -0,0 +1,696 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ConnectionMonitorsClient is the network Client +type ConnectionMonitorsClient struct { + BaseClient +} + +// NewConnectionMonitorsClient creates an instance of the ConnectionMonitorsClient client. +func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient { + return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient { + return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a connection monitor. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +// connectionMonitorName - the name of the connection monitor. +// parameters - parameters that define the operation to create a connection monitor. +// migrate - value indicating whether connection monitor V1 should be migrated to V2 format. +func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, migrate string) (result ConnectionMonitorsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source.ResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ConnectionMonitorParameters.Source.Port", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source.Port", Name: validation.InclusiveMaximum, Rule: int64(65535), Chain: nil}, + {Target: "parameters.ConnectionMonitorParameters.Source.Port", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + {Target: "parameters.ConnectionMonitorParameters.Destination", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Destination.Port", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Destination.Port", Name: validation.InclusiveMaximum, Rule: int64(65535), Chain: nil}, + {Target: "parameters.ConnectionMonitorParameters.Destination.Port", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + {Target: "parameters.ConnectionMonitorParameters.MonitoringIntervalInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.MonitoringIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(1800), Chain: nil}, + {Target: "parameters.ConnectionMonitorParameters.MonitoringIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(30), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.ConnectionMonitorsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, migrate) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, migrate string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(migrate) > 0 { + queryParameters["migrate"] = autorest.Encode("query", migrate) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", 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 ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) CreateOrUpdateResponder(resp *http.Response) (result ConnectionMonitorResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified connection monitor. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +// connectionMonitorName - the name of the connection monitor. +func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", 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 ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a connection monitor by name. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +// connectionMonitorName - the name of the connection monitor. +func (client ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.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, networkWatcherName, connectionMonitorName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", 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 ConnectionMonitorsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) GetResponder(resp *http.Response) (result ConnectionMonitorResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all connection monitors for the specified Network Watcher. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +func (client ConnectionMonitorsClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result ConnectionMonitorListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.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, resourceGroupName, networkWatcherName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors", 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 ConnectionMonitorsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) ListResponder(resp *http.Response) (result ConnectionMonitorListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Query query a snapshot of the most recent connection states. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +// connectionMonitorName - the name given to the connection monitor. +func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsQueryFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Query") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.QueryPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure preparing request") + return + } + + result, err = client.QuerySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure sending request") + return + } + + return +} + +// QueryPreparer prepares the Query request. +func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// QuerySender sends the Query request. The method will close the +// http.Response Body if it receives an error. +func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// QueryResponder handles the response to the Query request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) QueryResponder(resp *http.Response) (result ConnectionMonitorQueryResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Start starts the specified connection monitor. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +// connectionMonitorName - the name of the connection monitor. +func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Stop stops the specified connection monitor. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +// connectionMonitorName - the name of the connection monitor. +func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Stop") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure preparing request") + return + } + + result, err = client.StopSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure sending request") + return + } + + return +} + +// StopPreparer prepares the Stop request. +func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopSender sends the Stop request. The method will close the +// http.Response Body if it receives an error. +func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopResponder handles the response to the Stop request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateTags update tags of the specified connection monitor. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// connectionMonitorName - the name of the connection monitor. +// parameters - parameters supplied to update connection monitor tags. +func (client ConnectionMonitorsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject) (result ConnectionMonitorResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionMonitorName": autorest.Encode("path", connectionMonitorName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ConnectionMonitorsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) UpdateTagsResponder(resp *http.Response) (result ConnectionMonitorResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/customipprefixes.go b/services/network/mgmt/2021-03-01/network/customipprefixes.go new file mode 100644 index 000000000000..b7993091353c --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/customipprefixes.go @@ -0,0 +1,587 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// CustomIPPrefixesClient is the network Client +type CustomIPPrefixesClient struct { + BaseClient +} + +// NewCustomIPPrefixesClient creates an instance of the CustomIPPrefixesClient client. +func NewCustomIPPrefixesClient(subscriptionID string) CustomIPPrefixesClient { + return NewCustomIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCustomIPPrefixesClientWithBaseURI creates an instance of the CustomIPPrefixesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCustomIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) CustomIPPrefixesClient { + return CustomIPPrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a custom IP prefix. +// Parameters: +// resourceGroupName - the name of the resource group. +// customIPPrefixName - the name of the custom IP prefix. +// parameters - parameters supplied to the create or update custom IP prefix operation. +func (client CustomIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix) (result CustomIPPrefixesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CustomIPPrefixPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CustomIPPrefixPropertiesFormat.CustomIPPrefixParent", Name: validation.Null, Rule: false, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("network.CustomIPPrefixesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, customIPPrefixName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CustomIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "customIpPrefixName": autorest.Encode("path", customIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}", 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 CustomIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future CustomIPPrefixesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CustomIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response) (result CustomIPPrefix, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified custom IP prefix. +// Parameters: +// resourceGroupName - the name of the resource group. +// customIPPrefixName - the name of the CustomIpPrefix. +func (client CustomIPPrefixesClient) Delete(ctx context.Context, resourceGroupName string, customIPPrefixName string) (result CustomIPPrefixesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, customIPPrefixName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CustomIPPrefixesClient) DeletePreparer(ctx context.Context, resourceGroupName string, customIPPrefixName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "customIpPrefixName": autorest.Encode("path", customIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/customIpPrefixes/{customIpPrefixName}", 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 CustomIPPrefixesClient) DeleteSender(req *http.Request) (future CustomIPPrefixesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CustomIPPrefixesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified custom IP prefix in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// customIPPrefixName - the name of the custom IP prefix. +// expand - expands referenced resources. +func (client CustomIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, customIPPrefixName string, expand string) (result CustomIPPrefix, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.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, customIPPrefixName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CustomIPPrefixesClient) GetPreparer(ctx context.Context, resourceGroupName string, customIPPrefixName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "customIpPrefixName": autorest.Encode("path", customIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/customIpPrefixes/{customIpPrefixName}", 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 CustomIPPrefixesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CustomIPPrefixesClient) GetResponder(resp *http.Response) (result CustomIPPrefix, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all custom IP prefixes in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client CustomIPPrefixesClient) List(ctx context.Context, resourceGroupName string) (result CustomIPPrefixListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.List") + defer func() { + sc := -1 + if result.ciplr.Response.Response != nil { + sc = result.ciplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ciplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "List", resp, "Failure sending request") + return + } + + result.ciplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "List", resp, "Failure responding to request") + return + } + if result.ciplr.hasNextLink() && result.ciplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client CustomIPPrefixesClient) ListPreparer(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 = "2021-03-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.Network/customIpPrefixes", 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 CustomIPPrefixesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client CustomIPPrefixesClient) ListResponder(resp *http.Response) (result CustomIPPrefixListResult, err error) { + err = autorest.Respond( + resp, + 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 CustomIPPrefixesClient) listNextResults(ctx context.Context, lastResults CustomIPPrefixListResult) (result CustomIPPrefixListResult, err error) { + req, err := lastResults.customIPPrefixListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "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, "network.CustomIPPrefixesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client CustomIPPrefixesClient) ListComplete(ctx context.Context, resourceGroupName string) (result CustomIPPrefixListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.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) + return +} + +// ListAll gets all the custom IP prefixes in a subscription. +func (client CustomIPPrefixesClient) ListAll(ctx context.Context) (result CustomIPPrefixListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.ListAll") + defer func() { + sc := -1 + if result.ciplr.Response.Response != nil { + sc = result.ciplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.ciplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "ListAll", resp, "Failure sending request") + return + } + + result.ciplr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.ciplr.hasNextLink() && result.ciplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client CustomIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client CustomIPPrefixesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client CustomIPPrefixesClient) ListAllResponder(resp *http.Response) (result CustomIPPrefixListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client CustomIPPrefixesClient) listAllNextResults(ctx context.Context, lastResults CustomIPPrefixListResult) (result CustomIPPrefixListResult, err error) { + req, err := lastResults.customIPPrefixListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client CustomIPPrefixesClient) ListAllComplete(ctx context.Context) (result CustomIPPrefixListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates custom IP prefix tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// customIPPrefixName - the name of the custom IP prefix. +// parameters - parameters supplied to update custom IP prefix tags. +func (client CustomIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject) (result CustomIPPrefix, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, customIPPrefixName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client CustomIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "customIpPrefixName": autorest.Encode("path", customIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/customIpPrefixes/{customIpPrefixName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client CustomIPPrefixesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client CustomIPPrefixesClient) UpdateTagsResponder(resp *http.Response) (result CustomIPPrefix, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/ddoscustompolicies.go b/services/network/mgmt/2021-03-01/network/ddoscustompolicies.go new file mode 100644 index 000000000000..17afc2d80413 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/ddoscustompolicies.go @@ -0,0 +1,346 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DdosCustomPoliciesClient is the network Client +type DdosCustomPoliciesClient struct { + BaseClient +} + +// NewDdosCustomPoliciesClient creates an instance of the DdosCustomPoliciesClient client. +func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient { + return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient { + return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a DDoS custom policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +// parameters - parameters supplied to the create or update operation. +func (client DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (result DdosCustomPoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified DDoS custom policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, ddosCustomPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified DDoS custom policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +func (client DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.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, ddosCustomPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) GetResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags update a DDoS custom policy tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +// parameters - parameters supplied to update DDoS custom policy resource tags. +func (client DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (result DdosCustomPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) UpdateTagsResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/ddosprotectionplans.go b/services/network/mgmt/2021-03-01/network/ddosprotectionplans.go new file mode 100644 index 000000000000..a6d16e684c79 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/ddosprotectionplans.go @@ -0,0 +1,578 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DdosProtectionPlansClient is the network Client +type DdosProtectionPlansClient struct { + BaseClient +} + +// NewDdosProtectionPlansClient creates an instance of the DdosProtectionPlansClient client. +func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClient { + return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient { + return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a DDoS protection plan. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosProtectionPlanName - the name of the DDoS protection plan. +// parameters - parameters supplied to the create or update operation. +func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (result DdosProtectionPlansCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.ID = nil + parameters.Name = nil + parameters.Type = nil + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) CreateOrUpdateResponder(resp *http.Response) (result DdosProtectionPlan, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified DDoS protection plan. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosProtectionPlanName - the name of the DDoS protection plan. +func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlansDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, ddosProtectionPlanName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified DDoS protection plan. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosProtectionPlanName - the name of the DDoS protection plan. +func (client DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlan, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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, ddosProtectionPlanName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) GetResponder(resp *http.Response) (result DdosProtectionPlan, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all DDoS protection plans in a subscription. +func (client DdosProtectionPlansClient) List(ctx context.Context) (result DdosProtectionPlanListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.List") + defer func() { + sc := -1 + if result.dpplr.Response.Response != nil { + sc = result.dpplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dpplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure sending request") + return + } + + result.dpplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure responding to request") + return + } + if result.dpplr.hasNextLink() && result.dpplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans", 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 DdosProtectionPlansClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) ListResponder(resp *http.Response) (result DdosProtectionPlanListResult, err error) { + err = autorest.Respond( + resp, + 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 DdosProtectionPlansClient) listNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) { + req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "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, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DdosProtectionPlansClient) ListComplete(ctx context.Context) (result DdosProtectionPlanListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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 the DDoS protection plans in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.dpplr.Response.Response != nil { + sc = result.dpplr.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, "network.DdosProtectionPlansClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.dpplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.dpplr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dpplr.hasNextLink() && result.dpplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DdosProtectionPlansClient) 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 = "2021-03-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.Network/ddosProtectionPlans", 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 DdosProtectionPlansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) ListByResourceGroupResponder(resp *http.Response) (result DdosProtectionPlanListResult, err error) { + err = autorest.Respond( + resp, + 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 DdosProtectionPlansClient) listByResourceGroupNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) { + req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "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, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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 +} + +// UpdateTags update a DDoS protection plan tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosProtectionPlanName - the name of the DDoS protection plan. +// parameters - parameters supplied to the update DDoS protection plan resource tags. +func (client DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (result DdosProtectionPlan, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) UpdateTagsResponder(resp *http.Response) (result DdosProtectionPlan, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/defaultsecurityrules.go b/services/network/mgmt/2021-03-01/network/defaultsecurityrules.go new file mode 100644 index 000000000000..b9f202c1468d --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/defaultsecurityrules.go @@ -0,0 +1,228 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DefaultSecurityRulesClient is the network Client +type DefaultSecurityRulesClient struct { + BaseClient +} + +// NewDefaultSecurityRulesClient creates an instance of the DefaultSecurityRulesClient client. +func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesClient { + return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient { + return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the specified default network security rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// defaultSecurityRuleName - the name of the default security rule. +func (client DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (result SecurityRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.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, networkSecurityGroupName, defaultSecurityRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "defaultSecurityRuleName": autorest.Encode("path", defaultSecurityRuleName), + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}", 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 DefaultSecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DefaultSecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all default security rules in a network security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +func (client DefaultSecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.List") + defer func() { + sc := -1 + if result.srlr.Response.Response != nil { + sc = result.srlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.srlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure sending request") + return + } + + result.srlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure responding to request") + return + } + if result.srlr.hasNextLink() && result.srlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules", 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 DefaultSecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DefaultSecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, err error) { + err = autorest.Respond( + resp, + 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 DefaultSecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { + req, err := lastResults.securityRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "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, "network.DefaultSecurityRulesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DefaultSecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.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, networkSecurityGroupName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/dscpconfiguration.go b/services/network/mgmt/2021-03-01/network/dscpconfiguration.go new file mode 100644 index 000000000000..4e8f0a2e09ec --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/dscpconfiguration.go @@ -0,0 +1,496 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DscpConfigurationClient is the network Client +type DscpConfigurationClient struct { + BaseClient +} + +// NewDscpConfigurationClient creates an instance of the DscpConfigurationClient client. +func NewDscpConfigurationClient(subscriptionID string) DscpConfigurationClient { + return NewDscpConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDscpConfigurationClientWithBaseURI creates an instance of the DscpConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDscpConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscpConfigurationClient { + return DscpConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a DSCP Configuration. +// Parameters: +// resourceGroupName - the name of the resource group. +// dscpConfigurationName - the name of the resource. +// parameters - parameters supplied to the create or update dscp configuration operation. +func (client DscpConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration) (result DscpConfigurationCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, dscpConfigurationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DscpConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dscpConfigurationName": autorest.Encode("path", dscpConfigurationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}", 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 DscpConfigurationClient) CreateOrUpdateSender(req *http.Request) (future DscpConfigurationCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DscpConfigurationClient) CreateOrUpdateResponder(resp *http.Response) (result DscpConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a DSCP Configuration. +// Parameters: +// resourceGroupName - the name of the resource group. +// dscpConfigurationName - the name of the resource. +func (client DscpConfigurationClient) Delete(ctx context.Context, resourceGroupName string, dscpConfigurationName string) (result DscpConfigurationDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, dscpConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DscpConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, dscpConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dscpConfigurationName": autorest.Encode("path", dscpConfigurationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/dscpConfigurations/{dscpConfigurationName}", 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 DscpConfigurationClient) DeleteSender(req *http.Request) (future DscpConfigurationDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DscpConfigurationClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a DSCP Configuration. +// Parameters: +// resourceGroupName - the name of the resource group. +// dscpConfigurationName - the name of the resource. +func (client DscpConfigurationClient) Get(ctx context.Context, resourceGroupName string, dscpConfigurationName string) (result DscpConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.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, dscpConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DscpConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, dscpConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dscpConfigurationName": autorest.Encode("path", dscpConfigurationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/dscpConfigurations/{dscpConfigurationName}", 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 DscpConfigurationClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DscpConfigurationClient) GetResponder(resp *http.Response) (result DscpConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a DSCP Configuration. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client DscpConfigurationClient) List(ctx context.Context, resourceGroupName string) (result DscpConfigurationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.List") + defer func() { + sc := -1 + if result.dclr.Response.Response != nil { + sc = result.dclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "List", resp, "Failure sending request") + return + } + + result.dclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "List", resp, "Failure responding to request") + return + } + if result.dclr.hasNextLink() && result.dclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client DscpConfigurationClient) ListPreparer(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 = "2021-03-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.Network/dscpConfigurations", 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 DscpConfigurationClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DscpConfigurationClient) ListResponder(resp *http.Response) (result DscpConfigurationListResult, err error) { + err = autorest.Respond( + resp, + 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 DscpConfigurationClient) listNextResults(ctx context.Context, lastResults DscpConfigurationListResult) (result DscpConfigurationListResult, err error) { + req, err := lastResults.dscpConfigurationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "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, "network.DscpConfigurationClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DscpConfigurationClient) ListComplete(ctx context.Context, resourceGroupName string) (result DscpConfigurationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.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) + return +} + +// ListAll gets all dscp configurations in a subscription. +func (client DscpConfigurationClient) ListAll(ctx context.Context) (result DscpConfigurationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.ListAll") + defer func() { + sc := -1 + if result.dclr.Response.Response != nil { + sc = result.dclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.dclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "ListAll", resp, "Failure sending request") + return + } + + result.dclr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "ListAll", resp, "Failure responding to request") + return + } + if result.dclr.hasNextLink() && result.dclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client DscpConfigurationClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client DscpConfigurationClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client DscpConfigurationClient) ListAllResponder(resp *http.Response) (result DscpConfigurationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client DscpConfigurationClient) listAllNextResults(ctx context.Context, lastResults DscpConfigurationListResult) (result DscpConfigurationListResult, err error) { + req, err := lastResults.dscpConfigurationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client DscpConfigurationClient) ListAllComplete(ctx context.Context) (result DscpConfigurationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationClient.ListAll") + 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.ListAll(ctx) + return +} diff --git a/services/network/mgmt/2021-03-01/network/enums.go b/services/network/mgmt/2021-03-01/network/enums.go new file mode 100644 index 000000000000..af78d61851c3 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/enums.go @@ -0,0 +1,2983 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Access enumerates the values for access. +type Access string + +const ( + // AccessAllow ... + AccessAllow Access = "Allow" + // AccessDeny ... + AccessDeny Access = "Deny" +) + +// PossibleAccessValues returns an array of possible values for the Access const type. +func PossibleAccessValues() []Access { + return []Access{AccessAllow, AccessDeny} +} + +// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health +// server health. +type ApplicationGatewayBackendHealthServerHealth string + +const ( + // ApplicationGatewayBackendHealthServerHealthDown ... + ApplicationGatewayBackendHealthServerHealthDown ApplicationGatewayBackendHealthServerHealth = "Down" + // ApplicationGatewayBackendHealthServerHealthDraining ... + ApplicationGatewayBackendHealthServerHealthDraining ApplicationGatewayBackendHealthServerHealth = "Draining" + // ApplicationGatewayBackendHealthServerHealthPartial ... + ApplicationGatewayBackendHealthServerHealthPartial ApplicationGatewayBackendHealthServerHealth = "Partial" + // ApplicationGatewayBackendHealthServerHealthUnknown ... + ApplicationGatewayBackendHealthServerHealthUnknown ApplicationGatewayBackendHealthServerHealth = "Unknown" + // ApplicationGatewayBackendHealthServerHealthUp ... + ApplicationGatewayBackendHealthServerHealthUp ApplicationGatewayBackendHealthServerHealth = "Up" +) + +// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type. +func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { + return []ApplicationGatewayBackendHealthServerHealth{ApplicationGatewayBackendHealthServerHealthDown, ApplicationGatewayBackendHealthServerHealthDraining, ApplicationGatewayBackendHealthServerHealthPartial, ApplicationGatewayBackendHealthServerHealthUnknown, ApplicationGatewayBackendHealthServerHealthUp} +} + +// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. +type ApplicationGatewayCookieBasedAffinity string + +const ( + // ApplicationGatewayCookieBasedAffinityDisabled ... + ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" + // ApplicationGatewayCookieBasedAffinityEnabled ... + ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" +) + +// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type. +func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { + return []ApplicationGatewayCookieBasedAffinity{ApplicationGatewayCookieBasedAffinityDisabled, ApplicationGatewayCookieBasedAffinityEnabled} +} + +// ApplicationGatewayCustomErrorStatusCode enumerates the values for application gateway custom error status +// code. +type ApplicationGatewayCustomErrorStatusCode string + +const ( + // ApplicationGatewayCustomErrorStatusCodeHTTPStatus403 ... + ApplicationGatewayCustomErrorStatusCodeHTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" + // ApplicationGatewayCustomErrorStatusCodeHTTPStatus502 ... + ApplicationGatewayCustomErrorStatusCodeHTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" +) + +// PossibleApplicationGatewayCustomErrorStatusCodeValues returns an array of possible values for the ApplicationGatewayCustomErrorStatusCode const type. +func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode { + return []ApplicationGatewayCustomErrorStatusCode{ApplicationGatewayCustomErrorStatusCodeHTTPStatus403, ApplicationGatewayCustomErrorStatusCodeHTTPStatus502} +} + +// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. +type ApplicationGatewayFirewallMode string + +const ( + // ApplicationGatewayFirewallModeDetection ... + ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" + // ApplicationGatewayFirewallModePrevention ... + ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" +) + +// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type. +func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { + return []ApplicationGatewayFirewallMode{ApplicationGatewayFirewallModeDetection, ApplicationGatewayFirewallModePrevention} +} + +// ApplicationGatewayLoadDistributionAlgorithm enumerates the values for application gateway load distribution +// algorithm. +type ApplicationGatewayLoadDistributionAlgorithm string + +const ( + // ApplicationGatewayLoadDistributionAlgorithmIPHash ... + ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" + // ApplicationGatewayLoadDistributionAlgorithmLeastConnections ... + ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" + // ApplicationGatewayLoadDistributionAlgorithmRoundRobin ... + ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" +) + +// PossibleApplicationGatewayLoadDistributionAlgorithmValues returns an array of possible values for the ApplicationGatewayLoadDistributionAlgorithm const type. +func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGatewayLoadDistributionAlgorithm { + return []ApplicationGatewayLoadDistributionAlgorithm{ApplicationGatewayLoadDistributionAlgorithmIPHash, ApplicationGatewayLoadDistributionAlgorithmLeastConnections, ApplicationGatewayLoadDistributionAlgorithmRoundRobin} +} + +// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. +type ApplicationGatewayOperationalState string + +const ( + // ApplicationGatewayOperationalStateRunning ... + ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" + // ApplicationGatewayOperationalStateStarting ... + ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" + // ApplicationGatewayOperationalStateStopped ... + ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" + // ApplicationGatewayOperationalStateStopping ... + ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" +) + +// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type. +func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { + return []ApplicationGatewayOperationalState{ApplicationGatewayOperationalStateRunning, ApplicationGatewayOperationalStateStarting, ApplicationGatewayOperationalStateStopped, ApplicationGatewayOperationalStateStopping} +} + +// ApplicationGatewayProtocol enumerates the values for application gateway protocol. +type ApplicationGatewayProtocol string + +const ( + // ApplicationGatewayProtocolHTTP ... + ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" + // ApplicationGatewayProtocolHTTPS ... + ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" +) + +// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. +func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { + return []ApplicationGatewayProtocol{ApplicationGatewayProtocolHTTP, ApplicationGatewayProtocolHTTPS} +} + +// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. +type ApplicationGatewayRedirectType string + +const ( + // ApplicationGatewayRedirectTypeFound ... + ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" + // ApplicationGatewayRedirectTypePermanent ... + ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" + // ApplicationGatewayRedirectTypeSeeOther ... + ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" + // ApplicationGatewayRedirectTypeTemporary ... + ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" +) + +// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type. +func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { + return []ApplicationGatewayRedirectType{ApplicationGatewayRedirectTypeFound, ApplicationGatewayRedirectTypePermanent, ApplicationGatewayRedirectTypeSeeOther, ApplicationGatewayRedirectTypeTemporary} +} + +// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule +// type. +type ApplicationGatewayRequestRoutingRuleType string + +const ( + // ApplicationGatewayRequestRoutingRuleTypeBasic ... + ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" + // ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ... + ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" +) + +// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type. +func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { + return []ApplicationGatewayRequestRoutingRuleType{ApplicationGatewayRequestRoutingRuleTypeBasic, ApplicationGatewayRequestRoutingRuleTypePathBasedRouting} +} + +// ApplicationGatewaySkuName enumerates the values for application gateway sku name. +type ApplicationGatewaySkuName string + +const ( + // ApplicationGatewaySkuNameStandardLarge ... + ApplicationGatewaySkuNameStandardLarge ApplicationGatewaySkuName = "Standard_Large" + // ApplicationGatewaySkuNameStandardMedium ... + ApplicationGatewaySkuNameStandardMedium ApplicationGatewaySkuName = "Standard_Medium" + // ApplicationGatewaySkuNameStandardSmall ... + ApplicationGatewaySkuNameStandardSmall ApplicationGatewaySkuName = "Standard_Small" + // ApplicationGatewaySkuNameStandardV2 ... + ApplicationGatewaySkuNameStandardV2 ApplicationGatewaySkuName = "Standard_v2" + // ApplicationGatewaySkuNameWAFLarge ... + ApplicationGatewaySkuNameWAFLarge ApplicationGatewaySkuName = "WAF_Large" + // ApplicationGatewaySkuNameWAFMedium ... + ApplicationGatewaySkuNameWAFMedium ApplicationGatewaySkuName = "WAF_Medium" + // ApplicationGatewaySkuNameWAFV2 ... + ApplicationGatewaySkuNameWAFV2 ApplicationGatewaySkuName = "WAF_v2" +) + +// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. +func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { + return []ApplicationGatewaySkuName{ApplicationGatewaySkuNameStandardLarge, ApplicationGatewaySkuNameStandardMedium, ApplicationGatewaySkuNameStandardSmall, ApplicationGatewaySkuNameStandardV2, ApplicationGatewaySkuNameWAFLarge, ApplicationGatewaySkuNameWAFMedium, ApplicationGatewaySkuNameWAFV2} +} + +// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. +type ApplicationGatewaySslCipherSuite string + +const ( + // ApplicationGatewaySslCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA ... + ApplicationGatewaySslCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES128CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES128CBCSHA256 ... + ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + // ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES256CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES256CBCSHA256 ... + ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + // ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES128CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES128GCMSHA256 ... + ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + // ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES256CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES256GCMSHA384 ... + ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + // ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256 ... + ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + // ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256 ... + ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + // ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384 ... + ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + // ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384 ... + ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + // ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128CBCSHA256 ... + ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + // ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128GCMSHA256 ... + ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + // ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256CBCSHA384 ... + ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + // ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256GCMSHA384 ... + ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + // ApplicationGatewaySslCipherSuiteTLSRSAWITH3DESEDECBCSHA ... + ApplicationGatewaySslCipherSuiteTLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128CBCSHA256 ... + ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" + // ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128GCMSHA256 ... + ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" + // ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256CBCSHA ... + ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" + // ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256CBCSHA256 ... + ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" + // ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256GCMSHA384 ... + ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type. +func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite { + return []ApplicationGatewaySslCipherSuite{ApplicationGatewaySslCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA, ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES128CBCSHA, ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES128CBCSHA256, ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES256CBCSHA, ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAES256CBCSHA256, ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES128CBCSHA, ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES128GCMSHA256, ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES256CBCSHA, ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAES256GCMSHA384, ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA, ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256, ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256, ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA, ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384, ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384, ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128CBCSHA, ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128CBCSHA256, ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES128GCMSHA256, ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256CBCSHA, ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256CBCSHA384, ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAES256GCMSHA384, ApplicationGatewaySslCipherSuiteTLSRSAWITH3DESEDECBCSHA, ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128CBCSHA, ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128CBCSHA256, ApplicationGatewaySslCipherSuiteTLSRSAWITHAES128GCMSHA256, ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256CBCSHA, ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256CBCSHA256, ApplicationGatewaySslCipherSuiteTLSRSAWITHAES256GCMSHA384} +} + +// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. +type ApplicationGatewaySslPolicyName string + +const ( + // ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501 ... + ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" + // ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401 ... + ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" + // ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S ... + ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" +) + +// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type. +func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName { + return []ApplicationGatewaySslPolicyName{ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501, ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401, ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S} +} + +// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. +type ApplicationGatewaySslPolicyType string + +const ( + // ApplicationGatewaySslPolicyTypeCustom ... + ApplicationGatewaySslPolicyTypeCustom ApplicationGatewaySslPolicyType = "Custom" + // ApplicationGatewaySslPolicyTypePredefined ... + ApplicationGatewaySslPolicyTypePredefined ApplicationGatewaySslPolicyType = "Predefined" +) + +// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type. +func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType { + return []ApplicationGatewaySslPolicyType{ApplicationGatewaySslPolicyTypeCustom, ApplicationGatewaySslPolicyTypePredefined} +} + +// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. +type ApplicationGatewaySslProtocol string + +const ( + // ApplicationGatewaySslProtocolTLSv10 ... + ApplicationGatewaySslProtocolTLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" + // ApplicationGatewaySslProtocolTLSv11 ... + ApplicationGatewaySslProtocolTLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" + // ApplicationGatewaySslProtocolTLSv12 ... + ApplicationGatewaySslProtocolTLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" +) + +// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type. +func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol { + return []ApplicationGatewaySslProtocol{ApplicationGatewaySslProtocolTLSv10, ApplicationGatewaySslProtocolTLSv11, ApplicationGatewaySslProtocolTLSv12} +} + +// ApplicationGatewayTier enumerates the values for application gateway tier. +type ApplicationGatewayTier string + +const ( + // ApplicationGatewayTierStandard ... + ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" + // ApplicationGatewayTierStandardV2 ... + ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2" + // ApplicationGatewayTierWAF ... + ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" + // ApplicationGatewayTierWAFV2 ... + ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2" +) + +// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type. +func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { + return []ApplicationGatewayTier{ApplicationGatewayTierStandard, ApplicationGatewayTierStandardV2, ApplicationGatewayTierWAF, ApplicationGatewayTierWAFV2} +} + +// AssociationType enumerates the values for association type. +type AssociationType string + +const ( + // AssociationTypeAssociated ... + AssociationTypeAssociated AssociationType = "Associated" + // AssociationTypeContains ... + AssociationTypeContains AssociationType = "Contains" +) + +// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type. +func PossibleAssociationTypeValues() []AssociationType { + return []AssociationType{AssociationTypeAssociated, AssociationTypeContains} +} + +// AuthenticationMethod enumerates the values for authentication method. +type AuthenticationMethod string + +const ( + // AuthenticationMethodEAPMSCHAPv2 ... + AuthenticationMethodEAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" + // AuthenticationMethodEAPTLS ... + AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" +) + +// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type. +func PossibleAuthenticationMethodValues() []AuthenticationMethod { + return []AuthenticationMethod{AuthenticationMethodEAPMSCHAPv2, AuthenticationMethodEAPTLS} +} + +// AuthorizationUseStatus enumerates the values for authorization use status. +type AuthorizationUseStatus string + +const ( + // AuthorizationUseStatusAvailable ... + AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" + // AuthorizationUseStatusInUse ... + AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" +) + +// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type. +func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { + return []AuthorizationUseStatus{AuthorizationUseStatusAvailable, AuthorizationUseStatusInUse} +} + +// AzureFirewallApplicationRuleProtocolType enumerates the values for azure firewall application rule protocol +// type. +type AzureFirewallApplicationRuleProtocolType string + +const ( + // AzureFirewallApplicationRuleProtocolTypeHTTP ... + AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" + // AzureFirewallApplicationRuleProtocolTypeHTTPS ... + AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" + // AzureFirewallApplicationRuleProtocolTypeMssql ... + AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" +) + +// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type. +func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { + return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS, AzureFirewallApplicationRuleProtocolTypeMssql} +} + +// AzureFirewallNatRCActionType enumerates the values for azure firewall nat rc action type. +type AzureFirewallNatRCActionType string + +const ( + // AzureFirewallNatRCActionTypeDnat ... + AzureFirewallNatRCActionTypeDnat AzureFirewallNatRCActionType = "Dnat" + // AzureFirewallNatRCActionTypeSnat ... + AzureFirewallNatRCActionTypeSnat AzureFirewallNatRCActionType = "Snat" +) + +// PossibleAzureFirewallNatRCActionTypeValues returns an array of possible values for the AzureFirewallNatRCActionType const type. +func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType { + return []AzureFirewallNatRCActionType{AzureFirewallNatRCActionTypeDnat, AzureFirewallNatRCActionTypeSnat} +} + +// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol. +type AzureFirewallNetworkRuleProtocol string + +const ( + // AzureFirewallNetworkRuleProtocolAny ... + AzureFirewallNetworkRuleProtocolAny AzureFirewallNetworkRuleProtocol = "Any" + // AzureFirewallNetworkRuleProtocolICMP ... + AzureFirewallNetworkRuleProtocolICMP AzureFirewallNetworkRuleProtocol = "ICMP" + // AzureFirewallNetworkRuleProtocolTCP ... + AzureFirewallNetworkRuleProtocolTCP AzureFirewallNetworkRuleProtocol = "TCP" + // AzureFirewallNetworkRuleProtocolUDP ... + AzureFirewallNetworkRuleProtocolUDP AzureFirewallNetworkRuleProtocol = "UDP" +) + +// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type. +func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { + return []AzureFirewallNetworkRuleProtocol{AzureFirewallNetworkRuleProtocolAny, AzureFirewallNetworkRuleProtocolICMP, AzureFirewallNetworkRuleProtocolTCP, AzureFirewallNetworkRuleProtocolUDP} +} + +// AzureFirewallRCActionType enumerates the values for azure firewall rc action type. +type AzureFirewallRCActionType string + +const ( + // AzureFirewallRCActionTypeAllow ... + AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" + // AzureFirewallRCActionTypeDeny ... + AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" +) + +// PossibleAzureFirewallRCActionTypeValues returns an array of possible values for the AzureFirewallRCActionType const type. +func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { + return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny} +} + +// AzureFirewallSkuName enumerates the values for azure firewall sku name. +type AzureFirewallSkuName string + +const ( + // AzureFirewallSkuNameAZFWHub ... + AzureFirewallSkuNameAZFWHub AzureFirewallSkuName = "AZFW_Hub" + // AzureFirewallSkuNameAZFWVNet ... + AzureFirewallSkuNameAZFWVNet AzureFirewallSkuName = "AZFW_VNet" +) + +// PossibleAzureFirewallSkuNameValues returns an array of possible values for the AzureFirewallSkuName const type. +func PossibleAzureFirewallSkuNameValues() []AzureFirewallSkuName { + return []AzureFirewallSkuName{AzureFirewallSkuNameAZFWHub, AzureFirewallSkuNameAZFWVNet} +} + +// AzureFirewallSkuTier enumerates the values for azure firewall sku tier. +type AzureFirewallSkuTier string + +const ( + // AzureFirewallSkuTierPremium ... + AzureFirewallSkuTierPremium AzureFirewallSkuTier = "Premium" + // AzureFirewallSkuTierStandard ... + AzureFirewallSkuTierStandard AzureFirewallSkuTier = "Standard" +) + +// PossibleAzureFirewallSkuTierValues returns an array of possible values for the AzureFirewallSkuTier const type. +func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { + return []AzureFirewallSkuTier{AzureFirewallSkuTierPremium, AzureFirewallSkuTierStandard} +} + +// AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode. +type AzureFirewallThreatIntelMode string + +const ( + // AzureFirewallThreatIntelModeAlert ... + AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" + // AzureFirewallThreatIntelModeDeny ... + AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" + // AzureFirewallThreatIntelModeOff ... + AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" +) + +// PossibleAzureFirewallThreatIntelModeValues returns an array of possible values for the AzureFirewallThreatIntelMode const type. +func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { + return []AzureFirewallThreatIntelMode{AzureFirewallThreatIntelModeAlert, AzureFirewallThreatIntelModeDeny, AzureFirewallThreatIntelModeOff} +} + +// BastionConnectProtocol enumerates the values for bastion connect protocol. +type BastionConnectProtocol string + +const ( + // BastionConnectProtocolRDP ... + BastionConnectProtocolRDP BastionConnectProtocol = "RDP" + // BastionConnectProtocolSSH ... + BastionConnectProtocolSSH BastionConnectProtocol = "SSH" +) + +// PossibleBastionConnectProtocolValues returns an array of possible values for the BastionConnectProtocol const type. +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return []BastionConnectProtocol{BastionConnectProtocolRDP, BastionConnectProtocolSSH} +} + +// BastionHostSkuName enumerates the values for bastion host sku name. +type BastionHostSkuName string + +const ( + // BastionHostSkuNameBasic ... + BastionHostSkuNameBasic BastionHostSkuName = "Basic" + // BastionHostSkuNameStandard ... + BastionHostSkuNameStandard BastionHostSkuName = "Standard" +) + +// PossibleBastionHostSkuNameValues returns an array of possible values for the BastionHostSkuName const type. +func PossibleBastionHostSkuNameValues() []BastionHostSkuName { + return []BastionHostSkuName{BastionHostSkuNameBasic, BastionHostSkuNameStandard} +} + +// BgpPeerState enumerates the values for bgp peer state. +type BgpPeerState string + +const ( + // BgpPeerStateConnected ... + BgpPeerStateConnected BgpPeerState = "Connected" + // BgpPeerStateConnecting ... + BgpPeerStateConnecting BgpPeerState = "Connecting" + // BgpPeerStateIdle ... + BgpPeerStateIdle BgpPeerState = "Idle" + // BgpPeerStateStopped ... + BgpPeerStateStopped BgpPeerState = "Stopped" + // BgpPeerStateUnknown ... + BgpPeerStateUnknown BgpPeerState = "Unknown" +) + +// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type. +func PossibleBgpPeerStateValues() []BgpPeerState { + return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown} +} + +// CircuitConnectionStatus enumerates the values for circuit connection status. +type CircuitConnectionStatus string + +const ( + // CircuitConnectionStatusConnected ... + CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" + // CircuitConnectionStatusConnecting ... + CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" + // CircuitConnectionStatusDisconnected ... + CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" +) + +// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type. +func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { + return []CircuitConnectionStatus{CircuitConnectionStatusConnected, CircuitConnectionStatusConnecting, CircuitConnectionStatusDisconnected} +} + +// CommissionedState enumerates the values for commissioned state. +type CommissionedState string + +const ( + // CommissionedStateCommissioned ... + CommissionedStateCommissioned CommissionedState = "Commissioned" + // CommissionedStateCommissioning ... + CommissionedStateCommissioning CommissionedState = "Commissioning" + // CommissionedStateDecommissioning ... + CommissionedStateDecommissioning CommissionedState = "Decommissioning" + // CommissionedStateDeprovisioning ... + CommissionedStateDeprovisioning CommissionedState = "Deprovisioning" + // CommissionedStateProvisioned ... + CommissionedStateProvisioned CommissionedState = "Provisioned" + // CommissionedStateProvisioning ... + CommissionedStateProvisioning CommissionedState = "Provisioning" +) + +// PossibleCommissionedStateValues returns an array of possible values for the CommissionedState const type. +func PossibleCommissionedStateValues() []CommissionedState { + return []CommissionedState{CommissionedStateCommissioned, CommissionedStateCommissioning, CommissionedStateDecommissioning, CommissionedStateDeprovisioning, CommissionedStateProvisioned, CommissionedStateProvisioning} +} + +// ConnectionMonitorEndpointFilterItemType enumerates the values for connection monitor endpoint filter item +// type. +type ConnectionMonitorEndpointFilterItemType string + +const ( + // ConnectionMonitorEndpointFilterItemTypeAgentAddress ... + ConnectionMonitorEndpointFilterItemTypeAgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" +) + +// PossibleConnectionMonitorEndpointFilterItemTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterItemType const type. +func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { + return []ConnectionMonitorEndpointFilterItemType{ConnectionMonitorEndpointFilterItemTypeAgentAddress} +} + +// ConnectionMonitorEndpointFilterType enumerates the values for connection monitor endpoint filter type. +type ConnectionMonitorEndpointFilterType string + +const ( + // ConnectionMonitorEndpointFilterTypeInclude ... + ConnectionMonitorEndpointFilterTypeInclude ConnectionMonitorEndpointFilterType = "Include" +) + +// PossibleConnectionMonitorEndpointFilterTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterType const type. +func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { + return []ConnectionMonitorEndpointFilterType{ConnectionMonitorEndpointFilterTypeInclude} +} + +// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status. +type ConnectionMonitorSourceStatus string + +const ( + // ConnectionMonitorSourceStatusActive ... + ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" + // ConnectionMonitorSourceStatusInactive ... + ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" + // ConnectionMonitorSourceStatusUnknown ... + ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" +) + +// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type. +func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { + return []ConnectionMonitorSourceStatus{ConnectionMonitorSourceStatusActive, ConnectionMonitorSourceStatusInactive, ConnectionMonitorSourceStatusUnknown} +} + +// ConnectionMonitorTestConfigurationProtocol enumerates the values for connection monitor test configuration +// protocol. +type ConnectionMonitorTestConfigurationProtocol string + +const ( + // ConnectionMonitorTestConfigurationProtocolHTTP ... + ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" + // ConnectionMonitorTestConfigurationProtocolIcmp ... + ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" + // ConnectionMonitorTestConfigurationProtocolTCP ... + ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = "Tcp" +) + +// PossibleConnectionMonitorTestConfigurationProtocolValues returns an array of possible values for the ConnectionMonitorTestConfigurationProtocol const type. +func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { + return []ConnectionMonitorTestConfigurationProtocol{ConnectionMonitorTestConfigurationProtocolHTTP, ConnectionMonitorTestConfigurationProtocolIcmp, ConnectionMonitorTestConfigurationProtocolTCP} +} + +// ConnectionMonitorType enumerates the values for connection monitor type. +type ConnectionMonitorType string + +const ( + // ConnectionMonitorTypeMultiEndpoint ... + ConnectionMonitorTypeMultiEndpoint ConnectionMonitorType = "MultiEndpoint" + // ConnectionMonitorTypeSingleSourceDestination ... + ConnectionMonitorTypeSingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" +) + +// PossibleConnectionMonitorTypeValues returns an array of possible values for the ConnectionMonitorType const type. +func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { + return []ConnectionMonitorType{ConnectionMonitorTypeMultiEndpoint, ConnectionMonitorTypeSingleSourceDestination} +} + +// ConnectionState enumerates the values for connection state. +type ConnectionState string + +const ( + // ConnectionStateReachable ... + ConnectionStateReachable ConnectionState = "Reachable" + // ConnectionStateUnknown ... + ConnectionStateUnknown ConnectionState = "Unknown" + // ConnectionStateUnreachable ... + ConnectionStateUnreachable ConnectionState = "Unreachable" +) + +// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type. +func PossibleConnectionStateValues() []ConnectionState { + return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable} +} + +// ConnectionStatus enumerates the values for connection status. +type ConnectionStatus string + +const ( + // ConnectionStatusConnected ... + ConnectionStatusConnected ConnectionStatus = "Connected" + // ConnectionStatusDegraded ... + ConnectionStatusDegraded ConnectionStatus = "Degraded" + // ConnectionStatusDisconnected ... + ConnectionStatusDisconnected ConnectionStatus = "Disconnected" + // ConnectionStatusUnknown ... + ConnectionStatusUnknown ConnectionStatus = "Unknown" +) + +// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type. +func PossibleConnectionStatusValues() []ConnectionStatus { + return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown} +} + +// CoverageLevel enumerates the values for coverage level. +type CoverageLevel string + +const ( + // CoverageLevelAboveAverage ... + CoverageLevelAboveAverage CoverageLevel = "AboveAverage" + // CoverageLevelAverage ... + CoverageLevelAverage CoverageLevel = "Average" + // CoverageLevelBelowAverage ... + CoverageLevelBelowAverage CoverageLevel = "BelowAverage" + // CoverageLevelDefault ... + CoverageLevelDefault CoverageLevel = "Default" + // CoverageLevelFull ... + CoverageLevelFull CoverageLevel = "Full" + // CoverageLevelLow ... + CoverageLevelLow CoverageLevel = "Low" +) + +// PossibleCoverageLevelValues returns an array of possible values for the CoverageLevel const type. +func PossibleCoverageLevelValues() []CoverageLevel { + return []CoverageLevel{CoverageLevelAboveAverage, CoverageLevelAverage, CoverageLevelBelowAverage, CoverageLevelDefault, CoverageLevelFull, CoverageLevelLow} +} + +// DdosCustomPolicyProtocol enumerates the values for ddos custom policy protocol. +type DdosCustomPolicyProtocol string + +const ( + // DdosCustomPolicyProtocolSyn ... + DdosCustomPolicyProtocolSyn DdosCustomPolicyProtocol = "Syn" + // DdosCustomPolicyProtocolTCP ... + DdosCustomPolicyProtocolTCP DdosCustomPolicyProtocol = "Tcp" + // DdosCustomPolicyProtocolUDP ... + DdosCustomPolicyProtocolUDP DdosCustomPolicyProtocol = "Udp" +) + +// PossibleDdosCustomPolicyProtocolValues returns an array of possible values for the DdosCustomPolicyProtocol const type. +func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol { + return []DdosCustomPolicyProtocol{DdosCustomPolicyProtocolSyn, DdosCustomPolicyProtocolTCP, DdosCustomPolicyProtocolUDP} +} + +// DdosCustomPolicyTriggerSensitivityOverride enumerates the values for ddos custom policy trigger sensitivity +// override. +type DdosCustomPolicyTriggerSensitivityOverride string + +const ( + // DdosCustomPolicyTriggerSensitivityOverrideDefault ... + DdosCustomPolicyTriggerSensitivityOverrideDefault DdosCustomPolicyTriggerSensitivityOverride = "Default" + // DdosCustomPolicyTriggerSensitivityOverrideHigh ... + DdosCustomPolicyTriggerSensitivityOverrideHigh DdosCustomPolicyTriggerSensitivityOverride = "High" + // DdosCustomPolicyTriggerSensitivityOverrideLow ... + DdosCustomPolicyTriggerSensitivityOverrideLow DdosCustomPolicyTriggerSensitivityOverride = "Low" + // DdosCustomPolicyTriggerSensitivityOverrideRelaxed ... + DdosCustomPolicyTriggerSensitivityOverrideRelaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" +) + +// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns an array of possible values for the DdosCustomPolicyTriggerSensitivityOverride const type. +func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride { + return []DdosCustomPolicyTriggerSensitivityOverride{DdosCustomPolicyTriggerSensitivityOverrideDefault, DdosCustomPolicyTriggerSensitivityOverrideHigh, DdosCustomPolicyTriggerSensitivityOverrideLow, DdosCustomPolicyTriggerSensitivityOverrideRelaxed} +} + +// DdosSettingsProtectionCoverage enumerates the values for ddos settings protection coverage. +type DdosSettingsProtectionCoverage string + +const ( + // DdosSettingsProtectionCoverageBasic ... + DdosSettingsProtectionCoverageBasic DdosSettingsProtectionCoverage = "Basic" + // DdosSettingsProtectionCoverageStandard ... + DdosSettingsProtectionCoverageStandard DdosSettingsProtectionCoverage = "Standard" +) + +// PossibleDdosSettingsProtectionCoverageValues returns an array of possible values for the DdosSettingsProtectionCoverage const type. +func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCoverage { + return []DdosSettingsProtectionCoverage{DdosSettingsProtectionCoverageBasic, DdosSettingsProtectionCoverageStandard} +} + +// DeleteOptions enumerates the values for delete options. +type DeleteOptions string + +const ( + // DeleteOptionsDelete ... + DeleteOptionsDelete DeleteOptions = "Delete" + // DeleteOptionsDetach ... + DeleteOptionsDetach DeleteOptions = "Detach" +) + +// PossibleDeleteOptionsValues returns an array of possible values for the DeleteOptions const type. +func PossibleDeleteOptionsValues() []DeleteOptions { + return []DeleteOptions{DeleteOptionsDelete, DeleteOptionsDetach} +} + +// DestinationPortBehavior enumerates the values for destination port behavior. +type DestinationPortBehavior string + +const ( + // DestinationPortBehaviorListenIfAvailable ... + DestinationPortBehaviorListenIfAvailable DestinationPortBehavior = "ListenIfAvailable" + // DestinationPortBehaviorNone ... + DestinationPortBehaviorNone DestinationPortBehavior = "None" +) + +// PossibleDestinationPortBehaviorValues returns an array of possible values for the DestinationPortBehavior const type. +func PossibleDestinationPortBehaviorValues() []DestinationPortBehavior { + return []DestinationPortBehavior{DestinationPortBehaviorListenIfAvailable, DestinationPortBehaviorNone} +} + +// DhGroup enumerates the values for dh group. +type DhGroup string + +const ( + // DhGroupDHGroup1 ... + DhGroupDHGroup1 DhGroup = "DHGroup1" + // DhGroupDHGroup14 ... + DhGroupDHGroup14 DhGroup = "DHGroup14" + // DhGroupDHGroup2 ... + DhGroupDHGroup2 DhGroup = "DHGroup2" + // DhGroupDHGroup2048 ... + DhGroupDHGroup2048 DhGroup = "DHGroup2048" + // DhGroupDHGroup24 ... + DhGroupDHGroup24 DhGroup = "DHGroup24" + // DhGroupECP256 ... + DhGroupECP256 DhGroup = "ECP256" + // DhGroupECP384 ... + DhGroupECP384 DhGroup = "ECP384" + // DhGroupNone ... + DhGroupNone DhGroup = "None" +) + +// PossibleDhGroupValues returns an array of possible values for the DhGroup const type. +func PossibleDhGroupValues() []DhGroup { + return []DhGroup{DhGroupDHGroup1, DhGroupDHGroup14, DhGroupDHGroup2, DhGroupDHGroup2048, DhGroupDHGroup24, DhGroupECP256, DhGroupECP384, DhGroupNone} +} + +// Direction enumerates the values for direction. +type Direction string + +const ( + // DirectionInbound ... + DirectionInbound Direction = "Inbound" + // DirectionOutbound ... + DirectionOutbound Direction = "Outbound" +) + +// PossibleDirectionValues returns an array of possible values for the Direction const type. +func PossibleDirectionValues() []Direction { + return []Direction{DirectionInbound, DirectionOutbound} +} + +// EffectiveRouteSource enumerates the values for effective route source. +type EffectiveRouteSource string + +const ( + // EffectiveRouteSourceDefault ... + EffectiveRouteSourceDefault EffectiveRouteSource = "Default" + // EffectiveRouteSourceUnknown ... + EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" + // EffectiveRouteSourceUser ... + EffectiveRouteSourceUser EffectiveRouteSource = "User" + // EffectiveRouteSourceVirtualNetworkGateway ... + EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" +) + +// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type. +func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { + return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway} +} + +// EffectiveRouteState enumerates the values for effective route state. +type EffectiveRouteState string + +const ( + // EffectiveRouteStateActive ... + EffectiveRouteStateActive EffectiveRouteState = "Active" + // EffectiveRouteStateInvalid ... + EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" +) + +// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. +func PossibleEffectiveRouteStateValues() []EffectiveRouteState { + return []EffectiveRouteState{EffectiveRouteStateActive, EffectiveRouteStateInvalid} +} + +// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. +type EffectiveSecurityRuleProtocol string + +const ( + // EffectiveSecurityRuleProtocolAll ... + EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" + // EffectiveSecurityRuleProtocolTCP ... + EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp" + // EffectiveSecurityRuleProtocolUDP ... + EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp" +) + +// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type. +func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { + return []EffectiveSecurityRuleProtocol{EffectiveSecurityRuleProtocolAll, EffectiveSecurityRuleProtocolTCP, EffectiveSecurityRuleProtocolUDP} +} + +// EndpointType enumerates the values for endpoint type. +type EndpointType string + +const ( + // EndpointTypeAzureSubnet ... + EndpointTypeAzureSubnet EndpointType = "AzureSubnet" + // EndpointTypeAzureVM ... + EndpointTypeAzureVM EndpointType = "AzureVM" + // EndpointTypeAzureVNet ... + EndpointTypeAzureVNet EndpointType = "AzureVNet" + // EndpointTypeExternalAddress ... + EndpointTypeExternalAddress EndpointType = "ExternalAddress" + // EndpointTypeMMAWorkspaceMachine ... + EndpointTypeMMAWorkspaceMachine EndpointType = "MMAWorkspaceMachine" + // EndpointTypeMMAWorkspaceNetwork ... + EndpointTypeMMAWorkspaceNetwork EndpointType = "MMAWorkspaceNetwork" +) + +// PossibleEndpointTypeValues returns an array of possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{EndpointTypeAzureSubnet, EndpointTypeAzureVM, EndpointTypeAzureVNet, EndpointTypeExternalAddress, EndpointTypeMMAWorkspaceMachine, EndpointTypeMMAWorkspaceNetwork} +} + +// EvaluationState enumerates the values for evaluation state. +type EvaluationState string + +const ( + // EvaluationStateCompleted ... + EvaluationStateCompleted EvaluationState = "Completed" + // EvaluationStateInProgress ... + EvaluationStateInProgress EvaluationState = "InProgress" + // EvaluationStateNotStarted ... + EvaluationStateNotStarted EvaluationState = "NotStarted" +) + +// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type. +func PossibleEvaluationStateValues() []EvaluationState { + return []EvaluationState{EvaluationStateCompleted, EvaluationStateInProgress, EvaluationStateNotStarted} +} + +// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit +// peering advertised public prefix state. +type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string + +const ( + // ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ... + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" + // ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ... + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" + // ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ... + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" + // ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ... + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" +) + +// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. +func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { + return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded} +} + +// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state. +type ExpressRouteCircuitPeeringState string + +const ( + // ExpressRouteCircuitPeeringStateDisabled ... + ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" + // ExpressRouteCircuitPeeringStateEnabled ... + ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" +) + +// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type. +func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { + return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled} +} + +// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family. +type ExpressRouteCircuitSkuFamily string + +const ( + // ExpressRouteCircuitSkuFamilyMeteredData ... + ExpressRouteCircuitSkuFamilyMeteredData ExpressRouteCircuitSkuFamily = "MeteredData" + // ExpressRouteCircuitSkuFamilyUnlimitedData ... + ExpressRouteCircuitSkuFamilyUnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" +) + +// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type. +func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily { + return []ExpressRouteCircuitSkuFamily{ExpressRouteCircuitSkuFamilyMeteredData, ExpressRouteCircuitSkuFamilyUnlimitedData} +} + +// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier. +type ExpressRouteCircuitSkuTier string + +const ( + // ExpressRouteCircuitSkuTierBasic ... + ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic" + // ExpressRouteCircuitSkuTierLocal ... + ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local" + // ExpressRouteCircuitSkuTierPremium ... + ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" + // ExpressRouteCircuitSkuTierStandard ... + ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" +) + +// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. +func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { + return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierLocal, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} +} + +// ExpressRouteLinkAdminState enumerates the values for express route link admin state. +type ExpressRouteLinkAdminState string + +const ( + // ExpressRouteLinkAdminStateDisabled ... + ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" + // ExpressRouteLinkAdminStateEnabled ... + ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" +) + +// PossibleExpressRouteLinkAdminStateValues returns an array of possible values for the ExpressRouteLinkAdminState const type. +func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState { + return []ExpressRouteLinkAdminState{ExpressRouteLinkAdminStateDisabled, ExpressRouteLinkAdminStateEnabled} +} + +// ExpressRouteLinkConnectorType enumerates the values for express route link connector type. +type ExpressRouteLinkConnectorType string + +const ( + // ExpressRouteLinkConnectorTypeLC ... + ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" + // ExpressRouteLinkConnectorTypeSC ... + ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" +) + +// PossibleExpressRouteLinkConnectorTypeValues returns an array of possible values for the ExpressRouteLinkConnectorType const type. +func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType { + return []ExpressRouteLinkConnectorType{ExpressRouteLinkConnectorTypeLC, ExpressRouteLinkConnectorTypeSC} +} + +// ExpressRouteLinkMacSecCipher enumerates the values for express route link mac sec cipher. +type ExpressRouteLinkMacSecCipher string + +const ( + // ExpressRouteLinkMacSecCipherGcmAes128 ... + ExpressRouteLinkMacSecCipherGcmAes128 ExpressRouteLinkMacSecCipher = "GcmAes128" + // ExpressRouteLinkMacSecCipherGcmAes256 ... + ExpressRouteLinkMacSecCipherGcmAes256 ExpressRouteLinkMacSecCipher = "GcmAes256" + // ExpressRouteLinkMacSecCipherGcmAesXpn128 ... + ExpressRouteLinkMacSecCipherGcmAesXpn128 ExpressRouteLinkMacSecCipher = "GcmAesXpn128" + // ExpressRouteLinkMacSecCipherGcmAesXpn256 ... + ExpressRouteLinkMacSecCipherGcmAesXpn256 ExpressRouteLinkMacSecCipher = "GcmAesXpn256" +) + +// PossibleExpressRouteLinkMacSecCipherValues returns an array of possible values for the ExpressRouteLinkMacSecCipher const type. +func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher { + return []ExpressRouteLinkMacSecCipher{ExpressRouteLinkMacSecCipherGcmAes128, ExpressRouteLinkMacSecCipherGcmAes256, ExpressRouteLinkMacSecCipherGcmAesXpn128, ExpressRouteLinkMacSecCipherGcmAesXpn256} +} + +// ExpressRouteLinkMacSecSciState enumerates the values for express route link mac sec sci state. +type ExpressRouteLinkMacSecSciState string + +const ( + // ExpressRouteLinkMacSecSciStateDisabled ... + ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" + // ExpressRouteLinkMacSecSciStateEnabled ... + ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" +) + +// PossibleExpressRouteLinkMacSecSciStateValues returns an array of possible values for the ExpressRouteLinkMacSecSciState const type. +func PossibleExpressRouteLinkMacSecSciStateValues() []ExpressRouteLinkMacSecSciState { + return []ExpressRouteLinkMacSecSciState{ExpressRouteLinkMacSecSciStateDisabled, ExpressRouteLinkMacSecSciStateEnabled} +} + +// ExpressRoutePeeringState enumerates the values for express route peering state. +type ExpressRoutePeeringState string + +const ( + // ExpressRoutePeeringStateDisabled ... + ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" + // ExpressRoutePeeringStateEnabled ... + ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" +) + +// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type. +func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { + return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled} +} + +// ExpressRoutePeeringType enumerates the values for express route peering type. +type ExpressRoutePeeringType string + +const ( + // ExpressRoutePeeringTypeAzurePrivatePeering ... + ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" + // ExpressRoutePeeringTypeAzurePublicPeering ... + ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" + // ExpressRoutePeeringTypeMicrosoftPeering ... + ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" +) + +// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type. +func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { + return []ExpressRoutePeeringType{ExpressRoutePeeringTypeAzurePrivatePeering, ExpressRoutePeeringTypeAzurePublicPeering, ExpressRoutePeeringTypeMicrosoftPeering} +} + +// ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation. +type ExpressRoutePortsEncapsulation string + +const ( + // ExpressRoutePortsEncapsulationDot1Q ... + ExpressRoutePortsEncapsulationDot1Q ExpressRoutePortsEncapsulation = "Dot1Q" + // ExpressRoutePortsEncapsulationQinQ ... + ExpressRoutePortsEncapsulationQinQ ExpressRoutePortsEncapsulation = "QinQ" +) + +// PossibleExpressRoutePortsEncapsulationValues returns an array of possible values for the ExpressRoutePortsEncapsulation const type. +func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation { + return []ExpressRoutePortsEncapsulation{ExpressRoutePortsEncapsulationDot1Q, ExpressRoutePortsEncapsulationQinQ} +} + +// ExtendedLocationTypes enumerates the values for extended location types. +type ExtendedLocationTypes string + +const ( + // ExtendedLocationTypesEdgeZone ... + ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone" +) + +// PossibleExtendedLocationTypesValues returns an array of possible values for the ExtendedLocationTypes const type. +func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { + return []ExtendedLocationTypes{ExtendedLocationTypesEdgeZone} +} + +// FirewallPolicyFilterRuleCollectionActionType enumerates the values for firewall policy filter rule +// collection action type. +type FirewallPolicyFilterRuleCollectionActionType string + +const ( + // FirewallPolicyFilterRuleCollectionActionTypeAllow ... + FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" + // FirewallPolicyFilterRuleCollectionActionTypeDeny ... + FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" +) + +// PossibleFirewallPolicyFilterRuleCollectionActionTypeValues returns an array of possible values for the FirewallPolicyFilterRuleCollectionActionType const type. +func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPolicyFilterRuleCollectionActionType { + return []FirewallPolicyFilterRuleCollectionActionType{FirewallPolicyFilterRuleCollectionActionTypeAllow, FirewallPolicyFilterRuleCollectionActionTypeDeny} +} + +// FirewallPolicyIntrusionDetectionProtocol enumerates the values for firewall policy intrusion detection +// protocol. +type FirewallPolicyIntrusionDetectionProtocol string + +const ( + // FirewallPolicyIntrusionDetectionProtocolANY ... + FirewallPolicyIntrusionDetectionProtocolANY FirewallPolicyIntrusionDetectionProtocol = "ANY" + // FirewallPolicyIntrusionDetectionProtocolICMP ... + FirewallPolicyIntrusionDetectionProtocolICMP FirewallPolicyIntrusionDetectionProtocol = "ICMP" + // FirewallPolicyIntrusionDetectionProtocolTCP ... + FirewallPolicyIntrusionDetectionProtocolTCP FirewallPolicyIntrusionDetectionProtocol = "TCP" + // FirewallPolicyIntrusionDetectionProtocolUDP ... + FirewallPolicyIntrusionDetectionProtocolUDP FirewallPolicyIntrusionDetectionProtocol = "UDP" +) + +// PossibleFirewallPolicyIntrusionDetectionProtocolValues returns an array of possible values for the FirewallPolicyIntrusionDetectionProtocol const type. +func PossibleFirewallPolicyIntrusionDetectionProtocolValues() []FirewallPolicyIntrusionDetectionProtocol { + return []FirewallPolicyIntrusionDetectionProtocol{FirewallPolicyIntrusionDetectionProtocolANY, FirewallPolicyIntrusionDetectionProtocolICMP, FirewallPolicyIntrusionDetectionProtocolTCP, FirewallPolicyIntrusionDetectionProtocolUDP} +} + +// FirewallPolicyIntrusionDetectionStateType enumerates the values for firewall policy intrusion detection +// state type. +type FirewallPolicyIntrusionDetectionStateType string + +const ( + // FirewallPolicyIntrusionDetectionStateTypeAlert ... + FirewallPolicyIntrusionDetectionStateTypeAlert FirewallPolicyIntrusionDetectionStateType = "Alert" + // FirewallPolicyIntrusionDetectionStateTypeDeny ... + FirewallPolicyIntrusionDetectionStateTypeDeny FirewallPolicyIntrusionDetectionStateType = "Deny" + // FirewallPolicyIntrusionDetectionStateTypeOff ... + FirewallPolicyIntrusionDetectionStateTypeOff FirewallPolicyIntrusionDetectionStateType = "Off" +) + +// PossibleFirewallPolicyIntrusionDetectionStateTypeValues returns an array of possible values for the FirewallPolicyIntrusionDetectionStateType const type. +func PossibleFirewallPolicyIntrusionDetectionStateTypeValues() []FirewallPolicyIntrusionDetectionStateType { + return []FirewallPolicyIntrusionDetectionStateType{FirewallPolicyIntrusionDetectionStateTypeAlert, FirewallPolicyIntrusionDetectionStateTypeDeny, FirewallPolicyIntrusionDetectionStateTypeOff} +} + +// FirewallPolicyNatRuleCollectionActionType enumerates the values for firewall policy nat rule collection +// action type. +type FirewallPolicyNatRuleCollectionActionType string + +const ( + // FirewallPolicyNatRuleCollectionActionTypeDNAT ... + FirewallPolicyNatRuleCollectionActionTypeDNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" +) + +// PossibleFirewallPolicyNatRuleCollectionActionTypeValues returns an array of possible values for the FirewallPolicyNatRuleCollectionActionType const type. +func PossibleFirewallPolicyNatRuleCollectionActionTypeValues() []FirewallPolicyNatRuleCollectionActionType { + return []FirewallPolicyNatRuleCollectionActionType{FirewallPolicyNatRuleCollectionActionTypeDNAT} +} + +// FirewallPolicyRuleApplicationProtocolType enumerates the values for firewall policy rule application +// protocol type. +type FirewallPolicyRuleApplicationProtocolType string + +const ( + // FirewallPolicyRuleApplicationProtocolTypeHTTP ... + FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" + // FirewallPolicyRuleApplicationProtocolTypeHTTPS ... + FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" +) + +// PossibleFirewallPolicyRuleApplicationProtocolTypeValues returns an array of possible values for the FirewallPolicyRuleApplicationProtocolType const type. +func PossibleFirewallPolicyRuleApplicationProtocolTypeValues() []FirewallPolicyRuleApplicationProtocolType { + return []FirewallPolicyRuleApplicationProtocolType{FirewallPolicyRuleApplicationProtocolTypeHTTP, FirewallPolicyRuleApplicationProtocolTypeHTTPS} +} + +// FirewallPolicyRuleNetworkProtocol enumerates the values for firewall policy rule network protocol. +type FirewallPolicyRuleNetworkProtocol string + +const ( + // FirewallPolicyRuleNetworkProtocolAny ... + FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" + // FirewallPolicyRuleNetworkProtocolICMP ... + FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" + // FirewallPolicyRuleNetworkProtocolTCP ... + FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" + // FirewallPolicyRuleNetworkProtocolUDP ... + FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" +) + +// PossibleFirewallPolicyRuleNetworkProtocolValues returns an array of possible values for the FirewallPolicyRuleNetworkProtocol const type. +func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetworkProtocol { + return []FirewallPolicyRuleNetworkProtocol{FirewallPolicyRuleNetworkProtocolAny, FirewallPolicyRuleNetworkProtocolICMP, FirewallPolicyRuleNetworkProtocolTCP, FirewallPolicyRuleNetworkProtocolUDP} +} + +// FirewallPolicySkuTier enumerates the values for firewall policy sku tier. +type FirewallPolicySkuTier string + +const ( + // FirewallPolicySkuTierPremium ... + FirewallPolicySkuTierPremium FirewallPolicySkuTier = "Premium" + // FirewallPolicySkuTierStandard ... + FirewallPolicySkuTierStandard FirewallPolicySkuTier = "Standard" +) + +// PossibleFirewallPolicySkuTierValues returns an array of possible values for the FirewallPolicySkuTier const type. +func PossibleFirewallPolicySkuTierValues() []FirewallPolicySkuTier { + return []FirewallPolicySkuTier{FirewallPolicySkuTierPremium, FirewallPolicySkuTierStandard} +} + +// FlowLogFormatType enumerates the values for flow log format type. +type FlowLogFormatType string + +const ( + // FlowLogFormatTypeJSON ... + FlowLogFormatTypeJSON FlowLogFormatType = "JSON" +) + +// PossibleFlowLogFormatTypeValues returns an array of possible values for the FlowLogFormatType const type. +func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { + return []FlowLogFormatType{FlowLogFormatTypeJSON} +} + +// GatewayLoadBalancerTunnelInterfaceType enumerates the values for gateway load balancer tunnel interface +// type. +type GatewayLoadBalancerTunnelInterfaceType string + +const ( + // GatewayLoadBalancerTunnelInterfaceTypeExternal ... + GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" + // GatewayLoadBalancerTunnelInterfaceTypeInternal ... + GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" + // GatewayLoadBalancerTunnelInterfaceTypeNone ... + GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" +) + +// PossibleGatewayLoadBalancerTunnelInterfaceTypeValues returns an array of possible values for the GatewayLoadBalancerTunnelInterfaceType const type. +func PossibleGatewayLoadBalancerTunnelInterfaceTypeValues() []GatewayLoadBalancerTunnelInterfaceType { + return []GatewayLoadBalancerTunnelInterfaceType{GatewayLoadBalancerTunnelInterfaceTypeExternal, GatewayLoadBalancerTunnelInterfaceTypeInternal, GatewayLoadBalancerTunnelInterfaceTypeNone} +} + +// GatewayLoadBalancerTunnelProtocol enumerates the values for gateway load balancer tunnel protocol. +type GatewayLoadBalancerTunnelProtocol string + +const ( + // GatewayLoadBalancerTunnelProtocolNative ... + GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" + // GatewayLoadBalancerTunnelProtocolNone ... + GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" + // GatewayLoadBalancerTunnelProtocolVXLAN ... + GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" +) + +// PossibleGatewayLoadBalancerTunnelProtocolValues returns an array of possible values for the GatewayLoadBalancerTunnelProtocol const type. +func PossibleGatewayLoadBalancerTunnelProtocolValues() []GatewayLoadBalancerTunnelProtocol { + return []GatewayLoadBalancerTunnelProtocol{GatewayLoadBalancerTunnelProtocolNative, GatewayLoadBalancerTunnelProtocolNone, GatewayLoadBalancerTunnelProtocolVXLAN} +} + +// HTTPConfigurationMethod enumerates the values for http configuration method. +type HTTPConfigurationMethod string + +const ( + // HTTPConfigurationMethodGet ... + HTTPConfigurationMethodGet HTTPConfigurationMethod = "Get" + // HTTPConfigurationMethodPost ... + HTTPConfigurationMethodPost HTTPConfigurationMethod = "Post" +) + +// PossibleHTTPConfigurationMethodValues returns an array of possible values for the HTTPConfigurationMethod const type. +func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { + return []HTTPConfigurationMethod{HTTPConfigurationMethodGet, HTTPConfigurationMethodPost} +} + +// HTTPMethod enumerates the values for http method. +type HTTPMethod string + +const ( + // HTTPMethodGet ... + HTTPMethodGet HTTPMethod = "Get" +) + +// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type. +func PossibleHTTPMethodValues() []HTTPMethod { + return []HTTPMethod{HTTPMethodGet} +} + +// HubBgpConnectionStatus enumerates the values for hub bgp connection status. +type HubBgpConnectionStatus string + +const ( + // HubBgpConnectionStatusConnected ... + HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" + // HubBgpConnectionStatusConnecting ... + HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" + // HubBgpConnectionStatusNotConnected ... + HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" + // HubBgpConnectionStatusUnknown ... + HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" +) + +// PossibleHubBgpConnectionStatusValues returns an array of possible values for the HubBgpConnectionStatus const type. +func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { + return []HubBgpConnectionStatus{HubBgpConnectionStatusConnected, HubBgpConnectionStatusConnecting, HubBgpConnectionStatusNotConnected, HubBgpConnectionStatusUnknown} +} + +// HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status. +type HubVirtualNetworkConnectionStatus string + +const ( + // HubVirtualNetworkConnectionStatusConnected ... + HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected" + // HubVirtualNetworkConnectionStatusConnecting ... + HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting" + // HubVirtualNetworkConnectionStatusNotConnected ... + HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected" + // HubVirtualNetworkConnectionStatusUnknown ... + HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown" +) + +// PossibleHubVirtualNetworkConnectionStatusValues returns an array of possible values for the HubVirtualNetworkConnectionStatus const type. +func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus { + return []HubVirtualNetworkConnectionStatus{HubVirtualNetworkConnectionStatusConnected, HubVirtualNetworkConnectionStatusConnecting, HubVirtualNetworkConnectionStatusNotConnected, HubVirtualNetworkConnectionStatusUnknown} +} + +// IkeEncryption enumerates the values for ike encryption. +type IkeEncryption string + +const ( + // IkeEncryptionAES128 ... + IkeEncryptionAES128 IkeEncryption = "AES128" + // IkeEncryptionAES192 ... + IkeEncryptionAES192 IkeEncryption = "AES192" + // IkeEncryptionAES256 ... + IkeEncryptionAES256 IkeEncryption = "AES256" + // IkeEncryptionDES ... + IkeEncryptionDES IkeEncryption = "DES" + // IkeEncryptionDES3 ... + IkeEncryptionDES3 IkeEncryption = "DES3" + // IkeEncryptionGCMAES128 ... + IkeEncryptionGCMAES128 IkeEncryption = "GCMAES128" + // IkeEncryptionGCMAES256 ... + IkeEncryptionGCMAES256 IkeEncryption = "GCMAES256" +) + +// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type. +func PossibleIkeEncryptionValues() []IkeEncryption { + return []IkeEncryption{IkeEncryptionAES128, IkeEncryptionAES192, IkeEncryptionAES256, IkeEncryptionDES, IkeEncryptionDES3, IkeEncryptionGCMAES128, IkeEncryptionGCMAES256} +} + +// IkeIntegrity enumerates the values for ike integrity. +type IkeIntegrity string + +const ( + // IkeIntegrityGCMAES128 ... + IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128" + // IkeIntegrityGCMAES256 ... + IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256" + // IkeIntegrityMD5 ... + IkeIntegrityMD5 IkeIntegrity = "MD5" + // IkeIntegritySHA1 ... + IkeIntegritySHA1 IkeIntegrity = "SHA1" + // IkeIntegritySHA256 ... + IkeIntegritySHA256 IkeIntegrity = "SHA256" + // IkeIntegritySHA384 ... + IkeIntegritySHA384 IkeIntegrity = "SHA384" +) + +// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type. +func PossibleIkeIntegrityValues() []IkeIntegrity { + return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384} +} + +// InboundSecurityRulesProtocol enumerates the values for inbound security rules protocol. +type InboundSecurityRulesProtocol string + +const ( + // InboundSecurityRulesProtocolTCP ... + InboundSecurityRulesProtocolTCP InboundSecurityRulesProtocol = "TCP" + // InboundSecurityRulesProtocolUDP ... + InboundSecurityRulesProtocolUDP InboundSecurityRulesProtocol = "UDP" +) + +// PossibleInboundSecurityRulesProtocolValues returns an array of possible values for the InboundSecurityRulesProtocol const type. +func PossibleInboundSecurityRulesProtocolValues() []InboundSecurityRulesProtocol { + return []InboundSecurityRulesProtocol{InboundSecurityRulesProtocolTCP, InboundSecurityRulesProtocolUDP} +} + +// InterfaceMigrationPhase enumerates the values for interface migration phase. +type InterfaceMigrationPhase string + +const ( + // InterfaceMigrationPhaseAbort ... + InterfaceMigrationPhaseAbort InterfaceMigrationPhase = "Abort" + // InterfaceMigrationPhaseCommit ... + InterfaceMigrationPhaseCommit InterfaceMigrationPhase = "Commit" + // InterfaceMigrationPhaseCommitted ... + InterfaceMigrationPhaseCommitted InterfaceMigrationPhase = "Committed" + // InterfaceMigrationPhaseNone ... + InterfaceMigrationPhaseNone InterfaceMigrationPhase = "None" + // InterfaceMigrationPhasePrepare ... + InterfaceMigrationPhasePrepare InterfaceMigrationPhase = "Prepare" +) + +// PossibleInterfaceMigrationPhaseValues returns an array of possible values for the InterfaceMigrationPhase const type. +func PossibleInterfaceMigrationPhaseValues() []InterfaceMigrationPhase { + return []InterfaceMigrationPhase{InterfaceMigrationPhaseAbort, InterfaceMigrationPhaseCommit, InterfaceMigrationPhaseCommitted, InterfaceMigrationPhaseNone, InterfaceMigrationPhasePrepare} +} + +// InterfaceNicType enumerates the values for interface nic type. +type InterfaceNicType string + +const ( + // InterfaceNicTypeElastic ... + InterfaceNicTypeElastic InterfaceNicType = "Elastic" + // InterfaceNicTypeStandard ... + InterfaceNicTypeStandard InterfaceNicType = "Standard" +) + +// PossibleInterfaceNicTypeValues returns an array of possible values for the InterfaceNicType const type. +func PossibleInterfaceNicTypeValues() []InterfaceNicType { + return []InterfaceNicType{InterfaceNicTypeElastic, InterfaceNicTypeStandard} +} + +// IPAllocationMethod enumerates the values for ip allocation method. +type IPAllocationMethod string + +const ( + // IPAllocationMethodDynamic ... + IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" + // IPAllocationMethodStatic ... + IPAllocationMethodStatic IPAllocationMethod = "Static" +) + +// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type. +func PossibleIPAllocationMethodValues() []IPAllocationMethod { + return []IPAllocationMethod{IPAllocationMethodDynamic, IPAllocationMethodStatic} +} + +// IPAllocationType enumerates the values for ip allocation type. +type IPAllocationType string + +const ( + // IPAllocationTypeHypernet ... + IPAllocationTypeHypernet IPAllocationType = "Hypernet" + // IPAllocationTypeUndefined ... + IPAllocationTypeUndefined IPAllocationType = "Undefined" +) + +// PossibleIPAllocationTypeValues returns an array of possible values for the IPAllocationType const type. +func PossibleIPAllocationTypeValues() []IPAllocationType { + return []IPAllocationType{IPAllocationTypeHypernet, IPAllocationTypeUndefined} +} + +// IPFlowProtocol enumerates the values for ip flow protocol. +type IPFlowProtocol string + +const ( + // IPFlowProtocolTCP ... + IPFlowProtocolTCP IPFlowProtocol = "TCP" + // IPFlowProtocolUDP ... + IPFlowProtocolUDP IPFlowProtocol = "UDP" +) + +// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type. +func PossibleIPFlowProtocolValues() []IPFlowProtocol { + return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP} +} + +// IpsecEncryption enumerates the values for ipsec encryption. +type IpsecEncryption string + +const ( + // IpsecEncryptionAES128 ... + IpsecEncryptionAES128 IpsecEncryption = "AES128" + // IpsecEncryptionAES192 ... + IpsecEncryptionAES192 IpsecEncryption = "AES192" + // IpsecEncryptionAES256 ... + IpsecEncryptionAES256 IpsecEncryption = "AES256" + // IpsecEncryptionDES ... + IpsecEncryptionDES IpsecEncryption = "DES" + // IpsecEncryptionDES3 ... + IpsecEncryptionDES3 IpsecEncryption = "DES3" + // IpsecEncryptionGCMAES128 ... + IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128" + // IpsecEncryptionGCMAES192 ... + IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192" + // IpsecEncryptionGCMAES256 ... + IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256" + // IpsecEncryptionNone ... + IpsecEncryptionNone IpsecEncryption = "None" +) + +// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type. +func PossibleIpsecEncryptionValues() []IpsecEncryption { + return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone} +} + +// IpsecIntegrity enumerates the values for ipsec integrity. +type IpsecIntegrity string + +const ( + // IpsecIntegrityGCMAES128 ... + IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128" + // IpsecIntegrityGCMAES192 ... + IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192" + // IpsecIntegrityGCMAES256 ... + IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256" + // IpsecIntegrityMD5 ... + IpsecIntegrityMD5 IpsecIntegrity = "MD5" + // IpsecIntegritySHA1 ... + IpsecIntegritySHA1 IpsecIntegrity = "SHA1" + // IpsecIntegritySHA256 ... + IpsecIntegritySHA256 IpsecIntegrity = "SHA256" +) + +// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type. +func PossibleIpsecIntegrityValues() []IpsecIntegrity { + return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256} +} + +// IPVersion enumerates the values for ip version. +type IPVersion string + +const ( + // IPVersionIPv4 ... + IPVersionIPv4 IPVersion = "IPv4" + // IPVersionIPv6 ... + IPVersionIPv6 IPVersion = "IPv6" +) + +// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. +func PossibleIPVersionValues() []IPVersion { + return []IPVersion{IPVersionIPv4, IPVersionIPv6} +} + +// IssueType enumerates the values for issue type. +type IssueType string + +const ( + // IssueTypeAgentStopped ... + IssueTypeAgentStopped IssueType = "AgentStopped" + // IssueTypeDNSResolution ... + IssueTypeDNSResolution IssueType = "DnsResolution" + // IssueTypeGuestFirewall ... + IssueTypeGuestFirewall IssueType = "GuestFirewall" + // IssueTypeNetworkSecurityRule ... + IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" + // IssueTypePlatform ... + IssueTypePlatform IssueType = "Platform" + // IssueTypePortThrottled ... + IssueTypePortThrottled IssueType = "PortThrottled" + // IssueTypeSocketBind ... + IssueTypeSocketBind IssueType = "SocketBind" + // IssueTypeUnknown ... + IssueTypeUnknown IssueType = "Unknown" + // IssueTypeUserDefinedRoute ... + IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" +) + +// PossibleIssueTypeValues returns an array of possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} +} + +// LoadBalancerOutboundRuleProtocol enumerates the values for load balancer outbound rule protocol. +type LoadBalancerOutboundRuleProtocol string + +const ( + // LoadBalancerOutboundRuleProtocolAll ... + LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" + // LoadBalancerOutboundRuleProtocolTCP ... + LoadBalancerOutboundRuleProtocolTCP LoadBalancerOutboundRuleProtocol = "Tcp" + // LoadBalancerOutboundRuleProtocolUDP ... + LoadBalancerOutboundRuleProtocolUDP LoadBalancerOutboundRuleProtocol = "Udp" +) + +// PossibleLoadBalancerOutboundRuleProtocolValues returns an array of possible values for the LoadBalancerOutboundRuleProtocol const type. +func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRuleProtocol { + return []LoadBalancerOutboundRuleProtocol{LoadBalancerOutboundRuleProtocolAll, LoadBalancerOutboundRuleProtocolTCP, LoadBalancerOutboundRuleProtocolUDP} +} + +// LoadBalancerSkuName enumerates the values for load balancer sku name. +type LoadBalancerSkuName string + +const ( + // LoadBalancerSkuNameBasic ... + LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" + // LoadBalancerSkuNameGateway ... + LoadBalancerSkuNameGateway LoadBalancerSkuName = "Gateway" + // LoadBalancerSkuNameStandard ... + LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" +) + +// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. +func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { + return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameGateway, LoadBalancerSkuNameStandard} +} + +// LoadBalancerSkuTier enumerates the values for load balancer sku tier. +type LoadBalancerSkuTier string + +const ( + // LoadBalancerSkuTierGlobal ... + LoadBalancerSkuTierGlobal LoadBalancerSkuTier = "Global" + // LoadBalancerSkuTierRegional ... + LoadBalancerSkuTierRegional LoadBalancerSkuTier = "Regional" +) + +// PossibleLoadBalancerSkuTierValues returns an array of possible values for the LoadBalancerSkuTier const type. +func PossibleLoadBalancerSkuTierValues() []LoadBalancerSkuTier { + return []LoadBalancerSkuTier{LoadBalancerSkuTierGlobal, LoadBalancerSkuTierRegional} +} + +// LoadDistribution enumerates the values for load distribution. +type LoadDistribution string + +const ( + // LoadDistributionDefault ... + LoadDistributionDefault LoadDistribution = "Default" + // LoadDistributionSourceIP ... + LoadDistributionSourceIP LoadDistribution = "SourceIP" + // LoadDistributionSourceIPProtocol ... + LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" +) + +// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type. +func PossibleLoadDistributionValues() []LoadDistribution { + return []LoadDistribution{LoadDistributionDefault, LoadDistributionSourceIP, LoadDistributionSourceIPProtocol} +} + +// ManagedRuleEnabledState enumerates the values for managed rule enabled state. +type ManagedRuleEnabledState string + +const ( + // ManagedRuleEnabledStateDisabled ... + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" +) + +// PossibleManagedRuleEnabledStateValues returns an array of possible values for the ManagedRuleEnabledState const type. +func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { + return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled} +} + +// NatGatewaySkuName enumerates the values for nat gateway sku name. +type NatGatewaySkuName string + +const ( + // NatGatewaySkuNameStandard ... + NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" +) + +// PossibleNatGatewaySkuNameValues returns an array of possible values for the NatGatewaySkuName const type. +func PossibleNatGatewaySkuNameValues() []NatGatewaySkuName { + return []NatGatewaySkuName{NatGatewaySkuNameStandard} +} + +// NextHopType enumerates the values for next hop type. +type NextHopType string + +const ( + // NextHopTypeHyperNetGateway ... + NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" + // NextHopTypeInternet ... + NextHopTypeInternet NextHopType = "Internet" + // NextHopTypeNone ... + NextHopTypeNone NextHopType = "None" + // NextHopTypeVirtualAppliance ... + NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" + // NextHopTypeVirtualNetworkGateway ... + NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" + // NextHopTypeVnetLocal ... + NextHopTypeVnetLocal NextHopType = "VnetLocal" +) + +// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type. +func PossibleNextHopTypeValues() []NextHopType { + return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal} +} + +// OfficeTrafficCategory enumerates the values for office traffic category. +type OfficeTrafficCategory string + +const ( + // OfficeTrafficCategoryAll ... + OfficeTrafficCategoryAll OfficeTrafficCategory = "All" + // OfficeTrafficCategoryNone ... + OfficeTrafficCategoryNone OfficeTrafficCategory = "None" + // OfficeTrafficCategoryOptimize ... + OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" + // OfficeTrafficCategoryOptimizeAndAllow ... + OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" +) + +// PossibleOfficeTrafficCategoryValues returns an array of possible values for the OfficeTrafficCategory const type. +func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory { + return []OfficeTrafficCategory{OfficeTrafficCategoryAll, OfficeTrafficCategoryNone, OfficeTrafficCategoryOptimize, OfficeTrafficCategoryOptimizeAndAllow} +} + +// OperationStatus enumerates the values for operation status. +type OperationStatus string + +const ( + // OperationStatusFailed ... + OperationStatusFailed OperationStatus = "Failed" + // OperationStatusInProgress ... + OperationStatusInProgress OperationStatus = "InProgress" + // OperationStatusSucceeded ... + OperationStatusSucceeded OperationStatus = "Succeeded" +) + +// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. +func PossibleOperationStatusValues() []OperationStatus { + return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} +} + +// Origin enumerates the values for origin. +type Origin string + +const ( + // OriginInbound ... + OriginInbound Origin = "Inbound" + // OriginLocal ... + OriginLocal Origin = "Local" + // OriginOutbound ... + OriginOutbound Origin = "Outbound" +) + +// PossibleOriginValues returns an array of possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{OriginInbound, OriginLocal, OriginOutbound} +} + +// OutputType enumerates the values for output type. +type OutputType string + +const ( + // OutputTypeWorkspace ... + OutputTypeWorkspace OutputType = "Workspace" +) + +// PossibleOutputTypeValues returns an array of possible values for the OutputType const type. +func PossibleOutputTypeValues() []OutputType { + return []OutputType{OutputTypeWorkspace} +} + +// OwaspCrsExclusionEntryMatchVariable enumerates the values for owasp crs exclusion entry match variable. +type OwaspCrsExclusionEntryMatchVariable string + +const ( + // OwaspCrsExclusionEntryMatchVariableRequestArgNames ... + OwaspCrsExclusionEntryMatchVariableRequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" + // OwaspCrsExclusionEntryMatchVariableRequestCookieNames ... + OwaspCrsExclusionEntryMatchVariableRequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" + // OwaspCrsExclusionEntryMatchVariableRequestHeaderNames ... + OwaspCrsExclusionEntryMatchVariableRequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" +) + +// PossibleOwaspCrsExclusionEntryMatchVariableValues returns an array of possible values for the OwaspCrsExclusionEntryMatchVariable const type. +func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { + return []OwaspCrsExclusionEntryMatchVariable{OwaspCrsExclusionEntryMatchVariableRequestArgNames, OwaspCrsExclusionEntryMatchVariableRequestCookieNames, OwaspCrsExclusionEntryMatchVariableRequestHeaderNames} +} + +// OwaspCrsExclusionEntrySelectorMatchOperator enumerates the values for owasp crs exclusion entry selector +// match operator. +type OwaspCrsExclusionEntrySelectorMatchOperator string + +const ( + // OwaspCrsExclusionEntrySelectorMatchOperatorContains ... + OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" + // OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith ... + OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" + // OwaspCrsExclusionEntrySelectorMatchOperatorEquals ... + OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" + // OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny ... + OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" + // OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith ... + OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" +) + +// PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues returns an array of possible values for the OwaspCrsExclusionEntrySelectorMatchOperator const type. +func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclusionEntrySelectorMatchOperator { + return []OwaspCrsExclusionEntrySelectorMatchOperator{OwaspCrsExclusionEntrySelectorMatchOperatorContains, OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, OwaspCrsExclusionEntrySelectorMatchOperatorEquals, OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith} +} + +// PcError enumerates the values for pc error. +type PcError string + +const ( + // PcErrorAgentStopped ... + PcErrorAgentStopped PcError = "AgentStopped" + // PcErrorCaptureFailed ... + PcErrorCaptureFailed PcError = "CaptureFailed" + // PcErrorInternalError ... + PcErrorInternalError PcError = "InternalError" + // PcErrorLocalFileFailed ... + PcErrorLocalFileFailed PcError = "LocalFileFailed" + // PcErrorStorageFailed ... + PcErrorStorageFailed PcError = "StorageFailed" +) + +// PossiblePcErrorValues returns an array of possible values for the PcError const type. +func PossiblePcErrorValues() []PcError { + return []PcError{PcErrorAgentStopped, PcErrorCaptureFailed, PcErrorInternalError, PcErrorLocalFileFailed, PcErrorStorageFailed} +} + +// PcProtocol enumerates the values for pc protocol. +type PcProtocol string + +const ( + // PcProtocolAny ... + PcProtocolAny PcProtocol = "Any" + // PcProtocolTCP ... + PcProtocolTCP PcProtocol = "TCP" + // PcProtocolUDP ... + PcProtocolUDP PcProtocol = "UDP" +) + +// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type. +func PossiblePcProtocolValues() []PcProtocol { + return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP} +} + +// PcStatus enumerates the values for pc status. +type PcStatus string + +const ( + // PcStatusError ... + PcStatusError PcStatus = "Error" + // PcStatusNotStarted ... + PcStatusNotStarted PcStatus = "NotStarted" + // PcStatusRunning ... + PcStatusRunning PcStatus = "Running" + // PcStatusStopped ... + PcStatusStopped PcStatus = "Stopped" + // PcStatusUnknown ... + PcStatusUnknown PcStatus = "Unknown" +) + +// PossiblePcStatusValues returns an array of possible values for the PcStatus const type. +func PossiblePcStatusValues() []PcStatus { + return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown} +} + +// PfsGroup enumerates the values for pfs group. +type PfsGroup string + +const ( + // PfsGroupECP256 ... + PfsGroupECP256 PfsGroup = "ECP256" + // PfsGroupECP384 ... + PfsGroupECP384 PfsGroup = "ECP384" + // PfsGroupNone ... + PfsGroupNone PfsGroup = "None" + // PfsGroupPFS1 ... + PfsGroupPFS1 PfsGroup = "PFS1" + // PfsGroupPFS14 ... + PfsGroupPFS14 PfsGroup = "PFS14" + // PfsGroupPFS2 ... + PfsGroupPFS2 PfsGroup = "PFS2" + // PfsGroupPFS2048 ... + PfsGroupPFS2048 PfsGroup = "PFS2048" + // PfsGroupPFS24 ... + PfsGroupPFS24 PfsGroup = "PFS24" + // PfsGroupPFSMM ... + PfsGroupPFSMM PfsGroup = "PFSMM" +) + +// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type. +func PossiblePfsGroupValues() []PfsGroup { + return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM} +} + +// PreferredIPVersion enumerates the values for preferred ip version. +type PreferredIPVersion string + +const ( + // PreferredIPVersionIPv4 ... + PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" + // PreferredIPVersionIPv6 ... + PreferredIPVersionIPv6 PreferredIPVersion = "IPv6" +) + +// PossiblePreferredIPVersionValues returns an array of possible values for the PreferredIPVersion const type. +func PossiblePreferredIPVersionValues() []PreferredIPVersion { + return []PreferredIPVersion{PreferredIPVersionIPv4, PreferredIPVersionIPv6} +} + +// PreferredRoutingGateway enumerates the values for preferred routing gateway. +type PreferredRoutingGateway string + +const ( + // PreferredRoutingGatewayExpressRoute ... + PreferredRoutingGatewayExpressRoute PreferredRoutingGateway = "ExpressRoute" + // PreferredRoutingGatewayNone ... + PreferredRoutingGatewayNone PreferredRoutingGateway = "None" + // PreferredRoutingGatewayVpnGateway ... + PreferredRoutingGatewayVpnGateway PreferredRoutingGateway = "VpnGateway" +) + +// PossiblePreferredRoutingGatewayValues returns an array of possible values for the PreferredRoutingGateway const type. +func PossiblePreferredRoutingGatewayValues() []PreferredRoutingGateway { + return []PreferredRoutingGateway{PreferredRoutingGatewayExpressRoute, PreferredRoutingGatewayNone, PreferredRoutingGatewayVpnGateway} +} + +// ProbeProtocol enumerates the values for probe protocol. +type ProbeProtocol string + +const ( + // ProbeProtocolHTTP ... + ProbeProtocolHTTP ProbeProtocol = "Http" + // ProbeProtocolHTTPS ... + ProbeProtocolHTTPS ProbeProtocol = "Https" + // ProbeProtocolTCP ... + ProbeProtocolTCP ProbeProtocol = "Tcp" +) + +// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type. +func PossibleProbeProtocolValues() []ProbeProtocol { + return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolHTTPS, ProbeProtocolTCP} +} + +// ProcessorArchitecture enumerates the values for processor architecture. +type ProcessorArchitecture string + +const ( + // ProcessorArchitectureAmd64 ... + ProcessorArchitectureAmd64 ProcessorArchitecture = "Amd64" + // ProcessorArchitectureX86 ... + ProcessorArchitectureX86 ProcessorArchitecture = "X86" +) + +// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type. +func PossibleProcessorArchitectureValues() []ProcessorArchitecture { + return []ProcessorArchitecture{ProcessorArchitectureAmd64, ProcessorArchitectureX86} +} + +// Protocol enumerates the values for protocol. +type Protocol string + +const ( + // ProtocolHTTP ... + ProtocolHTTP Protocol = "Http" + // ProtocolHTTPS ... + ProtocolHTTPS Protocol = "Https" + // ProtocolIcmp ... + ProtocolIcmp Protocol = "Icmp" + // ProtocolTCP ... + ProtocolTCP Protocol = "Tcp" +) + +// PossibleProtocolValues returns an array of possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP} +} + +// ProtocolType enumerates the values for protocol type. +type ProtocolType string + +const ( + // ProtocolTypeAh ... + ProtocolTypeAh ProtocolType = "Ah" + // ProtocolTypeAll ... + ProtocolTypeAll ProtocolType = "All" + // ProtocolTypeDoNotUse ... + ProtocolTypeDoNotUse ProtocolType = "DoNotUse" + // ProtocolTypeEsp ... + ProtocolTypeEsp ProtocolType = "Esp" + // ProtocolTypeGre ... + ProtocolTypeGre ProtocolType = "Gre" + // ProtocolTypeIcmp ... + ProtocolTypeIcmp ProtocolType = "Icmp" + // ProtocolTypeTCP ... + ProtocolTypeTCP ProtocolType = "Tcp" + // ProtocolTypeUDP ... + ProtocolTypeUDP ProtocolType = "Udp" + // ProtocolTypeVxlan ... + ProtocolTypeVxlan ProtocolType = "Vxlan" +) + +// PossibleProtocolTypeValues returns an array of possible values for the ProtocolType const type. +func PossibleProtocolTypeValues() []ProtocolType { + return []ProtocolType{ProtocolTypeAh, ProtocolTypeAll, ProtocolTypeDoNotUse, ProtocolTypeEsp, ProtocolTypeGre, ProtocolTypeIcmp, ProtocolTypeTCP, ProtocolTypeUDP, ProtocolTypeVxlan} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateDeleting ... + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // 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{ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateSucceeded, ProvisioningStateUpdating} +} + +// PublicIPAddressMigrationPhase enumerates the values for public ip address migration phase. +type PublicIPAddressMigrationPhase string + +const ( + // PublicIPAddressMigrationPhaseAbort ... + PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" + // PublicIPAddressMigrationPhaseCommit ... + PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" + // PublicIPAddressMigrationPhaseCommitted ... + PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" + // PublicIPAddressMigrationPhaseNone ... + PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" + // PublicIPAddressMigrationPhasePrepare ... + PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" +) + +// PossiblePublicIPAddressMigrationPhaseValues returns an array of possible values for the PublicIPAddressMigrationPhase const type. +func PossiblePublicIPAddressMigrationPhaseValues() []PublicIPAddressMigrationPhase { + return []PublicIPAddressMigrationPhase{PublicIPAddressMigrationPhaseAbort, PublicIPAddressMigrationPhaseCommit, PublicIPAddressMigrationPhaseCommitted, PublicIPAddressMigrationPhaseNone, PublicIPAddressMigrationPhasePrepare} +} + +// PublicIPAddressSkuName enumerates the values for public ip address sku name. +type PublicIPAddressSkuName string + +const ( + // PublicIPAddressSkuNameBasic ... + PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" + // PublicIPAddressSkuNameStandard ... + PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" +) + +// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type. +func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { + return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard} +} + +// PublicIPAddressSkuTier enumerates the values for public ip address sku tier. +type PublicIPAddressSkuTier string + +const ( + // PublicIPAddressSkuTierGlobal ... + PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" + // PublicIPAddressSkuTierRegional ... + PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" +) + +// PossiblePublicIPAddressSkuTierValues returns an array of possible values for the PublicIPAddressSkuTier const type. +func PossiblePublicIPAddressSkuTierValues() []PublicIPAddressSkuTier { + return []PublicIPAddressSkuTier{PublicIPAddressSkuTierGlobal, PublicIPAddressSkuTierRegional} +} + +// PublicIPPrefixSkuName enumerates the values for public ip prefix sku name. +type PublicIPPrefixSkuName string + +const ( + // PublicIPPrefixSkuNameStandard ... + PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard" +) + +// PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type. +func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName { + return []PublicIPPrefixSkuName{PublicIPPrefixSkuNameStandard} +} + +// PublicIPPrefixSkuTier enumerates the values for public ip prefix sku tier. +type PublicIPPrefixSkuTier string + +const ( + // PublicIPPrefixSkuTierGlobal ... + PublicIPPrefixSkuTierGlobal PublicIPPrefixSkuTier = "Global" + // PublicIPPrefixSkuTierRegional ... + PublicIPPrefixSkuTierRegional PublicIPPrefixSkuTier = "Regional" +) + +// PossiblePublicIPPrefixSkuTierValues returns an array of possible values for the PublicIPPrefixSkuTier const type. +func PossiblePublicIPPrefixSkuTierValues() []PublicIPPrefixSkuTier { + return []PublicIPPrefixSkuTier{PublicIPPrefixSkuTierGlobal, PublicIPPrefixSkuTierRegional} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // ResourceIdentityTypeUserAssigned ... + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} +} + +// RouteNextHopType enumerates the values for route next hop type. +type RouteNextHopType string + +const ( + // RouteNextHopTypeInternet ... + RouteNextHopTypeInternet RouteNextHopType = "Internet" + // RouteNextHopTypeNone ... + RouteNextHopTypeNone RouteNextHopType = "None" + // RouteNextHopTypeVirtualAppliance ... + RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" + // RouteNextHopTypeVirtualNetworkGateway ... + RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" + // RouteNextHopTypeVnetLocal ... + RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" +) + +// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type. +func PossibleRouteNextHopTypeValues() []RouteNextHopType { + return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal} +} + +// RoutingState enumerates the values for routing state. +type RoutingState string + +const ( + // RoutingStateFailed ... + RoutingStateFailed RoutingState = "Failed" + // RoutingStateNone ... + RoutingStateNone RoutingState = "None" + // RoutingStateProvisioned ... + RoutingStateProvisioned RoutingState = "Provisioned" + // RoutingStateProvisioning ... + RoutingStateProvisioning RoutingState = "Provisioning" +) + +// PossibleRoutingStateValues returns an array of possible values for the RoutingState const type. +func PossibleRoutingStateValues() []RoutingState { + return []RoutingState{RoutingStateFailed, RoutingStateNone, RoutingStateProvisioned, RoutingStateProvisioning} +} + +// RuleCollectionType enumerates the values for rule collection type. +type RuleCollectionType string + +const ( + // RuleCollectionTypeFirewallPolicyFilterRuleCollection ... + RuleCollectionTypeFirewallPolicyFilterRuleCollection RuleCollectionType = "FirewallPolicyFilterRuleCollection" + // RuleCollectionTypeFirewallPolicyNatRuleCollection ... + RuleCollectionTypeFirewallPolicyNatRuleCollection RuleCollectionType = "FirewallPolicyNatRuleCollection" + // RuleCollectionTypeFirewallPolicyRuleCollection ... + RuleCollectionTypeFirewallPolicyRuleCollection RuleCollectionType = "FirewallPolicyRuleCollection" +) + +// PossibleRuleCollectionTypeValues returns an array of possible values for the RuleCollectionType const type. +func PossibleRuleCollectionTypeValues() []RuleCollectionType { + return []RuleCollectionType{RuleCollectionTypeFirewallPolicyFilterRuleCollection, RuleCollectionTypeFirewallPolicyNatRuleCollection, RuleCollectionTypeFirewallPolicyRuleCollection} +} + +// RuleType enumerates the values for rule type. +type RuleType string + +const ( + // RuleTypeApplicationRule ... + RuleTypeApplicationRule RuleType = "ApplicationRule" + // RuleTypeFirewallPolicyRule ... + RuleTypeFirewallPolicyRule RuleType = "FirewallPolicyRule" + // RuleTypeNatRule ... + RuleTypeNatRule RuleType = "NatRule" + // RuleTypeNetworkRule ... + RuleTypeNetworkRule RuleType = "NetworkRule" +) + +// PossibleRuleTypeValues returns an array of possible values for the RuleType const type. +func PossibleRuleTypeValues() []RuleType { + return []RuleType{RuleTypeApplicationRule, RuleTypeFirewallPolicyRule, RuleTypeNatRule, RuleTypeNetworkRule} +} + +// SecurityPartnerProviderConnectionStatus enumerates the values for security partner provider connection +// status. +type SecurityPartnerProviderConnectionStatus string + +const ( + // SecurityPartnerProviderConnectionStatusConnected ... + SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" + // SecurityPartnerProviderConnectionStatusNotConnected ... + SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" + // SecurityPartnerProviderConnectionStatusPartiallyConnected ... + SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" + // SecurityPartnerProviderConnectionStatusUnknown ... + SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" +) + +// PossibleSecurityPartnerProviderConnectionStatusValues returns an array of possible values for the SecurityPartnerProviderConnectionStatus const type. +func PossibleSecurityPartnerProviderConnectionStatusValues() []SecurityPartnerProviderConnectionStatus { + return []SecurityPartnerProviderConnectionStatus{SecurityPartnerProviderConnectionStatusConnected, SecurityPartnerProviderConnectionStatusNotConnected, SecurityPartnerProviderConnectionStatusPartiallyConnected, SecurityPartnerProviderConnectionStatusUnknown} +} + +// SecurityProviderName enumerates the values for security provider name. +type SecurityProviderName string + +const ( + // SecurityProviderNameCheckpoint ... + SecurityProviderNameCheckpoint SecurityProviderName = "Checkpoint" + // SecurityProviderNameIBoss ... + SecurityProviderNameIBoss SecurityProviderName = "IBoss" + // SecurityProviderNameZScaler ... + SecurityProviderNameZScaler SecurityProviderName = "ZScaler" +) + +// PossibleSecurityProviderNameValues returns an array of possible values for the SecurityProviderName const type. +func PossibleSecurityProviderNameValues() []SecurityProviderName { + return []SecurityProviderName{SecurityProviderNameCheckpoint, SecurityProviderNameIBoss, SecurityProviderNameZScaler} +} + +// SecurityRuleAccess enumerates the values for security rule access. +type SecurityRuleAccess string + +const ( + // SecurityRuleAccessAllow ... + SecurityRuleAccessAllow SecurityRuleAccess = "Allow" + // SecurityRuleAccessDeny ... + SecurityRuleAccessDeny SecurityRuleAccess = "Deny" +) + +// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type. +func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { + return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny} +} + +// SecurityRuleDirection enumerates the values for security rule direction. +type SecurityRuleDirection string + +const ( + // SecurityRuleDirectionInbound ... + SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" + // SecurityRuleDirectionOutbound ... + SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" +) + +// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type. +func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { + return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound} +} + +// SecurityRuleProtocol enumerates the values for security rule protocol. +type SecurityRuleProtocol string + +const ( + // SecurityRuleProtocolAh ... + SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" + // SecurityRuleProtocolAsterisk ... + SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" + // SecurityRuleProtocolEsp ... + SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" + // SecurityRuleProtocolIcmp ... + SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" + // SecurityRuleProtocolTCP ... + SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" + // SecurityRuleProtocolUDP ... + SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" +) + +// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. +func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { + return []SecurityRuleProtocol{SecurityRuleProtocolAh, SecurityRuleProtocolAsterisk, SecurityRuleProtocolEsp, SecurityRuleProtocolIcmp, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} +} + +// ServiceProviderProvisioningState enumerates the values for service provider provisioning state. +type ServiceProviderProvisioningState string + +const ( + // ServiceProviderProvisioningStateDeprovisioning ... + ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" + // ServiceProviderProvisioningStateNotProvisioned ... + ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" + // ServiceProviderProvisioningStateProvisioned ... + ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" + // ServiceProviderProvisioningStateProvisioning ... + ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" +) + +// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type. +func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { + return []ServiceProviderProvisioningState{ServiceProviderProvisioningStateDeprovisioning, ServiceProviderProvisioningStateNotProvisioned, ServiceProviderProvisioningStateProvisioned, ServiceProviderProvisioningStateProvisioning} +} + +// Severity enumerates the values for severity. +type Severity string + +const ( + // SeverityError ... + SeverityError Severity = "Error" + // SeverityWarning ... + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns an array of possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{SeverityError, SeverityWarning} +} + +// SyncRemoteAddressSpace enumerates the values for sync remote address space. +type SyncRemoteAddressSpace string + +const ( + // SyncRemoteAddressSpaceTrue ... + SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true" +) + +// PossibleSyncRemoteAddressSpaceValues returns an array of possible values for the SyncRemoteAddressSpace const type. +func PossibleSyncRemoteAddressSpaceValues() []SyncRemoteAddressSpace { + return []SyncRemoteAddressSpace{SyncRemoteAddressSpaceTrue} +} + +// TransportProtocol enumerates the values for transport protocol. +type TransportProtocol string + +const ( + // TransportProtocolAll ... + TransportProtocolAll TransportProtocol = "All" + // TransportProtocolTCP ... + TransportProtocolTCP TransportProtocol = "Tcp" + // TransportProtocolUDP ... + TransportProtocolUDP TransportProtocol = "Udp" +) + +// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type. +func PossibleTransportProtocolValues() []TransportProtocol { + return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP} +} + +// TunnelConnectionStatus enumerates the values for tunnel connection status. +type TunnelConnectionStatus string + +const ( + // TunnelConnectionStatusConnected ... + TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected" + // TunnelConnectionStatusConnecting ... + TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting" + // TunnelConnectionStatusNotConnected ... + TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected" + // TunnelConnectionStatusUnknown ... + TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown" +) + +// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type. +func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { + return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown} +} + +// VerbosityLevel enumerates the values for verbosity level. +type VerbosityLevel string + +const ( + // VerbosityLevelFull ... + VerbosityLevelFull VerbosityLevel = "Full" + // VerbosityLevelMinimum ... + VerbosityLevelMinimum VerbosityLevel = "Minimum" + // VerbosityLevelNormal ... + VerbosityLevelNormal VerbosityLevel = "Normal" +) + +// PossibleVerbosityLevelValues returns an array of possible values for the VerbosityLevel const type. +func PossibleVerbosityLevelValues() []VerbosityLevel { + return []VerbosityLevel{VerbosityLevelFull, VerbosityLevelMinimum, VerbosityLevelNormal} +} + +// VirtualNetworkGatewayConnectionMode enumerates the values for virtual network gateway connection mode. +type VirtualNetworkGatewayConnectionMode string + +const ( + // VirtualNetworkGatewayConnectionModeDefault ... + VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" + // VirtualNetworkGatewayConnectionModeInitiatorOnly ... + VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" + // VirtualNetworkGatewayConnectionModeResponderOnly ... + VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" +) + +// PossibleVirtualNetworkGatewayConnectionModeValues returns an array of possible values for the VirtualNetworkGatewayConnectionMode const type. +func PossibleVirtualNetworkGatewayConnectionModeValues() []VirtualNetworkGatewayConnectionMode { + return []VirtualNetworkGatewayConnectionMode{VirtualNetworkGatewayConnectionModeDefault, VirtualNetworkGatewayConnectionModeInitiatorOnly, VirtualNetworkGatewayConnectionModeResponderOnly} +} + +// VirtualNetworkGatewayConnectionProtocol enumerates the values for virtual network gateway connection +// protocol. +type VirtualNetworkGatewayConnectionProtocol string + +const ( + // VirtualNetworkGatewayConnectionProtocolIKEv1 ... + VirtualNetworkGatewayConnectionProtocolIKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1" + // VirtualNetworkGatewayConnectionProtocolIKEv2 ... + VirtualNetworkGatewayConnectionProtocolIKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2" +) + +// PossibleVirtualNetworkGatewayConnectionProtocolValues returns an array of possible values for the VirtualNetworkGatewayConnectionProtocol const type. +func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol { + return []VirtualNetworkGatewayConnectionProtocol{VirtualNetworkGatewayConnectionProtocolIKEv1, VirtualNetworkGatewayConnectionProtocolIKEv2} +} + +// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. +type VirtualNetworkGatewayConnectionStatus string + +const ( + // VirtualNetworkGatewayConnectionStatusConnected ... + VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" + // VirtualNetworkGatewayConnectionStatusConnecting ... + VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" + // VirtualNetworkGatewayConnectionStatusNotConnected ... + VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" + // VirtualNetworkGatewayConnectionStatusUnknown ... + VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" +) + +// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type. +func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { + return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown} +} + +// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type. +type VirtualNetworkGatewayConnectionType string + +const ( + // VirtualNetworkGatewayConnectionTypeExpressRoute ... + VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" + // VirtualNetworkGatewayConnectionTypeIPsec ... + VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" + // VirtualNetworkGatewayConnectionTypeVnet2Vnet ... + VirtualNetworkGatewayConnectionTypeVnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" + // VirtualNetworkGatewayConnectionTypeVPNClient ... + VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" +) + +// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type. +func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { + return []VirtualNetworkGatewayConnectionType{VirtualNetworkGatewayConnectionTypeExpressRoute, VirtualNetworkGatewayConnectionTypeIPsec, VirtualNetworkGatewayConnectionTypeVnet2Vnet, VirtualNetworkGatewayConnectionTypeVPNClient} +} + +// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name. +type VirtualNetworkGatewaySkuName string + +const ( + // VirtualNetworkGatewaySkuNameBasic ... + VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" + // VirtualNetworkGatewaySkuNameErGw1AZ ... + VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ" + // VirtualNetworkGatewaySkuNameErGw2AZ ... + VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ" + // VirtualNetworkGatewaySkuNameErGw3AZ ... + VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ" + // VirtualNetworkGatewaySkuNameHighPerformance ... + VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" + // VirtualNetworkGatewaySkuNameStandard ... + VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" + // VirtualNetworkGatewaySkuNameUltraPerformance ... + VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" + // VirtualNetworkGatewaySkuNameVpnGw1 ... + VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1" + // VirtualNetworkGatewaySkuNameVpnGw1AZ ... + VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" + // VirtualNetworkGatewaySkuNameVpnGw2 ... + VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2" + // VirtualNetworkGatewaySkuNameVpnGw2AZ ... + VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" + // VirtualNetworkGatewaySkuNameVpnGw3 ... + VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3" + // VirtualNetworkGatewaySkuNameVpnGw3AZ ... + VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" + // VirtualNetworkGatewaySkuNameVpnGw4 ... + VirtualNetworkGatewaySkuNameVpnGw4 VirtualNetworkGatewaySkuName = "VpnGw4" + // VirtualNetworkGatewaySkuNameVpnGw4AZ ... + VirtualNetworkGatewaySkuNameVpnGw4AZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" + // VirtualNetworkGatewaySkuNameVpnGw5 ... + VirtualNetworkGatewaySkuNameVpnGw5 VirtualNetworkGatewaySkuName = "VpnGw5" + // VirtualNetworkGatewaySkuNameVpnGw5AZ ... + VirtualNetworkGatewaySkuNameVpnGw5AZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" +) + +// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type. +func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName { + return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ, VirtualNetworkGatewaySkuNameVpnGw4, VirtualNetworkGatewaySkuNameVpnGw4AZ, VirtualNetworkGatewaySkuNameVpnGw5, VirtualNetworkGatewaySkuNameVpnGw5AZ} +} + +// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier. +type VirtualNetworkGatewaySkuTier string + +const ( + // VirtualNetworkGatewaySkuTierBasic ... + VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" + // VirtualNetworkGatewaySkuTierErGw1AZ ... + VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" + // VirtualNetworkGatewaySkuTierErGw2AZ ... + VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" + // VirtualNetworkGatewaySkuTierErGw3AZ ... + VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" + // VirtualNetworkGatewaySkuTierHighPerformance ... + VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" + // VirtualNetworkGatewaySkuTierStandard ... + VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" + // VirtualNetworkGatewaySkuTierUltraPerformance ... + VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" + // VirtualNetworkGatewaySkuTierVpnGw1 ... + VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1" + // VirtualNetworkGatewaySkuTierVpnGw1AZ ... + VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" + // VirtualNetworkGatewaySkuTierVpnGw2 ... + VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2" + // VirtualNetworkGatewaySkuTierVpnGw2AZ ... + VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" + // VirtualNetworkGatewaySkuTierVpnGw3 ... + VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3" + // VirtualNetworkGatewaySkuTierVpnGw3AZ ... + VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" + // VirtualNetworkGatewaySkuTierVpnGw4 ... + VirtualNetworkGatewaySkuTierVpnGw4 VirtualNetworkGatewaySkuTier = "VpnGw4" + // VirtualNetworkGatewaySkuTierVpnGw4AZ ... + VirtualNetworkGatewaySkuTierVpnGw4AZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" + // VirtualNetworkGatewaySkuTierVpnGw5 ... + VirtualNetworkGatewaySkuTierVpnGw5 VirtualNetworkGatewaySkuTier = "VpnGw5" + // VirtualNetworkGatewaySkuTierVpnGw5AZ ... + VirtualNetworkGatewaySkuTierVpnGw5AZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" +) + +// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type. +func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier { + return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ, VirtualNetworkGatewaySkuTierVpnGw4, VirtualNetworkGatewaySkuTierVpnGw4AZ, VirtualNetworkGatewaySkuTierVpnGw5, VirtualNetworkGatewaySkuTierVpnGw5AZ} +} + +// VirtualNetworkGatewayType enumerates the values for virtual network gateway type. +type VirtualNetworkGatewayType string + +const ( + // VirtualNetworkGatewayTypeExpressRoute ... + VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" + // VirtualNetworkGatewayTypeLocalGateway ... + VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" + // VirtualNetworkGatewayTypeVpn ... + VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" +) + +// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type. +func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { + return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeLocalGateway, VirtualNetworkGatewayTypeVpn} +} + +// VirtualNetworkPeeringLevel enumerates the values for virtual network peering level. +type VirtualNetworkPeeringLevel string + +const ( + // VirtualNetworkPeeringLevelFullyInSync ... + VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" + // VirtualNetworkPeeringLevelLocalAndRemoteNotInSync ... + VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" + // VirtualNetworkPeeringLevelLocalNotInSync ... + VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" + // VirtualNetworkPeeringLevelRemoteNotInSync ... + VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" +) + +// PossibleVirtualNetworkPeeringLevelValues returns an array of possible values for the VirtualNetworkPeeringLevel const type. +func PossibleVirtualNetworkPeeringLevelValues() []VirtualNetworkPeeringLevel { + return []VirtualNetworkPeeringLevel{VirtualNetworkPeeringLevelFullyInSync, VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, VirtualNetworkPeeringLevelLocalNotInSync, VirtualNetworkPeeringLevelRemoteNotInSync} +} + +// VirtualNetworkPeeringState enumerates the values for virtual network peering state. +type VirtualNetworkPeeringState string + +const ( + // VirtualNetworkPeeringStateConnected ... + VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" + // VirtualNetworkPeeringStateDisconnected ... + VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" + // VirtualNetworkPeeringStateInitiated ... + VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" +) + +// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type. +func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { + return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated} +} + +// VirtualNetworkPrivateEndpointNetworkPolicies enumerates the values for virtual network private endpoint +// network policies. +type VirtualNetworkPrivateEndpointNetworkPolicies string + +const ( + // VirtualNetworkPrivateEndpointNetworkPoliciesDisabled ... + VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" + // VirtualNetworkPrivateEndpointNetworkPoliciesEnabled ... + VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" +) + +// PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues returns an array of possible values for the VirtualNetworkPrivateEndpointNetworkPolicies const type. +func PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues() []VirtualNetworkPrivateEndpointNetworkPolicies { + return []VirtualNetworkPrivateEndpointNetworkPolicies{VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, VirtualNetworkPrivateEndpointNetworkPoliciesEnabled} +} + +// VirtualNetworkPrivateLinkServiceNetworkPolicies enumerates the values for virtual network private link +// service network policies. +type VirtualNetworkPrivateLinkServiceNetworkPolicies string + +const ( + // VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled ... + VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" + // VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled ... + VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" +) + +// PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues returns an array of possible values for the VirtualNetworkPrivateLinkServiceNetworkPolicies const type. +func PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues() []VirtualNetworkPrivateLinkServiceNetworkPolicies { + return []VirtualNetworkPrivateLinkServiceNetworkPolicies{VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled} +} + +// VirtualWanSecurityProviderType enumerates the values for virtual wan security provider type. +type VirtualWanSecurityProviderType string + +const ( + // VirtualWanSecurityProviderTypeExternal ... + VirtualWanSecurityProviderTypeExternal VirtualWanSecurityProviderType = "External" + // VirtualWanSecurityProviderTypeNative ... + VirtualWanSecurityProviderTypeNative VirtualWanSecurityProviderType = "Native" +) + +// PossibleVirtualWanSecurityProviderTypeValues returns an array of possible values for the VirtualWanSecurityProviderType const type. +func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType { + return []VirtualWanSecurityProviderType{VirtualWanSecurityProviderTypeExternal, VirtualWanSecurityProviderTypeNative} +} + +// VpnAuthenticationType enumerates the values for vpn authentication type. +type VpnAuthenticationType string + +const ( + // VpnAuthenticationTypeAAD ... + VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" + // VpnAuthenticationTypeCertificate ... + VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" + // VpnAuthenticationTypeRadius ... + VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" +) + +// PossibleVpnAuthenticationTypeValues returns an array of possible values for the VpnAuthenticationType const type. +func PossibleVpnAuthenticationTypeValues() []VpnAuthenticationType { + return []VpnAuthenticationType{VpnAuthenticationTypeAAD, VpnAuthenticationTypeCertificate, VpnAuthenticationTypeRadius} +} + +// VpnClientProtocol enumerates the values for vpn client protocol. +type VpnClientProtocol string + +const ( + // VpnClientProtocolIkeV2 ... + VpnClientProtocolIkeV2 VpnClientProtocol = "IkeV2" + // VpnClientProtocolOpenVPN ... + VpnClientProtocolOpenVPN VpnClientProtocol = "OpenVPN" + // VpnClientProtocolSSTP ... + VpnClientProtocolSSTP VpnClientProtocol = "SSTP" +) + +// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. +func PossibleVpnClientProtocolValues() []VpnClientProtocol { + return []VpnClientProtocol{VpnClientProtocolIkeV2, VpnClientProtocolOpenVPN, VpnClientProtocolSSTP} +} + +// VpnConnectionStatus enumerates the values for vpn connection status. +type VpnConnectionStatus string + +const ( + // VpnConnectionStatusConnected ... + VpnConnectionStatusConnected VpnConnectionStatus = "Connected" + // VpnConnectionStatusConnecting ... + VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" + // VpnConnectionStatusNotConnected ... + VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" + // VpnConnectionStatusUnknown ... + VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" +) + +// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type. +func PossibleVpnConnectionStatusValues() []VpnConnectionStatus { + return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown} +} + +// VpnGatewayGeneration enumerates the values for vpn gateway generation. +type VpnGatewayGeneration string + +const ( + // VpnGatewayGenerationGeneration1 ... + VpnGatewayGenerationGeneration1 VpnGatewayGeneration = "Generation1" + // VpnGatewayGenerationGeneration2 ... + VpnGatewayGenerationGeneration2 VpnGatewayGeneration = "Generation2" + // VpnGatewayGenerationNone ... + VpnGatewayGenerationNone VpnGatewayGeneration = "None" +) + +// PossibleVpnGatewayGenerationValues returns an array of possible values for the VpnGatewayGeneration const type. +func PossibleVpnGatewayGenerationValues() []VpnGatewayGeneration { + return []VpnGatewayGeneration{VpnGatewayGenerationGeneration1, VpnGatewayGenerationGeneration2, VpnGatewayGenerationNone} +} + +// VpnGatewayTunnelingProtocol enumerates the values for vpn gateway tunneling protocol. +type VpnGatewayTunnelingProtocol string + +const ( + // VpnGatewayTunnelingProtocolIkeV2 ... + VpnGatewayTunnelingProtocolIkeV2 VpnGatewayTunnelingProtocol = "IkeV2" + // VpnGatewayTunnelingProtocolOpenVPN ... + VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" +) + +// PossibleVpnGatewayTunnelingProtocolValues returns an array of possible values for the VpnGatewayTunnelingProtocol const type. +func PossibleVpnGatewayTunnelingProtocolValues() []VpnGatewayTunnelingProtocol { + return []VpnGatewayTunnelingProtocol{VpnGatewayTunnelingProtocolIkeV2, VpnGatewayTunnelingProtocolOpenVPN} +} + +// VpnLinkConnectionMode enumerates the values for vpn link connection mode. +type VpnLinkConnectionMode string + +const ( + // VpnLinkConnectionModeDefault ... + VpnLinkConnectionModeDefault VpnLinkConnectionMode = "Default" + // VpnLinkConnectionModeInitiatorOnly ... + VpnLinkConnectionModeInitiatorOnly VpnLinkConnectionMode = "InitiatorOnly" + // VpnLinkConnectionModeResponderOnly ... + VpnLinkConnectionModeResponderOnly VpnLinkConnectionMode = "ResponderOnly" +) + +// PossibleVpnLinkConnectionModeValues returns an array of possible values for the VpnLinkConnectionMode const type. +func PossibleVpnLinkConnectionModeValues() []VpnLinkConnectionMode { + return []VpnLinkConnectionMode{VpnLinkConnectionModeDefault, VpnLinkConnectionModeInitiatorOnly, VpnLinkConnectionModeResponderOnly} +} + +// VpnNatRuleMode enumerates the values for vpn nat rule mode. +type VpnNatRuleMode string + +const ( + // VpnNatRuleModeEgressSnat ... + VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" + // VpnNatRuleModeIngressSnat ... + VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" +) + +// PossibleVpnNatRuleModeValues returns an array of possible values for the VpnNatRuleMode const type. +func PossibleVpnNatRuleModeValues() []VpnNatRuleMode { + return []VpnNatRuleMode{VpnNatRuleModeEgressSnat, VpnNatRuleModeIngressSnat} +} + +// VpnNatRuleType enumerates the values for vpn nat rule type. +type VpnNatRuleType string + +const ( + // VpnNatRuleTypeDynamic ... + VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" + // VpnNatRuleTypeStatic ... + VpnNatRuleTypeStatic VpnNatRuleType = "Static" +) + +// PossibleVpnNatRuleTypeValues returns an array of possible values for the VpnNatRuleType const type. +func PossibleVpnNatRuleTypeValues() []VpnNatRuleType { + return []VpnNatRuleType{VpnNatRuleTypeDynamic, VpnNatRuleTypeStatic} +} + +// VpnType enumerates the values for vpn type. +type VpnType string + +const ( + // VpnTypePolicyBased ... + VpnTypePolicyBased VpnType = "PolicyBased" + // VpnTypeRouteBased ... + VpnTypeRouteBased VpnType = "RouteBased" +) + +// PossibleVpnTypeValues returns an array of possible values for the VpnType const type. +func PossibleVpnTypeValues() []VpnType { + return []VpnType{VpnTypePolicyBased, VpnTypeRouteBased} +} + +// WebApplicationFirewallAction enumerates the values for web application firewall action. +type WebApplicationFirewallAction string + +const ( + // WebApplicationFirewallActionAllow ... + WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" + // WebApplicationFirewallActionBlock ... + WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" + // WebApplicationFirewallActionLog ... + WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" +) + +// PossibleWebApplicationFirewallActionValues returns an array of possible values for the WebApplicationFirewallAction const type. +func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction { + return []WebApplicationFirewallAction{WebApplicationFirewallActionAllow, WebApplicationFirewallActionBlock, WebApplicationFirewallActionLog} +} + +// WebApplicationFirewallEnabledState enumerates the values for web application firewall enabled state. +type WebApplicationFirewallEnabledState string + +const ( + // WebApplicationFirewallEnabledStateDisabled ... + WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" + // WebApplicationFirewallEnabledStateEnabled ... + WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" +) + +// PossibleWebApplicationFirewallEnabledStateValues returns an array of possible values for the WebApplicationFirewallEnabledState const type. +func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState { + return []WebApplicationFirewallEnabledState{WebApplicationFirewallEnabledStateDisabled, WebApplicationFirewallEnabledStateEnabled} +} + +// WebApplicationFirewallMatchVariable enumerates the values for web application firewall match variable. +type WebApplicationFirewallMatchVariable string + +const ( + // WebApplicationFirewallMatchVariablePostArgs ... + WebApplicationFirewallMatchVariablePostArgs WebApplicationFirewallMatchVariable = "PostArgs" + // WebApplicationFirewallMatchVariableQueryString ... + WebApplicationFirewallMatchVariableQueryString WebApplicationFirewallMatchVariable = "QueryString" + // WebApplicationFirewallMatchVariableRemoteAddr ... + WebApplicationFirewallMatchVariableRemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" + // WebApplicationFirewallMatchVariableRequestBody ... + WebApplicationFirewallMatchVariableRequestBody WebApplicationFirewallMatchVariable = "RequestBody" + // WebApplicationFirewallMatchVariableRequestCookies ... + WebApplicationFirewallMatchVariableRequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" + // WebApplicationFirewallMatchVariableRequestHeaders ... + WebApplicationFirewallMatchVariableRequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" + // WebApplicationFirewallMatchVariableRequestMethod ... + WebApplicationFirewallMatchVariableRequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" + // WebApplicationFirewallMatchVariableRequestURI ... + WebApplicationFirewallMatchVariableRequestURI WebApplicationFirewallMatchVariable = "RequestUri" +) + +// PossibleWebApplicationFirewallMatchVariableValues returns an array of possible values for the WebApplicationFirewallMatchVariable const type. +func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { + return []WebApplicationFirewallMatchVariable{WebApplicationFirewallMatchVariablePostArgs, WebApplicationFirewallMatchVariableQueryString, WebApplicationFirewallMatchVariableRemoteAddr, WebApplicationFirewallMatchVariableRequestBody, WebApplicationFirewallMatchVariableRequestCookies, WebApplicationFirewallMatchVariableRequestHeaders, WebApplicationFirewallMatchVariableRequestMethod, WebApplicationFirewallMatchVariableRequestURI} +} + +// WebApplicationFirewallMode enumerates the values for web application firewall mode. +type WebApplicationFirewallMode string + +const ( + // WebApplicationFirewallModeDetection ... + WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" + // WebApplicationFirewallModePrevention ... + WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" +) + +// PossibleWebApplicationFirewallModeValues returns an array of possible values for the WebApplicationFirewallMode const type. +func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { + return []WebApplicationFirewallMode{WebApplicationFirewallModeDetection, WebApplicationFirewallModePrevention} +} + +// WebApplicationFirewallOperator enumerates the values for web application firewall operator. +type WebApplicationFirewallOperator string + +const ( + // WebApplicationFirewallOperatorBeginsWith ... + WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" + // WebApplicationFirewallOperatorContains ... + WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" + // WebApplicationFirewallOperatorEndsWith ... + WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" + // WebApplicationFirewallOperatorEqual ... + WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" + // WebApplicationFirewallOperatorGeoMatch ... + WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" + // WebApplicationFirewallOperatorGreaterThan ... + WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" + // WebApplicationFirewallOperatorGreaterThanOrEqual ... + WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" + // WebApplicationFirewallOperatorIPMatch ... + WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" + // WebApplicationFirewallOperatorLessThan ... + WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" + // WebApplicationFirewallOperatorLessThanOrEqual ... + WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" + // WebApplicationFirewallOperatorRegex ... + WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" +) + +// PossibleWebApplicationFirewallOperatorValues returns an array of possible values for the WebApplicationFirewallOperator const type. +func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { + return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGeoMatch, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex} +} + +// WebApplicationFirewallPolicyResourceState enumerates the values for web application firewall policy resource +// state. +type WebApplicationFirewallPolicyResourceState string + +const ( + // WebApplicationFirewallPolicyResourceStateCreating ... + WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" + // WebApplicationFirewallPolicyResourceStateDeleting ... + WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" + // WebApplicationFirewallPolicyResourceStateDisabled ... + WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" + // WebApplicationFirewallPolicyResourceStateDisabling ... + WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" + // WebApplicationFirewallPolicyResourceStateEnabled ... + WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" + // WebApplicationFirewallPolicyResourceStateEnabling ... + WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" +) + +// PossibleWebApplicationFirewallPolicyResourceStateValues returns an array of possible values for the WebApplicationFirewallPolicyResourceState const type. +func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState { + return []WebApplicationFirewallPolicyResourceState{WebApplicationFirewallPolicyResourceStateCreating, WebApplicationFirewallPolicyResourceStateDeleting, WebApplicationFirewallPolicyResourceStateDisabled, WebApplicationFirewallPolicyResourceStateDisabling, WebApplicationFirewallPolicyResourceStateEnabled, WebApplicationFirewallPolicyResourceStateEnabling} +} + +// WebApplicationFirewallRuleType enumerates the values for web application firewall rule type. +type WebApplicationFirewallRuleType string + +const ( + // WebApplicationFirewallRuleTypeInvalid ... + WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" + // WebApplicationFirewallRuleTypeMatchRule ... + WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" +) + +// PossibleWebApplicationFirewallRuleTypeValues returns an array of possible values for the WebApplicationFirewallRuleType const type. +func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType { + return []WebApplicationFirewallRuleType{WebApplicationFirewallRuleTypeInvalid, WebApplicationFirewallRuleTypeMatchRule} +} + +// WebApplicationFirewallTransform enumerates the values for web application firewall transform. +type WebApplicationFirewallTransform string + +const ( + // WebApplicationFirewallTransformHTMLEntityDecode ... + WebApplicationFirewallTransformHTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" + // WebApplicationFirewallTransformLowercase ... + WebApplicationFirewallTransformLowercase WebApplicationFirewallTransform = "Lowercase" + // WebApplicationFirewallTransformRemoveNulls ... + WebApplicationFirewallTransformRemoveNulls WebApplicationFirewallTransform = "RemoveNulls" + // WebApplicationFirewallTransformTrim ... + WebApplicationFirewallTransformTrim WebApplicationFirewallTransform = "Trim" + // WebApplicationFirewallTransformURLDecode ... + WebApplicationFirewallTransformURLDecode WebApplicationFirewallTransform = "UrlDecode" + // WebApplicationFirewallTransformURLEncode ... + WebApplicationFirewallTransformURLEncode WebApplicationFirewallTransform = "UrlEncode" +) + +// PossibleWebApplicationFirewallTransformValues returns an array of possible values for the WebApplicationFirewallTransform const type. +func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { + return []WebApplicationFirewallTransform{WebApplicationFirewallTransformHTMLEntityDecode, WebApplicationFirewallTransformLowercase, WebApplicationFirewallTransformRemoveNulls, WebApplicationFirewallTransformTrim, WebApplicationFirewallTransformURLDecode, WebApplicationFirewallTransformURLEncode} +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2021-03-01/network/expressroutecircuitauthorizations.go new file mode 100644 index 000000000000..8860cbef2a2e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutecircuitauthorizations.go @@ -0,0 +1,394 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteCircuitAuthorizationsClient is the network Client +type ExpressRouteCircuitAuthorizationsClient struct { + BaseClient +} + +// NewExpressRouteCircuitAuthorizationsClient creates an instance of the ExpressRouteCircuitAuthorizationsClient +// client. +func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRouteCircuitAuthorizationsClient { + return NewExpressRouteCircuitAuthorizationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the +// ExpressRouteCircuitAuthorizationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient { + return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an authorization in the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// authorizationName - the name of the authorization. +// authorizationParameters - parameters supplied to the create or update express route circuit authorization +// operation. +func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (result ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authorizationName": autorest.Encode("path", authorizationName), + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + authorizationParameters.Etag = nil + authorizationParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", pathParameters), + autorest.WithJSON(authorizationParameters), + 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 ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified authorization from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// authorizationName - the name of the authorization. +func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, authorizationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authorizationName": autorest.Encode("path", authorizationName), + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", 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 ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified authorization from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// authorizationName - the name of the authorization. +func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorization, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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, circuitName, authorizationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authorizationName": autorest.Encode("path", authorizationName), + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", 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 ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all authorizations in an express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.List") + defer func() { + sc := -1 + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, circuitName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.alr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure sending request") + return + } + + result.alr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure responding to request") + return + } + if result.alr.hasNextLink() && result.alr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/authorizations", 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 ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) ListResponder(resp *http.Response) (result AuthorizationListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCircuitAuthorizationsClient) listNextResults(ctx context.Context, lastResults AuthorizationListResult) (result AuthorizationListResult, err error) { + req, err := lastResults.authorizationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "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, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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, circuitName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2021-03-01/network/expressroutecircuitconnections.go new file mode 100644 index 000000000000..8f58c208c0ac --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutecircuitconnections.go @@ -0,0 +1,401 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteCircuitConnectionsClient is the network Client +type ExpressRouteCircuitConnectionsClient struct { + BaseClient +} + +// NewExpressRouteCircuitConnectionsClient creates an instance of the ExpressRouteCircuitConnectionsClient client. +func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRouteCircuitConnectionsClient { + return NewExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { + return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Express Route Circuit Connection in the specified express route circuits. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// connectionName - the name of the express route circuit connection. +// expressRouteCircuitConnectionParameters - parameters supplied to the create or update express route circuit +// connection operation. +func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (result ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "connectionName": autorest.Encode("path", connectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + expressRouteCircuitConnectionParameters.Etag = nil + expressRouteCircuitConnectionParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", pathParameters), + autorest.WithJSON(expressRouteCircuitConnectionParameters), + 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 ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Express Route Circuit Connection from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// connectionName - the name of the express route circuit connection. +func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "connectionName": autorest.Encode("path", connectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", 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 ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Express Route Circuit Connection from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// connectionName - the name of the express route circuit connection. +func (client ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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, circuitName, peeringName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "connectionName": autorest.Encode("path", connectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", 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 ExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all global reach connections associated with a private peering in an express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +// peeringName - the name of the peering. +func (client ExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.List") + defer func() { + sc := -1 + if result.ercclr.Response.Response != nil { + sc = result.ercclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ercclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.ercclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections", 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 ExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitConnectionListResult) (result ExpressRouteCircuitConnectionListResult, err error) { + req, err := lastResults.expressRouteCircuitConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "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, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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, circuitName, peeringName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2021-03-01/network/expressroutecircuitpeerings.go new file mode 100644 index 000000000000..6c113e15b5d9 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutecircuitpeerings.go @@ -0,0 +1,404 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteCircuitPeeringsClient is the network Client +type ExpressRouteCircuitPeeringsClient struct { + BaseClient +} + +// NewExpressRouteCircuitPeeringsClient creates an instance of the ExpressRouteCircuitPeeringsClient client. +func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCircuitPeeringsClient { + return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient { + return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a peering in the specified express route circuits. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// peeringParameters - parameters supplied to the create or update express route circuit peering operation. +func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (result ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: peeringParameters, + 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: int64(1), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, peeringParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + peeringParameters.Etag = nil + peeringParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", pathParameters), + autorest.WithJSON(peeringParameters), + 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 ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified peering from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeeringsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", 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 ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified peering for the express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeering, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", 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 ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all peerings in a specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.List") + defer func() { + sc := -1 + if result.ercplr.Response.Response != nil { + sc = result.ercplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, circuitName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ercplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure sending request") + return + } + + result.ercplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.ercplr.hasNextLink() && result.ercplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings", 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 ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitPeeringListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCircuitPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) { + req, err := lastResults.expressRouteCircuitPeeringListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "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, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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, circuitName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutecircuits.go b/services/network/mgmt/2021-03-01/network/expressroutecircuits.go new file mode 100644 index 000000000000..b10dd8381ebc --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutecircuits.go @@ -0,0 +1,977 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteCircuitsClient is the network Client +type ExpressRouteCircuitsClient struct { + BaseClient +} + +// NewExpressRouteCircuitsClient creates an instance of the ExpressRouteCircuitsClient client. +func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsClient { + return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient { + return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +// parameters - parameters supplied to the create or update express route circuit operation. +func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (result ExpressRouteCircuitsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", 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 ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuit, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}", 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 ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of express route circuit. +func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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, circuitName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}", 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 ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuit, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPeeringStats gets all stats from an express route circuit in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +func (client ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitStats, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.GetPeeringStats") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPeeringStatsPreparer(ctx, resourceGroupName, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", nil, "Failure preparing request") + return + } + + resp, err := client.GetPeeringStatsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure sending request") + return + } + + result, err = client.GetPeeringStatsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure responding to request") + return + } + + return +} + +// GetPeeringStatsPreparer prepares the GetPeeringStats request. +func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPeeringStatsSender sends the GetPeeringStats request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) GetPeeringStatsResponder(resp *http.Response) (result ExpressRouteCircuitStats, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStats gets all the stats from an express route circuit in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +func (client ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitStats, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.GetStats") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetStatsPreparer(ctx, resourceGroupName, circuitName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", nil, "Failure preparing request") + return + } + + resp, err := client.GetStatsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure sending request") + return + } + + result, err = client.GetStatsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure responding to request") + return + } + + return +} + +// GetStatsPreparer prepares the GetStats request. +func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/stats", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetStatsSender sends the GetStats request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetStatsResponder handles the response to the GetStats request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) GetStatsResponder(resp *http.Response) (result ExpressRouteCircuitStats, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the express route circuits in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.List") + defer func() { + sc := -1 + if result.erclr.Response.Response != nil { + sc = result.erclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure sending request") + return + } + + result.erclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure responding to request") + return + } + if result.erclr.hasNextLink() && result.erclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCircuitsClient) ListPreparer(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 = "2021-03-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.Network/expressRouteCircuits", 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 ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCircuitsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { + req, err := lastResults.expressRouteCircuitListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "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, "network.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCircuitsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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) + return +} + +// ListAll gets all the express route circuits in a subscription. +func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result ExpressRouteCircuitListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll") + defer func() { + sc := -1 + if result.erclr.Response.Response != nil { + sc = result.erclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.erclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure sending request") + return + } + + result.erclr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.erclr.hasNextLink() && result.erclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) ListAllResponder(resp *http.Response) (result ExpressRouteCircuitListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client ExpressRouteCircuitsClient) listAllNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { + req, err := lastResults.expressRouteCircuitListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context) (result ExpressRouteCircuitListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListArpTable gets the currently advertised ARP table associated with the express route circuit in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// devicePath - the path of the device. +func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListArpTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListArpTable") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListArpTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure preparing request") + return + } + + result, err = client.ListArpTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure sending request") + return + } + + return +} + +// ListArpTablePreparer prepares the ListArpTable request. +func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "devicePath": autorest.Encode("path", devicePath), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListArpTableSender sends the ListArpTable request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListArpTableResponder handles the response to the ListArpTable request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRoutesTable gets the currently advertised routes table associated with the express route circuit in a resource +// group. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// devicePath - the path of the device. +func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTable") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure preparing request") + return + } + + result, err = client.ListRoutesTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure sending request") + return + } + + return +} + +// ListRoutesTablePreparer prepares the ListRoutesTable request. +func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "devicePath": autorest.Encode("path", devicePath), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListRoutesTableSender sends the ListRoutesTable request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRoutesTableSummary gets the currently advertised routes table summary associated with the express route circuit +// in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// devicePath - the path of the device. +func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTableSummary") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure preparing request") + return + } + + result, err = client.ListRoutesTableSummarySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure sending request") + return + } + + return +} + +// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request. +func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "devicePath": autorest.Encode("path", devicePath), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates an express route circuit tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +// parameters - parameters supplied to update express route circuit tags. +func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (result ExpressRouteCircuit, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, circuitName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCircuit, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressrouteconnections.go b/services/network/mgmt/2021-03-01/network/expressrouteconnections.go new file mode 100644 index 000000000000..35574e42eaec --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressrouteconnections.go @@ -0,0 +1,357 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteConnectionsClient is the network Client +type ExpressRouteConnectionsClient struct { + BaseClient +} + +// NewExpressRouteConnectionsClient creates an instance of the ExpressRouteConnectionsClient client. +func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnectionsClient { + return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewExpressRouteConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteConnectionsClient { + return ExpressRouteConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +// connectionName - the name of the connection subresource. +// putExpressRouteConnectionParameters - parameters required in an ExpressRouteConnection PUT operation. +func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (result ExpressRouteConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: putExpressRouteConnectionParameters, + Constraints: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties.ExpressRouteCircuitPeering", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "putExpressRouteConnectionParameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.ExpressRouteConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", pathParameters), + autorest.WithJSON(putExpressRouteConnectionParameters), + 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 ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a connection to a ExpressRoute circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +// connectionName - the name of the connection subresource. +func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", 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 ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified ExpressRouteConnection. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +// connectionName - the name of the ExpressRoute connection. +func (client ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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, expressRouteGatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", 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 ExpressRouteConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists ExpressRouteConnections. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +func (client ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteConnectionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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, resourceGroupName, expressRouteGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections", 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 ExpressRouteConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteConnectionList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2021-03-01/network/expressroutecrossconnectionpeerings.go new file mode 100644 index 000000000000..3e24c1304ddb --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutecrossconnectionpeerings.go @@ -0,0 +1,405 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteCrossConnectionPeeringsClient is the network Client +type ExpressRouteCrossConnectionPeeringsClient struct { + BaseClient +} + +// NewExpressRouteCrossConnectionPeeringsClient creates an instance of the ExpressRouteCrossConnectionPeeringsClient +// client. +func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) ExpressRouteCrossConnectionPeeringsClient { + return NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the +// ExpressRouteCrossConnectionPeeringsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionPeeringsClient { + return ExpressRouteCrossConnectionPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a peering in the specified ExpressRouteCrossConnection. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// peeringName - the name of the peering. +// peeringParameters - parameters supplied to the create or update ExpressRouteCrossConnection peering +// operation. +func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (result ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: peeringParameters, + 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: int64(1), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + peeringParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", pathParameters), + autorest.WithJSON(peeringParameters), + 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 ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified peering from the ExpressRouteCrossConnection. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// peeringName - the name of the peering. +func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, crossConnectionName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", 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 ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified peering for the ExpressRouteCrossConnection. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// peeringName - the name of the peering. +func (client ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeering, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, crossConnectionName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", 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 ExpressRouteCrossConnectionPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all peerings in a specified ExpressRouteCrossConnection. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +func (client ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.List") + defer func() { + sc := -1 + if result.erccpl.Response.Response != nil { + sc = result.erccpl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, crossConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erccpl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure sending request") + return + } + + result.erccpl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.erccpl.hasNextLink() && result.erccpl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings", 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 ExpressRouteCrossConnectionPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeeringList, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCrossConnectionPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionPeeringList) (result ExpressRouteCrossConnectionPeeringList, err error) { + req, err := lastResults.expressRouteCrossConnectionPeeringListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "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, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, crossConnectionName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutecrossconnections.go b/services/network/mgmt/2021-03-01/network/expressroutecrossconnections.go new file mode 100644 index 000000000000..bb2774d4dfe9 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutecrossconnections.go @@ -0,0 +1,747 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteCrossConnectionsClient is the network Client +type ExpressRouteCrossConnectionsClient struct { + BaseClient +} + +// NewExpressRouteCrossConnectionsClient creates an instance of the ExpressRouteCrossConnectionsClient client. +func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCrossConnectionsClient { + return NewExpressRouteCrossConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { + return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate update the specified ExpressRouteCrossConnection. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// parameters - parameters supplied to the update express route crossConnection operation. +func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (result ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", 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 ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets details about the specified ExpressRouteCrossConnection. +// Parameters: +// resourceGroupName - the name of the resource group (peering location of the circuit). +// crossConnectionName - the name of the ExpressRouteCrossConnection (service key of the circuit). +func (client ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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, crossConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}", 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 ExpressRouteCrossConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves all the ExpressRouteCrossConnections in a subscription. +func (client ExpressRouteCrossConnectionsClient) List(ctx context.Context) (result ExpressRouteCrossConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.List") + defer func() { + sc := -1 + if result.ercclr.Response.Response != nil { + sc = result.ercclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ercclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.ercclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections", 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 ExpressRouteCrossConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCrossConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) { + req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "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, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context) (result ExpressRouteCrossConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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 +} + +// ListArpTable gets the currently advertised ARP table associated with the express route cross connection in a +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// peeringName - the name of the peering. +// devicePath - the path of the device. +func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListArpTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListArpTable") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListArpTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure preparing request") + return + } + + result, err = client.ListArpTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure sending request") + return + } + + return +} + +// ListArpTablePreparer prepares the ListArpTable request. +func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "devicePath": autorest.Encode("path", devicePath), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListArpTableSender sends the ListArpTable request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListArpTableResponder handles the response to the ListArpTable request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup retrieves all the ExpressRouteCrossConnections in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ercclr.Response.Response != nil { + sc = result.ercclr.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, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ercclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ercclr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ExpressRouteCrossConnectionsClient) 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 = "2021-03-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.Network/expressRouteCrossConnections", 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 ExpressRouteCrossConnectionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) { + req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "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, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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 +} + +// ListRoutesTable gets the currently advertised routes table associated with the express route cross connection in a +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// peeringName - the name of the peering. +// devicePath - the path of the device. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTable") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure preparing request") + return + } + + result, err = client.ListRoutesTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure sending request") + return + } + + return +} + +// ListRoutesTablePreparer prepares the ListRoutesTable request. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "devicePath": autorest.Encode("path", devicePath), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListRoutesTableSender sends the ListRoutesTable request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRoutesTableSummary gets the route table summary associated with the express route cross connection in a resource +// group. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the ExpressRouteCrossConnection. +// peeringName - the name of the peering. +// devicePath - the path of the device. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTableSummary") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure preparing request") + return + } + + result, err = client.ListRoutesTableSummarySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure sending request") + return + } + + return +} + +// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "devicePath": autorest.Encode("path", devicePath), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates an express route cross connection tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// crossConnectionName - the name of the cross connection. +// crossConnectionParameters - parameters supplied to update express route cross connection tags. +func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (result ExpressRouteCrossConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "crossConnectionName": autorest.Encode("path", crossConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCrossConnections/{crossConnectionName}", pathParameters), + autorest.WithJSON(crossConnectionParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutegateways.go b/services/network/mgmt/2021-03-01/network/expressroutegateways.go new file mode 100644 index 000000000000..32e43072e212 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutegateways.go @@ -0,0 +1,502 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteGatewaysClient is the network Client +type ExpressRouteGatewaysClient struct { + BaseClient +} + +// NewExpressRouteGatewaysClient creates an instance of the ExpressRouteGatewaysClient client. +func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysClient { + return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewExpressRouteGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteGatewaysClient { + return ExpressRouteGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a ExpressRoute gateway in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +// putExpressRouteGatewayParameters - parameters required in an ExpressRoute gateway PUT operation. +func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (result ExpressRouteGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: putExpressRouteGatewayParameters, + Constraints: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties.VirtualHub", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("network.ExpressRouteGatewaysClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + putExpressRouteGatewayParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", pathParameters), + autorest.WithJSON(putExpressRouteGatewayParameters), + 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 ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be +// deleted when there are no connection subresources. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}", 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 ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get fetches the details of a ExpressRoute gateway in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRouteGatewayName - the name of the ExpressRoute gateway. +func (client ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.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, expressRouteGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}", 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 ExpressRouteGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) GetResponder(resp *http.Response) (result ExpressRouteGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists ExpressRoute gateways in a given resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteGatewayList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ExpressRouteGatewaysClient) 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 = "2021-03-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.Network/expressRouteGateways", 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 ExpressRouteGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteGatewayList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription lists ExpressRoute gateways under a given subscription. +func (client ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context) (result ExpressRouteGatewayList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.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, "network.ExpressRouteGatewaysClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure responding to request") + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways", 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 ExpressRouteGatewaysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) ListBySubscriptionResponder(resp *http.Response) (result ExpressRouteGatewayList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates express route gateway tags. +// Parameters: +// resourceGroupName - the resource group name of the ExpressRouteGateway. +// expressRouteGatewayName - the name of the gateway. +// expressRouteGatewayParameters - parameters supplied to update a virtual wan express route gateway tags. +func (client ExpressRouteGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject) (result ExpressRouteGatewaysUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ExpressRouteGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteGateways/{expressRouteGatewayName}", pathParameters), + autorest.WithJSON(expressRouteGatewayParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteGatewaysClient) UpdateTagsSender(req *http.Request) (future ExpressRouteGatewaysUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressroutelinks.go b/services/network/mgmt/2021-03-01/network/expressroutelinks.go new file mode 100644 index 000000000000..4a19a40f178e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressroutelinks.go @@ -0,0 +1,228 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteLinksClient is the network Client +type ExpressRouteLinksClient struct { + BaseClient +} + +// NewExpressRouteLinksClient creates an instance of the ExpressRouteLinksClient client. +func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { + return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewExpressRouteLinksClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteLinksClient { + return ExpressRouteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves the specified ExpressRouteLink resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the ExpressRoutePort resource. +// linkName - the name of the ExpressRouteLink resource. +func (client ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (result ExpressRouteLink, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, expressRoutePortName, linkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "linkName": autorest.Encode("path", linkName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}", 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 ExpressRouteLinksClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteLinksClient) GetResponder(resp *http.Response) (result ExpressRouteLink, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the ExpressRoutePort resource. +func (client ExpressRouteLinksClient) List(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.List") + defer func() { + sc := -1 + if result.erllr.Response.Response != nil { + sc = result.erllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, expressRoutePortName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure sending request") + return + } + + result.erllr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure responding to request") + return + } + if result.erllr.hasNextLink() && result.erllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ExpressRoutePorts/{expressRoutePortName}/links", 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 ExpressRouteLinksClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteLinksClient) ListResponder(resp *http.Response) (result ExpressRouteLinkListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteLinksClient) listNextResults(ctx context.Context, lastResults ExpressRouteLinkListResult) (result ExpressRouteLinkListResult, err error) { + req, err := lastResults.expressRouteLinkListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "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, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteLinksClient) ListComplete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, expressRoutePortName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressrouteports.go b/services/network/mgmt/2021-03-01/network/expressrouteports.go new file mode 100644 index 000000000000..77f16fd80c15 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressrouteports.go @@ -0,0 +1,661 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRoutePortsClient is the network Client +type ExpressRoutePortsClient struct { + BaseClient +} + +// NewExpressRoutePortsClient creates an instance of the ExpressRoutePortsClient client. +func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { + return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewExpressRoutePortsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsClient { + return ExpressRoutePortsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified ExpressRoutePort resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the ExpressRoutePort resource. +// parameters - parameters supplied to the create ExpressRoutePort operation. +func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (result ExpressRoutePortsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRoutePortName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePort, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified ExpressRoutePort resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the ExpressRoutePort resource. +func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, expressRoutePortName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GenerateLOA generate a letter of authorization for the requested ExpressRoutePort resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of ExpressRoutePort. +// request - request parameters supplied to generate a letter of authorization. +func (client ExpressRoutePortsClient) GenerateLOA(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest) (result GenerateExpressRoutePortsLOAResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.GenerateLOA") + 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: request, + Constraints: []validation.Constraint{{Target: "request.CustomerName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.ExpressRoutePortsClient", "GenerateLOA", err.Error()) + } + + req, err := client.GenerateLOAPreparer(ctx, resourceGroupName, expressRoutePortName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "GenerateLOA", nil, "Failure preparing request") + return + } + + resp, err := client.GenerateLOASender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "GenerateLOA", resp, "Failure sending request") + return + } + + result, err = client.GenerateLOAResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "GenerateLOA", resp, "Failure responding to request") + return + } + + return +} + +// GenerateLOAPreparer prepares the GenerateLOA request. +func (client ExpressRoutePortsClient) GenerateLOAPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRoutePorts/{expressRoutePortName}/generateLoa", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GenerateLOASender sends the GenerateLOA request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRoutePortsClient) GenerateLOASender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GenerateLOAResponder handles the response to the GenerateLOA request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) GenerateLOAResponder(resp *http.Response) (result GenerateExpressRoutePortsLOAResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get retrieves the requested ExpressRoutePort resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of ExpressRoutePort. +func (client ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePort, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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, expressRoutePortName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) GetResponder(resp *http.Response) (result ExpressRoutePort, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all the ExpressRoutePort resources in the specified subscription. +func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressRoutePortListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List") + defer func() { + sc := -1 + if result.erplr.Response.Response != nil { + sc = result.erplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure sending request") + return + } + + result.erplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure responding to request") + return + } + if result.erplr.hasNextLink() && result.erplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts", 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 ExpressRoutePortsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) ListResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRoutePortsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) { + req, err := lastResults.expressRoutePortListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "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, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRoutePortsClient) ListComplete(ctx context.Context) (result ExpressRoutePortListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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 list all the ExpressRoutePort resources in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.erplr.Response.Response != nil { + sc = result.erplr.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, "network.ExpressRoutePortsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.erplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.erplr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.erplr.hasNextLink() && result.erplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ExpressRoutePortsClient) 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 = "2021-03-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.Network/ExpressRoutePorts", 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 ExpressRoutePortsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRoutePortsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) { + req, err := lastResults.expressRoutePortListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "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, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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 +} + +// UpdateTags update ExpressRoutePort tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the ExpressRoutePort resource. +// parameters - parameters supplied to update ExpressRoutePort resource tags. +func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (result ExpressRoutePort, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, expressRoutePortName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRoutePort, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/expressrouteportslocations.go b/services/network/mgmt/2021-03-01/network/expressrouteportslocations.go new file mode 100644 index 000000000000..6852ca3b0e83 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressrouteportslocations.go @@ -0,0 +1,221 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRoutePortsLocationsClient is the network Client +type ExpressRoutePortsLocationsClient struct { + BaseClient +} + +// NewExpressRoutePortsLocationsClient creates an instance of the ExpressRoutePortsLocationsClient client. +func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePortsLocationsClient { + return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewExpressRoutePortsLocationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsLocationsClient { + return ExpressRoutePortsLocationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at +// said peering location. +// Parameters: +// locationName - name of the requested ExpressRoutePort peering location. +func (client ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string) (result ExpressRoutePortsLocation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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, locationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, locationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "locationName": autorest.Encode("path", locationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}", 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 ExpressRoutePortsLocationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsLocationsClient) GetResponder(resp *http.Response) (result ExpressRoutePortsLocation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. +// Available bandwidths can only be obtained when retrieving a specific peering location. +func (client ExpressRoutePortsLocationsClient) List(ctx context.Context) (result ExpressRoutePortsLocationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.List") + defer func() { + sc := -1 + if result.erpllr.Response.Response != nil { + sc = result.erpllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erpllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure sending request") + return + } + + result.erpllr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure responding to request") + return + } + if result.erpllr.hasNextLink() && result.erpllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations", 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 ExpressRoutePortsLocationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsLocationsClient) ListResponder(resp *http.Response) (result ExpressRoutePortsLocationListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRoutePortsLocationsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortsLocationListResult) (result ExpressRoutePortsLocationListResult, err error) { + req, err := lastResults.expressRoutePortsLocationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "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, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRoutePortsLocationsClient) ListComplete(ctx context.Context) (result ExpressRoutePortsLocationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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/network/mgmt/2021-03-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2021-03-01/network/expressrouteserviceproviders.go new file mode 100644 index 000000000000..47b7023172cb --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/expressrouteserviceproviders.go @@ -0,0 +1,145 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExpressRouteServiceProvidersClient is the network Client +type ExpressRouteServiceProvidersClient struct { + BaseClient +} + +// NewExpressRouteServiceProvidersClient creates an instance of the ExpressRouteServiceProvidersClient client. +func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteServiceProvidersClient { + return NewExpressRouteServiceProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { + return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets all the available express route service providers. +func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (result ExpressRouteServiceProviderListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.List") + defer func() { + sc := -1 + if result.ersplr.Response.Response != nil { + sc = result.ersplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ersplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure sending request") + return + } + + result.ersplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure responding to request") + return + } + if result.ersplr.hasNextLink() && result.ersplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders", 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 ExpressRouteServiceProvidersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteServiceProvidersClient) ListResponder(resp *http.Response) (result ExpressRouteServiceProviderListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteServiceProvidersClient) listNextResults(ctx context.Context, lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) { + req, err := lastResults.expressRouteServiceProviderListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "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, "network.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context) (result ExpressRouteServiceProviderListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.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/network/mgmt/2021-03-01/network/firewallpolicies.go b/services/network/mgmt/2021-03-01/network/firewallpolicies.go new file mode 100644 index 000000000000..06bb08bab384 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/firewallpolicies.go @@ -0,0 +1,522 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// FirewallPoliciesClient is the network Client +type FirewallPoliciesClient struct { + BaseClient +} + +// NewFirewallPoliciesClient creates an instance of the FirewallPoliciesClient client. +func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { + return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPoliciesClient { + return FirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Firewall Policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// parameters - parameters supplied to the create or update Firewall Policy operation. +func (client FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy) (result FirewallPoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPPort", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPPort", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPPort", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPSPort", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPSPort", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPSPort", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.PacFilePort", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.PacFilePort", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.PacFilePort", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.FirewallPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", 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 FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Firewall Policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/firewallPolicies/{firewallPolicyName}", 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 FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Firewall Policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// expand - expands referenced resources. +func (client FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (result FirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.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, firewallPolicyName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client FirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/firewallPolicies/{firewallPolicyName}", 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 FirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) GetResponder(resp *http.Response) (result FirewallPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Firewall Policies in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client FirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result FirewallPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.List") + defer func() { + sc := -1 + if result.fplr.Response.Response != nil { + sc = result.fplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.fplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.fplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.fplr.hasNextLink() && result.fplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client FirewallPoliciesClient) ListPreparer(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 = "2021-03-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.Network/firewallPolicies", 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 FirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) ListResponder(resp *http.Response) (result FirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 FirewallPoliciesClient) listNextResults(ctx context.Context, lastResults FirewallPolicyListResult) (result FirewallPolicyListResult, err error) { + req, err := lastResults.firewallPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "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, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client FirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result FirewallPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.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) + return +} + +// ListAll gets all the Firewall Policies in a subscription. +func (client FirewallPoliciesClient) ListAll(ctx context.Context) (result FirewallPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.ListAll") + defer func() { + sc := -1 + if result.fplr.Response.Response != nil { + sc = result.fplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.fplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", resp, "Failure sending request") + return + } + + result.fplr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.fplr.hasNextLink() && result.fplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client FirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) ListAllResponder(resp *http.Response) (result FirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client FirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults FirewallPolicyListResult) (result FirewallPolicyListResult, err error) { + req, err := lastResults.firewallPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client FirewallPoliciesClient) ListAllComplete(ctx context.Context) (result FirewallPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.ListAll") + 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.ListAll(ctx) + return +} diff --git a/services/network/mgmt/2021-03-01/network/firewallpolicyrulecollectiongroups.go b/services/network/mgmt/2021-03-01/network/firewallpolicyrulecollectiongroups.go new file mode 100644 index 000000000000..35772a11c1cf --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/firewallpolicyrulecollectiongroups.go @@ -0,0 +1,405 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// FirewallPolicyRuleCollectionGroupsClient is the network Client +type FirewallPolicyRuleCollectionGroupsClient struct { + BaseClient +} + +// NewFirewallPolicyRuleCollectionGroupsClient creates an instance of the FirewallPolicyRuleCollectionGroupsClient +// client. +func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string) FirewallPolicyRuleCollectionGroupsClient { + return NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI creates an instance of the +// FirewallPolicyRuleCollectionGroupsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleCollectionGroupsClient { + return FirewallPolicyRuleCollectionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified FirewallPolicyRuleCollectionGroup. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// ruleCollectionGroupName - the name of the FirewallPolicyRuleCollectionGroup. +// parameters - parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. +func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup) (result FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleCollectionGroupProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleCollectionGroupProperties.Priority", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleCollectionGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, + {Target: "parameters.FirewallPolicyRuleCollectionGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.FirewallPolicyRuleCollectionGroupsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleCollectionGroupName": autorest.Encode("path", ruleCollectionGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}", 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 FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicyRuleCollectionGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified FirewallPolicyRuleCollectionGroup. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// ruleCollectionGroupName - the name of the FirewallPolicyRuleCollectionGroup. +func (client FirewallPolicyRuleCollectionGroupsClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) (result FirewallPolicyRuleCollectionGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FirewallPolicyRuleCollectionGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleCollectionGroupName": autorest.Encode("path", ruleCollectionGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}", 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 FirewallPolicyRuleCollectionGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleCollectionGroupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleCollectionGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified FirewallPolicyRuleCollectionGroup. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// ruleCollectionGroupName - the name of the FirewallPolicyRuleCollectionGroup. +func (client FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) (result FirewallPolicyRuleCollectionGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupsClient.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, firewallPolicyName, ruleCollectionGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client FirewallPolicyRuleCollectionGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleCollectionGroupName": autorest.Encode("path", ruleCollectionGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}", 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 FirewallPolicyRuleCollectionGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleCollectionGroupsClient) GetResponder(resp *http.Response) (result FirewallPolicyRuleCollectionGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyRuleCollectionGroupsClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPolicyRuleCollectionGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupsClient.List") + defer func() { + sc := -1 + if result.fprcglr.Response.Response != nil { + sc = result.fprcglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.fprcglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "List", resp, "Failure sending request") + return + } + + result.fprcglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.fprcglr.hasNextLink() && result.fprcglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client FirewallPolicyRuleCollectionGroupsClient) ListPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups", 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 FirewallPolicyRuleCollectionGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleCollectionGroupsClient) ListResponder(resp *http.Response) (result FirewallPolicyRuleCollectionGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 FirewallPolicyRuleCollectionGroupsClient) listNextResults(ctx context.Context, lastResults FirewallPolicyRuleCollectionGroupListResult) (result FirewallPolicyRuleCollectionGroupListResult, err error) { + req, err := lastResults.firewallPolicyRuleCollectionGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "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, "network.FirewallPolicyRuleCollectionGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client FirewallPolicyRuleCollectionGroupsClient) ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPolicyRuleCollectionGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupsClient.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, firewallPolicyName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/flowlogs.go b/services/network/mgmt/2021-03-01/network/flowlogs.go new file mode 100644 index 000000000000..7eea1839b258 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/flowlogs.go @@ -0,0 +1,481 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// FlowLogsClient is the network Client +type FlowLogsClient struct { + BaseClient +} + +// NewFlowLogsClient creates an instance of the FlowLogsClient client. +func NewFlowLogsClient(subscriptionID string) FlowLogsClient { + return NewFlowLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFlowLogsClientWithBaseURI creates an instance of the FlowLogsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFlowLogsClientWithBaseURI(baseURI string, subscriptionID string) FlowLogsClient { + return FlowLogsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a flow log for the specified network security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// flowLogName - the name of the flow log. +// parameters - parameters that define the create or update flow log resource. +func (client FlowLogsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog) (result FlowLogsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FlowLogPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FlowLogPropertiesFormat.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.FlowLogPropertiesFormat.StorageID", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.FlowLogsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FlowLogsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "flowLogName": autorest.Encode("path", flowLogName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", 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 FlowLogsClient) CreateOrUpdateSender(req *http.Request) (future FlowLogsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) CreateOrUpdateResponder(resp *http.Response) (result FlowLog, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified flow log resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// flowLogName - the name of the flow log resource. +func (client FlowLogsClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) (result FlowLogsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, flowLogName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FlowLogsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "flowLogName": autorest.Encode("path", flowLogName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", 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 FlowLogsClient) DeleteSender(req *http.Request) (future FlowLogsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a flow log resource by name. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// flowLogName - the name of the flow log resource. +func (client FlowLogsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) (result FlowLog, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogsClient.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, networkWatcherName, flowLogName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client FlowLogsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "flowLogName": autorest.Encode("path", flowLogName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", 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 FlowLogsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) GetResponder(resp *http.Response) (result FlowLog, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all flow log resources for the specified Network Watcher. +// Parameters: +// resourceGroupName - the name of the resource group containing Network Watcher. +// networkWatcherName - the name of the Network Watcher resource. +func (client FlowLogsClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result FlowLogListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogsClient.List") + defer func() { + sc := -1 + if result.fllr.Response.Response != nil { + sc = result.fllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.fllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "List", resp, "Failure sending request") + return + } + + result.fllr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "List", resp, "Failure responding to request") + return + } + if result.fllr.hasNextLink() && result.fllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client FlowLogsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/flowLogs", 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 FlowLogsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) ListResponder(resp *http.Response) (result FlowLogListResult, err error) { + err = autorest.Respond( + resp, + 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 FlowLogsClient) listNextResults(ctx context.Context, lastResults FlowLogListResult) (result FlowLogListResult, err error) { + req, err := lastResults.flowLogListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.FlowLogsClient", "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, "network.FlowLogsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client FlowLogsClient) ListComplete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result FlowLogListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogsClient.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, networkWatcherName) + return +} + +// UpdateTags update tags of the specified flow log. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// flowLogName - the name of the flow log. +// parameters - parameters supplied to update flow log tags. +func (client FlowLogsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject) (result FlowLog, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client FlowLogsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "flowLogName": autorest.Encode("path", flowLogName), + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client FlowLogsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) UpdateTagsResponder(resp *http.Response) (result FlowLog, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/hubroutetables.go b/services/network/mgmt/2021-03-01/network/hubroutetables.go new file mode 100644 index 000000000000..297020e09c1b --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/hubroutetables.go @@ -0,0 +1,391 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// HubRouteTablesClient is the network Client +type HubRouteTablesClient struct { + BaseClient +} + +// NewHubRouteTablesClient creates an instance of the HubRouteTablesClient client. +func NewHubRouteTablesClient(subscriptionID string) HubRouteTablesClient { + return NewHubRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHubRouteTablesClientWithBaseURI creates an instance of the HubRouteTablesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewHubRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) HubRouteTablesClient { + return HubRouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the RouteTable. +// routeTableParameters - parameters supplied to create or update RouteTable. +func (client HubRouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable) (result HubRouteTablesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubRouteTablesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client HubRouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + routeTableParameters.Etag = nil + routeTableParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}", pathParameters), + autorest.WithJSON(routeTableParameters), + 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 HubRouteTablesClient) CreateOrUpdateSender(req *http.Request) (future HubRouteTablesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client HubRouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (result HubRouteTable, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a RouteTable. +// Parameters: +// resourceGroupName - the resource group name of the RouteTable. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the RouteTable. +func (client HubRouteTablesClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result HubRouteTablesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubRouteTablesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client HubRouteTablesClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}", 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 HubRouteTablesClient) DeleteSender(req *http.Request) (future HubRouteTablesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client HubRouteTablesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a RouteTable. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the RouteTable. +func (client HubRouteTablesClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result HubRouteTable, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubRouteTablesClient.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, virtualHubName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client HubRouteTablesClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}", 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 HubRouteTablesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HubRouteTablesClient) GetResponder(resp *http.Response) (result HubRouteTable, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all RouteTables. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client HubRouteTablesClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubRouteTablesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubRouteTablesClient.List") + defer func() { + sc := -1 + if result.lhrtr.Response.Response != nil { + sc = result.lhrtr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lhrtr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "List", resp, "Failure sending request") + return + } + + result.lhrtr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "List", resp, "Failure responding to request") + return + } + if result.lhrtr.hasNextLink() && result.lhrtr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client HubRouteTablesClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/hubRouteTables", 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 HubRouteTablesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client HubRouteTablesClient) ListResponder(resp *http.Response) (result ListHubRouteTablesResult, err error) { + err = autorest.Respond( + resp, + 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 HubRouteTablesClient) listNextResults(ctx context.Context, lastResults ListHubRouteTablesResult) (result ListHubRouteTablesResult, err error) { + req, err := lastResults.listHubRouteTablesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "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, "network.HubRouteTablesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client HubRouteTablesClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubRouteTablesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubRouteTablesClient.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, virtualHubName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2021-03-01/network/hubvirtualnetworkconnections.go new file mode 100644 index 000000000000..7031ead6540e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/hubvirtualnetworkconnections.go @@ -0,0 +1,392 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// HubVirtualNetworkConnectionsClient is the network Client +type HubVirtualNetworkConnectionsClient struct { + BaseClient +} + +// NewHubVirtualNetworkConnectionsClient creates an instance of the HubVirtualNetworkConnectionsClient client. +func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetworkConnectionsClient { + return NewHubVirtualNetworkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { + return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a hub virtual network connection if it doesn't exist else updates the existing one. +// Parameters: +// resourceGroupName - the resource group name of the HubVirtualNetworkConnection. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the HubVirtualNetworkConnection. +// hubVirtualNetworkConnectionParameters - parameters supplied to create or update a hub virtual network +// connection. +func (client HubVirtualNetworkConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection) (result HubVirtualNetworkConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client HubVirtualNetworkConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + hubVirtualNetworkConnectionParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", pathParameters), + autorest.WithJSON(hubVirtualNetworkConnectionParameters), + 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 HubVirtualNetworkConnectionsClient) CreateOrUpdateSender(req *http.Request) (future HubVirtualNetworkConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result HubVirtualNetworkConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a HubVirtualNetworkConnection. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the HubVirtualNetworkConnection. +func (client HubVirtualNetworkConnectionsClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result HubVirtualNetworkConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client HubVirtualNetworkConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", 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 HubVirtualNetworkConnectionsClient) DeleteSender(req *http.Request) (future HubVirtualNetworkConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a HubVirtualNetworkConnection. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the vpn connection. +func (client HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result HubVirtualNetworkConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, virtualHubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", 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 HubVirtualNetworkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) GetResponder(resp *http.Response) (result HubVirtualNetworkConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all HubVirtualNetworkConnections. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client HubVirtualNetworkConnectionsClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.List") + defer func() { + sc := -1 + if result.lhvncr.Response.Response != nil { + sc = result.lhvncr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lhvncr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.lhvncr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.lhvncr.hasNextLink() && result.lhvncr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections", 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 HubVirtualNetworkConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) ListResponder(resp *http.Response) (result ListHubVirtualNetworkConnectionsResult, err error) { + err = autorest.Respond( + resp, + 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 HubVirtualNetworkConnectionsClient) listNextResults(ctx context.Context, lastResults ListHubVirtualNetworkConnectionsResult) (result ListHubVirtualNetworkConnectionsResult, err error) { + req, err := lastResults.listHubVirtualNetworkConnectionsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "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, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client HubVirtualNetworkConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, virtualHubName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/inboundnatrules.go b/services/network/mgmt/2021-03-01/network/inboundnatrules.go new file mode 100644 index 000000000000..50955bdb3795 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/inboundnatrules.go @@ -0,0 +1,417 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// InboundNatRulesClient is the network Client +type InboundNatRulesClient struct { + BaseClient +} + +// NewInboundNatRulesClient creates an instance of the InboundNatRulesClient client. +func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { + return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) InboundNatRulesClient { + return InboundNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a load balancer inbound nat rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// inboundNatRuleName - the name of the inbound nat rule. +// inboundNatRuleParameters - parameters supplied to the create or update inbound nat rule operation. +func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (result InboundNatRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: inboundNatRuleParameters, + Constraints: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.InboundNatRulesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + inboundNatRuleParameters.Etag = nil + inboundNatRuleParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", pathParameters), + autorest.WithJSON(inboundNatRuleParameters), + 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 InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result InboundNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified load balancer inbound nat rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// inboundNatRuleName - the name of the inbound nat rule. +func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (result InboundNatRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", 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 InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified load balancer inbound nat rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// inboundNatRuleName - the name of the inbound nat rule. +// expand - expands referenced resources. +func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result InboundNatRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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, loadBalancerName, inboundNatRuleName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", 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 InboundNatRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) GetResponder(resp *http.Response) (result InboundNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the inbound nat rules in a load balancer. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client InboundNatRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.List") + defer func() { + sc := -1 + if result.inrlr.Response.Response != nil { + sc = result.inrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.inrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure sending request") + return + } + + result.inrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure responding to request") + return + } + if result.inrlr.hasNextLink() && result.inrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/inboundNatRules", 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 InboundNatRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) ListResponder(resp *http.Response) (result InboundNatRuleListResult, err error) { + err = autorest.Respond( + resp, + 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 InboundNatRulesClient) listNextResults(ctx context.Context, lastResults InboundNatRuleListResult) (result InboundNatRuleListResult, err error) { + req, err := lastResults.inboundNatRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "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, "network.InboundNatRulesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client InboundNatRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/inboundsecurityrule.go b/services/network/mgmt/2021-03-01/network/inboundsecurityrule.go new file mode 100644 index 000000000000..dcb06f6598b6 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/inboundsecurityrule.go @@ -0,0 +1,118 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// InboundSecurityRuleClient is the network Client +type InboundSecurityRuleClient struct { + BaseClient +} + +// NewInboundSecurityRuleClient creates an instance of the InboundSecurityRuleClient client. +func NewInboundSecurityRuleClient(subscriptionID string) InboundSecurityRuleClient { + return NewInboundSecurityRuleClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInboundSecurityRuleClientWithBaseURI creates an instance of the InboundSecurityRuleClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewInboundSecurityRuleClientWithBaseURI(baseURI string, subscriptionID string) InboundSecurityRuleClient { + return InboundSecurityRuleClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Network Virtual Appliance Inbound Security Rules. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of the Network Virtual Appliance. +// ruleCollectionName - the name of security rule collection. +// parameters - parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules +// operation. +func (client InboundSecurityRuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule) (result InboundSecurityRuleCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundSecurityRuleClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client InboundSecurityRuleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleCollectionName": autorest.Encode("path", ruleCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}", 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 InboundSecurityRuleClient) CreateOrUpdateSender(req *http.Request) (future InboundSecurityRuleCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InboundSecurityRuleClient) CreateOrUpdateResponder(resp *http.Response) (result InboundSecurityRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/interfaceipconfigurations.go b/services/network/mgmt/2021-03-01/network/interfaceipconfigurations.go new file mode 100644 index 000000000000..4f62646904d8 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/interfaceipconfigurations.go @@ -0,0 +1,228 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// InterfaceIPConfigurationsClient is the network Client +type InterfaceIPConfigurationsClient struct { + BaseClient +} + +// NewInterfaceIPConfigurationsClient creates an instance of the InterfaceIPConfigurationsClient client. +func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfigurationsClient { + return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceIPConfigurationsClient { + return InterfaceIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified network interface ip configuration. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// IPConfigurationName - the name of the ip configuration name. +func (client InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (result InterfaceIPConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.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, networkInterfaceName, IPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", 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 InterfaceIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfaceIPConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceIPConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all ip configurations in a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +func (client InterfaceIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.List") + defer func() { + sc := -1 + if result.iiclr.Response.Response != nil { + sc = result.iiclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.iiclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result.iiclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.iiclr.hasNextLink() && result.iiclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations", 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 InterfaceIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceIPConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + 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 InterfaceIPConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) { + req, err := lastResults.interfaceIPConfigurationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "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, "network.InterfaceIPConfigurationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfaceIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.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, networkInterfaceName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/interfaceloadbalancers.go b/services/network/mgmt/2021-03-01/network/interfaceloadbalancers.go new file mode 100644 index 000000000000..ce257f4a209d --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/interfaceloadbalancers.go @@ -0,0 +1,150 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// InterfaceLoadBalancersClient is the network Client +type InterfaceLoadBalancersClient struct { + BaseClient +} + +// NewInterfaceLoadBalancersClient creates an instance of the InterfaceLoadBalancersClient client. +func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalancersClient { + return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { + return InterfaceLoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list all load balancers in a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +func (client InterfaceLoadBalancersClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancersClient.List") + defer func() { + sc := -1 + if result.ilblr.Response.Response != nil { + sc = result.ilblr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ilblr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure sending request") + return + } + + result.ilblr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure responding to request") + return + } + if result.ilblr.hasNextLink() && result.ilblr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/loadBalancers", 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 InterfaceLoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceLoadBalancersClient) ListResponder(resp *http.Response) (result InterfaceLoadBalancerListResult, err error) { + err = autorest.Respond( + resp, + 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 InterfaceLoadBalancersClient) listNextResults(ctx context.Context, lastResults InterfaceLoadBalancerListResult) (result InterfaceLoadBalancerListResult, err error) { + req, err := lastResults.interfaceLoadBalancerListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "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, "network.InterfaceLoadBalancersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfaceLoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancersClient.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, networkInterfaceName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/interfacesgroup.go b/services/network/mgmt/2021-03-01/network/interfacesgroup.go new file mode 100644 index 000000000000..36852b781113 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/interfacesgroup.go @@ -0,0 +1,1594 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// InterfacesClient is the network Client +type InterfacesClient struct { + BaseClient +} + +// NewInterfacesClient creates an instance of the InterfacesClient client. +func NewInterfacesClient(subscriptionID string) InterfacesClient { + return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { + return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// parameters - parameters supplied to the create or update network interface operation. +func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (result InterfacesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", 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 InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}", 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 InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InterfacesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// expand - expands referenced resources. +func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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, networkInterfaceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/networkInterfaces/{networkInterfaceName}", 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 InterfacesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfacesClient) GetResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCloudServiceNetworkInterface get the specified network interface in a cloud service. +// Parameters: +// resourceGroupName - the name of the resource group. +// cloudServiceName - the name of the cloud service. +// roleInstanceName - the name of role instance. +// networkInterfaceName - the name of the network interface. +// expand - expands referenced resources. +func (client InterfacesClient) GetCloudServiceNetworkInterface(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, expand string) (result Interface, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetCloudServiceNetworkInterface") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetCloudServiceNetworkInterfacePreparer(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetCloudServiceNetworkInterface", nil, "Failure preparing request") + return + } + + resp, err := client.GetCloudServiceNetworkInterfaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetCloudServiceNetworkInterface", resp, "Failure sending request") + return + } + + result, err = client.GetCloudServiceNetworkInterfaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetCloudServiceNetworkInterface", resp, "Failure responding to request") + return + } + + return +} + +// GetCloudServiceNetworkInterfacePreparer prepares the GetCloudServiceNetworkInterface request. +func (client InterfacesClient) GetCloudServiceNetworkInterfacePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCloudServiceNetworkInterfaceSender sends the GetCloudServiceNetworkInterface request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) GetCloudServiceNetworkInterfaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetCloudServiceNetworkInterfaceResponder handles the response to the GetCloudServiceNetworkInterface request. The method always +// closes the http.Response Body. +func (client InterfacesClient) GetCloudServiceNetworkInterfaceResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetEffectiveRouteTable gets all route tables applied to a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesGetEffectiveRouteTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetEffectiveRouteTable") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetEffectiveRouteTablePreparer(ctx, resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure preparing request") + return + } + + result, err = client.GetEffectiveRouteTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure sending request") + return + } + + return +} + +// GetEffectiveRouteTablePreparer prepares the GetEffectiveRouteTable request. +func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetEffectiveRouteTableResponder handles the response to the GetEffectiveRouteTable request. The method always +// closes the http.Response Body. +func (client InterfacesClient) GetEffectiveRouteTableResponder(resp *http.Response) (result EffectiveRouteListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVirtualMachineScaleSetIPConfiguration get the specified network interface ip configuration in a virtual machine +// scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +// virtualmachineIndex - the virtual machine index. +// networkInterfaceName - the name of the network interface. +// IPConfigurationName - the name of the ip configuration. +// expand - expands referenced resources. +func (client InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (result InterfaceIPConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetIPConfiguration") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVirtualMachineScaleSetIPConfigurationPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.GetVirtualMachineScaleSetIPConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure sending request") + return + } + + result, err = client.GetVirtualMachineScaleSetIPConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure responding to request") + return + } + + return +} + +// GetVirtualMachineScaleSetIPConfigurationPreparer prepares the GetVirtualMachineScaleSetIPConfiguration request. +func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-01" + 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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVirtualMachineScaleSetIPConfigurationSender sends the GetVirtualMachineScaleSetIPConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetVirtualMachineScaleSetIPConfigurationResponder handles the response to the GetVirtualMachineScaleSetIPConfiguration request. The method always +// closes the http.Response Body. +func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationResponder(resp *http.Response) (result InterfaceIPConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVirtualMachineScaleSetNetworkInterface get the specified network interface in a virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +// virtualmachineIndex - the virtual machine index. +// networkInterfaceName - the name of the network interface. +// expand - expands referenced resources. +func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetNetworkInterface") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", nil, "Failure preparing request") + return + } + + resp, err := client.GetVirtualMachineScaleSetNetworkInterfaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure sending request") + return + } + + result, err = client.GetVirtualMachineScaleSetNetworkInterfaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure responding to request") + return + } + + return +} + +// GetVirtualMachineScaleSetNetworkInterfacePreparer prepares the GetVirtualMachineScaleSetNetworkInterface request. +func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-01" + 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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always +// closes the http.Response Body. +func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all network interfaces in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client InterfacesClient) List(ctx context.Context, resourceGroupName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.List") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client InterfacesClient) ListPreparer(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 = "2021-03-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.Network/networkInterfaces", 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 InterfacesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + 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 InterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "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, "network.InterfacesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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) + return +} + +// ListAll gets all network interfaces in a subscription. +func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListAllResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client InterfacesClient) listAllNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListAllComplete(ctx context.Context) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListCloudServiceNetworkInterfaces gets all network interfaces in a cloud service. +// Parameters: +// resourceGroupName - the name of the resource group. +// cloudServiceName - the name of the cloud service. +func (client InterfacesClient) ListCloudServiceNetworkInterfaces(ctx context.Context, resourceGroupName string, cloudServiceName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListCloudServiceNetworkInterfaces") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listCloudServiceNetworkInterfacesNextResults + req, err := client.ListCloudServiceNetworkInterfacesPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListCloudServiceNetworkInterfaces", nil, "Failure preparing request") + return + } + + resp, err := client.ListCloudServiceNetworkInterfacesSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListCloudServiceNetworkInterfaces", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListCloudServiceNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListCloudServiceNetworkInterfaces", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListCloudServiceNetworkInterfacesPreparer prepares the ListCloudServiceNetworkInterfaces request. +func (client InterfacesClient) ListCloudServiceNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/networkInterfaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCloudServiceNetworkInterfacesSender sends the ListCloudServiceNetworkInterfaces request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListCloudServiceNetworkInterfacesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListCloudServiceNetworkInterfacesResponder handles the response to the ListCloudServiceNetworkInterfaces request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListCloudServiceNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listCloudServiceNetworkInterfacesNextResults retrieves the next set of results, if any. +func (client InterfacesClient) listCloudServiceNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listCloudServiceNetworkInterfacesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListCloudServiceNetworkInterfacesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listCloudServiceNetworkInterfacesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListCloudServiceNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listCloudServiceNetworkInterfacesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListCloudServiceNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListCloudServiceNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListCloudServiceNetworkInterfaces") + 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.ListCloudServiceNetworkInterfaces(ctx, resourceGroupName, cloudServiceName) + return +} + +// ListCloudServiceRoleInstanceNetworkInterfaces gets information about all network interfaces in a role instance in a +// cloud service. +// Parameters: +// resourceGroupName - the name of the resource group. +// cloudServiceName - the name of the cloud service. +// roleInstanceName - the name of role instance. +func (client InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfaces(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listCloudServiceRoleInstanceNetworkInterfacesNextResults + req, err := client.ListCloudServiceRoleInstanceNetworkInterfacesPreparer(ctx, resourceGroupName, cloudServiceName, roleInstanceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListCloudServiceRoleInstanceNetworkInterfaces", nil, "Failure preparing request") + return + } + + resp, err := client.ListCloudServiceRoleInstanceNetworkInterfacesSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListCloudServiceRoleInstanceNetworkInterfaces", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListCloudServiceRoleInstanceNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListCloudServiceRoleInstanceNetworkInterfaces", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListCloudServiceRoleInstanceNetworkInterfacesPreparer prepares the ListCloudServiceRoleInstanceNetworkInterfaces request. +func (client InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCloudServiceRoleInstanceNetworkInterfacesSender sends the ListCloudServiceRoleInstanceNetworkInterfaces request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListCloudServiceRoleInstanceNetworkInterfacesResponder handles the response to the ListCloudServiceRoleInstanceNetworkInterfaces request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listCloudServiceRoleInstanceNetworkInterfacesNextResults retrieves the next set of results, if any. +func (client InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listCloudServiceRoleInstanceNetworkInterfacesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListCloudServiceRoleInstanceNetworkInterfacesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listCloudServiceRoleInstanceNetworkInterfacesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListCloudServiceRoleInstanceNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listCloudServiceRoleInstanceNetworkInterfacesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListCloudServiceRoleInstanceNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces") + 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.ListCloudServiceRoleInstanceNetworkInterfaces(ctx, resourceGroupName, cloudServiceName, roleInstanceName) + return +} + +// ListEffectiveNetworkSecurityGroups gets all network security groups applied to a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListEffectiveNetworkSecurityGroups") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListEffectiveNetworkSecurityGroupsPreparer(ctx, resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure preparing request") + return + } + + result, err = client.ListEffectiveNetworkSecurityGroupsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure sending request") + return + } + + return +} + +// ListEffectiveNetworkSecurityGroupsPreparer prepares the ListEffectiveNetworkSecurityGroups request. +func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListEffectiveNetworkSecurityGroupsResponder handles the response to the ListEffectiveNetworkSecurityGroups request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp *http.Response) (result EffectiveNetworkSecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListVirtualMachineScaleSetIPConfigurations get the specified network interface ip configuration in a virtual machine +// scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +// virtualmachineIndex - the virtual machine index. +// networkInterfaceName - the name of the network interface. +// expand - expands referenced resources. +func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetIPConfigurations") + defer func() { + sc := -1 + if result.iiclr.Response.Response != nil { + sc = result.iiclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listVirtualMachineScaleSetIPConfigurationsNextResults + req, err := client.ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetIPConfigurationsSender(req) + if err != nil { + result.iiclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure sending request") + return + } + + result.iiclr, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure responding to request") + return + } + if result.iiclr.hasNextLink() && result.iiclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListVirtualMachineScaleSetIPConfigurationsPreparer prepares the ListVirtualMachineScaleSetIPConfigurations request. +func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-01" + 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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVirtualMachineScaleSetIPConfigurationsSender sends the ListVirtualMachineScaleSetIPConfigurations request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVirtualMachineScaleSetIPConfigurationsResponder handles the response to the ListVirtualMachineScaleSetIPConfigurations request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsResponder(resp *http.Response) (result InterfaceIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listVirtualMachineScaleSetIPConfigurationsNextResults retrieves the next set of results, if any. +func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextResults(ctx context.Context, lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) { + req, err := lastResults.interfaceIPConfigurationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListVirtualMachineScaleSetIPConfigurationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListVirtualMachineScaleSetIPConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetIPConfigurations") + 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.ListVirtualMachineScaleSetIPConfigurations(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + return +} + +// ListVirtualMachineScaleSetNetworkInterfaces gets all network interfaces in a virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listVirtualMachineScaleSetNetworkInterfacesNextResults + req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListVirtualMachineScaleSetNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetNetworkInterfaces request. +func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listVirtualMachineScaleSetNetworkInterfacesNextResults retrieves the next set of results, if any. +func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListVirtualMachineScaleSetNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces") + 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.ListVirtualMachineScaleSetNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName) + return +} + +// ListVirtualMachineScaleSetVMNetworkInterfaces gets information about all network interfaces in a virtual machine in +// a virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +// virtualmachineIndex - the virtual machine index. +func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listVirtualMachineScaleSetVMNetworkInterfacesNextResults + req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListVirtualMachineScaleSetVMNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetVMNetworkInterfaces request. +func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listVirtualMachineScaleSetVMNetworkInterfacesNextResults retrieves the next set of results, if any. +func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListVirtualMachineScaleSetVMNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces") + 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.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) + return +} + +// UpdateTags updates a network interface tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// parameters - parameters supplied to update network interface tags. +func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (result Interface, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkInterfaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client InterfacesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client InterfacesClient) UpdateTagsResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/interfacetapconfigurations.go b/services/network/mgmt/2021-03-01/network/interfacetapconfigurations.go new file mode 100644 index 000000000000..2a60ccca9e1b --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/interfacetapconfigurations.go @@ -0,0 +1,432 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// InterfaceTapConfigurationsClient is the network Client +type InterfaceTapConfigurationsClient struct { + BaseClient +} + +// NewInterfaceTapConfigurationsClient creates an instance of the InterfaceTapConfigurationsClient client. +func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConfigurationsClient { + return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewInterfaceTapConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceTapConfigurationsClient { + return InterfaceTapConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Tap configuration in the specified NetworkInterface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// tapConfigurationName - the name of the tap configuration. +// tapConfigurationParameters - parameters supplied to the create or update tap configuration operation. +func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (result InterfaceTapConfigurationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: tapConfigurationParameters, + Constraints: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, + }}, + }}, + }}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, + }}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.InterfaceTapConfigurationsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapConfigurationName": autorest.Encode("path", tapConfigurationName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + tapConfigurationParameters.Etag = nil + tapConfigurationParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", pathParameters), + autorest.WithJSON(tapConfigurationParameters), + 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 InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result InterfaceTapConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified tap configuration from the NetworkInterface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// tapConfigurationName - the name of the tap configuration. +func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfigurationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapConfigurationName": autorest.Encode("path", tapConfigurationName), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", 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 InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the specified tap configuration on a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +// tapConfigurationName - the name of the tap configuration. +func (client InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, networkInterfaceName, tapConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapConfigurationName": autorest.Encode("path", tapConfigurationName), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", 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 InterfaceTapConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceTapConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all Tap configurations in a network interface. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkInterfaceName - the name of the network interface. +func (client InterfaceTapConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.List") + defer func() { + sc := -1 + if result.itclr.Response.Response != nil { + sc = result.itclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.itclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result.itclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.itclr.hasNextLink() && result.itclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations", 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 InterfaceTapConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceTapConfigurationListResult, err error) { + err = autorest.Respond( + resp, + 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 InterfaceTapConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceTapConfigurationListResult) (result InterfaceTapConfigurationListResult, err error) { + req, err := lastResults.interfaceTapConfigurationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "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, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client InterfaceTapConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, networkInterfaceName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/ipallocations.go b/services/network/mgmt/2021-03-01/network/ipallocations.go new file mode 100644 index 000000000000..d43f5777bd0e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/ipallocations.go @@ -0,0 +1,578 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IPAllocationsClient is the network Client +type IPAllocationsClient struct { + BaseClient +} + +// NewIPAllocationsClient creates an instance of the IPAllocationsClient client. +func NewIPAllocationsClient(subscriptionID string) IPAllocationsClient { + return NewIPAllocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIPAllocationsClientWithBaseURI creates an instance of the IPAllocationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIPAllocationsClientWithBaseURI(baseURI string, subscriptionID string) IPAllocationsClient { + return IPAllocationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an IpAllocation in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPAllocationName - the name of the IpAllocation. +// parameters - parameters supplied to the create or update virtual network operation. +func (client IPAllocationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, IPAllocationName string, parameters IPAllocation) (result IPAllocationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, IPAllocationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client IPAllocationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, IPAllocationName string, parameters IPAllocation) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipAllocationName": autorest.Encode("path", IPAllocationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}", 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 IPAllocationsClient) CreateOrUpdateSender(req *http.Request) (future IPAllocationsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client IPAllocationsClient) CreateOrUpdateResponder(resp *http.Response) (result IPAllocation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified IpAllocation. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPAllocationName - the name of the IpAllocation. +func (client IPAllocationsClient) Delete(ctx context.Context, resourceGroupName string, IPAllocationName string) (result IPAllocationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, IPAllocationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IPAllocationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, IPAllocationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipAllocationName": autorest.Encode("path", IPAllocationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/IpAllocations/{ipAllocationName}", 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 IPAllocationsClient) DeleteSender(req *http.Request) (future IPAllocationsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IPAllocationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified IpAllocation by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPAllocationName - the name of the IpAllocation. +// expand - expands referenced resources. +func (client IPAllocationsClient) Get(ctx context.Context, resourceGroupName string, IPAllocationName string, expand string) (result IPAllocation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.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, IPAllocationName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IPAllocationsClient) GetPreparer(ctx context.Context, resourceGroupName string, IPAllocationName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipAllocationName": autorest.Encode("path", IPAllocationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/IpAllocations/{ipAllocationName}", 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 IPAllocationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IPAllocationsClient) GetResponder(resp *http.Response) (result IPAllocation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all IpAllocations in a subscription. +func (client IPAllocationsClient) List(ctx context.Context) (result IPAllocationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.List") + defer func() { + sc := -1 + if result.ialr.Response.Response != nil { + sc = result.ialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "List", resp, "Failure sending request") + return + } + + result.ialr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "List", resp, "Failure responding to request") + return + } + if result.ialr.hasNextLink() && result.ialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IPAllocationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations", 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 IPAllocationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IPAllocationsClient) ListResponder(resp *http.Response) (result IPAllocationListResult, err error) { + err = autorest.Respond( + resp, + 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 IPAllocationsClient) listNextResults(ctx context.Context, lastResults IPAllocationListResult) (result IPAllocationListResult, err error) { + req, err := lastResults.iPAllocationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.IPAllocationsClient", "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, "network.IPAllocationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPAllocationsClient) ListComplete(ctx context.Context) (result IPAllocationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.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 IpAllocations in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client IPAllocationsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result IPAllocationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ialr.Response.Response != nil { + sc = result.ialr.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, "network.IPAllocationsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ialr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ialr.hasNextLink() && result.ialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client IPAllocationsClient) 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 = "2021-03-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.Network/IpAllocations", 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 IPAllocationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client IPAllocationsClient) ListByResourceGroupResponder(resp *http.Response) (result IPAllocationListResult, err error) { + err = autorest.Respond( + resp, + 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 IPAllocationsClient) listByResourceGroupNextResults(ctx context.Context, lastResults IPAllocationListResult) (result IPAllocationListResult, err error) { + req, err := lastResults.iPAllocationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.IPAllocationsClient", "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, "network.IPAllocationsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPAllocationsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result IPAllocationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.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 +} + +// UpdateTags updates a IpAllocation tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPAllocationName - the name of the IpAllocation. +// parameters - parameters supplied to update IpAllocation tags. +func (client IPAllocationsClient) UpdateTags(ctx context.Context, resourceGroupName string, IPAllocationName string, parameters TagsObject) (result IPAllocation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, IPAllocationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client IPAllocationsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, IPAllocationName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipAllocationName": autorest.Encode("path", IPAllocationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/IpAllocations/{ipAllocationName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client IPAllocationsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client IPAllocationsClient) UpdateTagsResponder(resp *http.Response) (result IPAllocation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/ipgroups.go b/services/network/mgmt/2021-03-01/network/ipgroups.go new file mode 100644 index 000000000000..0c5cf486f337 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/ipgroups.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IPGroupsClient is the network Client +type IPGroupsClient struct { + BaseClient +} + +// NewIPGroupsClient creates an instance of the IPGroupsClient client. +func NewIPGroupsClient(subscriptionID string) IPGroupsClient { + return NewIPGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIPGroupsClientWithBaseURI creates an instance of the IPGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIPGroupsClientWithBaseURI(baseURI string, subscriptionID string) IPGroupsClient { + return IPGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an ipGroups in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPGroupsName - the name of the ipGroups. +// parameters - parameters supplied to the create or update IpGroups operation. +func (client IPGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters IPGroup) (result IPGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, IPGroupsName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client IPGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters IPGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipGroupsName": autorest.Encode("path", IPGroupsName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", 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 IPGroupsClient) CreateOrUpdateSender(req *http.Request) (future IPGroupsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified ipGroups. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPGroupsName - the name of the ipGroups. +func (client IPGroupsClient) Delete(ctx context.Context, resourceGroupName string, IPGroupsName string) (result IPGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, IPGroupsName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IPGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, IPGroupsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipGroupsName": autorest.Encode("path", IPGroupsName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ipGroups/{ipGroupsName}", 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 IPGroupsClient) DeleteSender(req *http.Request) (future IPGroupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified ipGroups. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPGroupsName - the name of the ipGroups. +// expand - expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups +// resource. +func (client IPGroupsClient) Get(ctx context.Context, resourceGroupName string, IPGroupsName string, expand string) (result IPGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.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, IPGroupsName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IPGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, IPGroupsName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipGroupsName": autorest.Encode("path", IPGroupsName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/ipGroups/{ipGroupsName}", 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 IPGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) GetResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all IpGroups in a subscription. +func (client IPGroupsClient) List(ctx context.Context) (result IPGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.List") + defer func() { + sc := -1 + if result.iglr.Response.Response != nil { + sc = result.iglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.iglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", resp, "Failure sending request") + return + } + + result.iglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.iglr.hasNextLink() && result.iglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IPGroupsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups", 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 IPGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) ListResponder(resp *http.Response) (result IPGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 IPGroupsClient) listNextResults(ctx context.Context, lastResults IPGroupListResult) (result IPGroupListResult, err error) { + req, err := lastResults.iPGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.IPGroupsClient", "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, "network.IPGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPGroupsClient) ListComplete(ctx context.Context) (result IPGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.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 IpGroups in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client IPGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result IPGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.iglr.Response.Response != nil { + sc = result.iglr.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, "network.IPGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.iglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.iglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.iglr.hasNextLink() && result.iglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client IPGroupsClient) 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 = "2021-03-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.Network/ipGroups", 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 IPGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result IPGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 IPGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults IPGroupListResult) (result IPGroupListResult, err error) { + req, err := lastResults.iPGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.IPGroupsClient", "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, "network.IPGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result IPGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.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 +} + +// UpdateGroups updates tags of an IpGroups resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPGroupsName - the name of the ipGroups. +// parameters - parameters supplied to the update ipGroups operation. +func (client IPGroupsClient) UpdateGroups(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters TagsObject) (result IPGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.UpdateGroups") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateGroupsPreparer(ctx, resourceGroupName, IPGroupsName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateGroupsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", resp, "Failure sending request") + return + } + + result, err = client.UpdateGroupsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", resp, "Failure responding to request") + return + } + + return +} + +// UpdateGroupsPreparer prepares the UpdateGroups request. +func (client IPGroupsClient) UpdateGroupsPreparer(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipGroupsName": autorest.Encode("path", IPGroupsName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/ipGroups/{ipGroupsName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateGroupsSender sends the UpdateGroups request. The method will close the +// http.Response Body if it receives an error. +func (client IPGroupsClient) UpdateGroupsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateGroupsResponder handles the response to the UpdateGroups request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) UpdateGroupsResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2021-03-01/network/loadbalancerbackendaddresspools.go new file mode 100644 index 000000000000..ea7d0211c714 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalancerbackendaddresspools.go @@ -0,0 +1,392 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancerBackendAddressPoolsClient is the network Client +type LoadBalancerBackendAddressPoolsClient struct { + BaseClient +} + +// NewLoadBalancerBackendAddressPoolsClient creates an instance of the LoadBalancerBackendAddressPoolsClient client. +func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalancerBackendAddressPoolsClient { + return NewLoadBalancerBackendAddressPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { + return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a load balancer backend address pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// backendAddressPoolName - the name of the backend address pool. +// parameters - parameters supplied to the create or update load balancer backend address pool operation. +func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool) (result LoadBalancerBackendAddressPoolsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backendAddressPoolName": autorest.Encode("path", backendAddressPoolName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", 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 LoadBalancerBackendAddressPoolsClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancerBackendAddressPoolsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result BackendAddressPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified load balancer backend address pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// backendAddressPoolName - the name of the backend address pool. +func (client LoadBalancerBackendAddressPoolsClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result LoadBalancerBackendAddressPoolsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client LoadBalancerBackendAddressPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backendAddressPoolName": autorest.Encode("path", backendAddressPoolName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", 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 LoadBalancerBackendAddressPoolsClient) DeleteSender(req *http.Request) (future LoadBalancerBackendAddressPoolsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets load balancer backend address pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// backendAddressPoolName - the name of the backend address pool. +func (client LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result BackendAddressPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.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, loadBalancerName, backendAddressPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backendAddressPoolName": autorest.Encode("path", backendAddressPoolName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", 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 LoadBalancerBackendAddressPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) GetResponder(resp *http.Response) (result BackendAddressPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancer backed address pools. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancerBackendAddressPoolsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.List") + defer func() { + sc := -1 + if result.lbbaplr.Response.Response != nil { + sc = result.lbbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lbbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure sending request") + return + } + + result.lbbaplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure responding to request") + return + } + if result.lbbaplr.hasNextLink() && result.lbbaplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/backendAddressPools", 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 LoadBalancerBackendAddressPoolsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) ListResponder(resp *http.Response) (result LoadBalancerBackendAddressPoolListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancerBackendAddressPoolsClient) listNextResults(ctx context.Context, lastResults LoadBalancerBackendAddressPoolListResult) (result LoadBalancerBackendAddressPoolListResult, err error) { + req, err := lastResults.loadBalancerBackendAddressPoolListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "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, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancerBackendAddressPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2021-03-01/network/loadbalancerfrontendipconfigurations.go new file mode 100644 index 000000000000..ebc5943b4a8a --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalancerfrontendipconfigurations.go @@ -0,0 +1,229 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancerFrontendIPConfigurationsClient is the network Client +type LoadBalancerFrontendIPConfigurationsClient struct { + BaseClient +} + +// NewLoadBalancerFrontendIPConfigurationsClient creates an instance of the LoadBalancerFrontendIPConfigurationsClient +// client. +func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { + return NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the +// LoadBalancerFrontendIPConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { + return LoadBalancerFrontendIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets load balancer frontend IP configuration. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// frontendIPConfigurationName - the name of the frontend IP configuration. +func (client LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (result FrontendIPConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.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, loadBalancerName, frontendIPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontendIPConfigurationName": autorest.Encode("path", frontendIPConfigurationName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}", 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 LoadBalancerFrontendIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerFrontendIPConfigurationsClient) GetResponder(resp *http.Response) (result FrontendIPConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancer frontend IP configurations. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancerFrontendIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.List") + defer func() { + sc := -1 + if result.lbficlr.Response.Response != nil { + sc = result.lbficlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lbficlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result.lbficlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.lbficlr.hasNextLink() && result.lbficlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations", 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 LoadBalancerFrontendIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerFrontendIPConfigurationsClient) ListResponder(resp *http.Response) (result LoadBalancerFrontendIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancerFrontendIPConfigurationsClient) listNextResults(ctx context.Context, lastResults LoadBalancerFrontendIPConfigurationListResult) (result LoadBalancerFrontendIPConfigurationListResult, err error) { + req, err := lastResults.loadBalancerFrontendIPConfigurationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "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, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancerFrontendIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2021-03-01/network/loadbalancerloadbalancingrules.go new file mode 100644 index 000000000000..f4203df57017 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalancerloadbalancingrules.go @@ -0,0 +1,228 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancerLoadBalancingRulesClient is the network Client +type LoadBalancerLoadBalancingRulesClient struct { + BaseClient +} + +// NewLoadBalancerLoadBalancingRulesClient creates an instance of the LoadBalancerLoadBalancingRulesClient client. +func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancerLoadBalancingRulesClient { + return NewLoadBalancerLoadBalancingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { + return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified load balancer load balancing rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// loadBalancingRuleName - the name of the load balancing rule. +func (client LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (result LoadBalancingRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.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, loadBalancerName, loadBalancingRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "loadBalancingRuleName": autorest.Encode("path", loadBalancingRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}", 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 LoadBalancerLoadBalancingRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerLoadBalancingRulesClient) GetResponder(resp *http.Response) (result LoadBalancingRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancing rules in a load balancer. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancerLoadBalancingRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.List") + defer func() { + sc := -1 + if result.lblbrlr.Response.Response != nil { + sc = result.lblbrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lblbrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure sending request") + return + } + + result.lblbrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure responding to request") + return + } + if result.lblbrlr.hasNextLink() && result.lblbrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/loadBalancingRules", 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 LoadBalancerLoadBalancingRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerLoadBalancingRulesClient) ListResponder(resp *http.Response) (result LoadBalancerLoadBalancingRuleListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancerLoadBalancingRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerLoadBalancingRuleListResult) (result LoadBalancerLoadBalancingRuleListResult, err error) { + req, err := lastResults.loadBalancerLoadBalancingRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "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, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancerLoadBalancingRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2021-03-01/network/loadbalancernetworkinterfaces.go new file mode 100644 index 000000000000..b87da87d69c8 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalancernetworkinterfaces.go @@ -0,0 +1,150 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancerNetworkInterfacesClient is the network Client +type LoadBalancerNetworkInterfacesClient struct { + BaseClient +} + +// NewLoadBalancerNetworkInterfacesClient creates an instance of the LoadBalancerNetworkInterfacesClient client. +func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerNetworkInterfacesClient { + return NewLoadBalancerNetworkInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { + return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets associated load balancer network interfaces. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancerNetworkInterfacesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerNetworkInterfacesClient.List") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure sending request") + return + } + + result.ilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/networkInterfaces", 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 LoadBalancerNetworkInterfacesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerNetworkInterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancerNetworkInterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "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, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancerNetworkInterfacesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerNetworkInterfacesClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2021-03-01/network/loadbalanceroutboundrules.go new file mode 100644 index 000000000000..5d6ac1f602e9 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalanceroutboundrules.go @@ -0,0 +1,228 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancerOutboundRulesClient is the network Client +type LoadBalancerOutboundRulesClient struct { + BaseClient +} + +// NewLoadBalancerOutboundRulesClient creates an instance of the LoadBalancerOutboundRulesClient client. +func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutboundRulesClient { + return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewLoadBalancerOutboundRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerOutboundRulesClient { + return LoadBalancerOutboundRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified load balancer outbound rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// outboundRuleName - the name of the outbound rule. +func (client LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (result OutboundRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, loadBalancerName, outboundRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "outboundRuleName": autorest.Encode("path", outboundRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}", 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 LoadBalancerOutboundRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerOutboundRulesClient) GetResponder(resp *http.Response) (result OutboundRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the outbound rules in a load balancer. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancerOutboundRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.List") + defer func() { + sc := -1 + if result.lborlr.Response.Response != nil { + sc = result.lborlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lborlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure sending request") + return + } + + result.lborlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure responding to request") + return + } + if result.lborlr.hasNextLink() && result.lborlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/outboundRules", 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 LoadBalancerOutboundRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerOutboundRulesClient) ListResponder(resp *http.Response) (result LoadBalancerOutboundRuleListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancerOutboundRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerOutboundRuleListResult) (result LoadBalancerOutboundRuleListResult, err error) { + req, err := lastResults.loadBalancerOutboundRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "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, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancerOutboundRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalancerprobes.go b/services/network/mgmt/2021-03-01/network/loadbalancerprobes.go new file mode 100644 index 000000000000..401254152cc2 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalancerprobes.go @@ -0,0 +1,228 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancerProbesClient is the network Client +type LoadBalancerProbesClient struct { + BaseClient +} + +// NewLoadBalancerProbesClient creates an instance of the LoadBalancerProbesClient client. +func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient { + return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerProbesClient { + return LoadBalancerProbesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets load balancer probe. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// probeName - the name of the probe. +func (client LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (result Probe, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.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, loadBalancerName, probeName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "probeName": autorest.Encode("path", probeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/probes/{probeName}", 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 LoadBalancerProbesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerProbesClient) GetResponder(resp *http.Response) (result Probe, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancer probes. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancerProbesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.List") + defer func() { + sc := -1 + if result.lbplr.Response.Response != nil { + sc = result.lbplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lbplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure sending request") + return + } + + result.lbplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure responding to request") + return + } + if result.lbplr.hasNextLink() && result.lbplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}/probes", 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 LoadBalancerProbesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerProbesClient) ListResponder(resp *http.Response) (result LoadBalancerProbeListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancerProbesClient) listNextResults(ctx context.Context, lastResults LoadBalancerProbeListResult) (result LoadBalancerProbeListResult, err error) { + req, err := lastResults.loadBalancerProbeListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "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, "network.LoadBalancerProbesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancerProbesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.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, loadBalancerName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/loadbalancers.go b/services/network/mgmt/2021-03-01/network/loadbalancers.go new file mode 100644 index 000000000000..ce4eb0cec82f --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/loadbalancers.go @@ -0,0 +1,656 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LoadBalancersClient is the network Client +type LoadBalancersClient struct { + BaseClient +} + +// NewLoadBalancersClient creates an instance of the LoadBalancersClient client. +func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { + return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient { + return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a load balancer. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// parameters - parameters supplied to the create or update load balancer operation. +func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (result LoadBalancersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", 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 LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) (result LoadBalancer, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified load balancer. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}", 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 LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified load balancer. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// expand - expands referenced resources. +func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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, loadBalancerName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/loadBalancers/{loadBalancerName}", 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 LoadBalancersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) GetResponder(resp *http.Response) (result LoadBalancer, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancers in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.List") + defer func() { + sc := -1 + if result.lblr.Response.Response != nil { + sc = result.lblr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lblr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure sending request") + return + } + + result.lblr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure responding to request") + return + } + if result.lblr.hasNextLink() && result.lblr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancersClient) ListPreparer(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 = "2021-03-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.Network/loadBalancers", 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 LoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) ListResponder(resp *http.Response) (result LoadBalancerListResult, err error) { + err = autorest.Respond( + resp, + 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 LoadBalancersClient) listNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { + req, err := lastResults.loadBalancerListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "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, "network.LoadBalancersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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) + return +} + +// ListAll gets all the load balancers in a subscription. +func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalancerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll") + defer func() { + sc := -1 + if result.lblr.Response.Response != nil { + sc = result.lblr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.lblr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure sending request") + return + } + + result.lblr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure responding to request") + return + } + if result.lblr.hasNextLink() && result.lblr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancersClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) ListAllResponder(resp *http.Response) (result LoadBalancerListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client LoadBalancersClient) listAllNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { + req, err := lastResults.loadBalancerListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result LoadBalancerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll") + 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.ListAll(ctx) + return +} + +// SwapPublicIPAddresses swaps VIPs between two load balancers. +// Parameters: +// location - the region where load balancers are located at. +// parameters - parameters that define which VIPs should be swapped. +func (client LoadBalancersClient) SwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest) (result LoadBalancersSwapPublicIPAddressesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.SwapPublicIPAddresses") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SwapPublicIPAddressesPreparer(ctx, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "SwapPublicIPAddresses", nil, "Failure preparing request") + return + } + + result, err = client.SwapPublicIPAddressesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "SwapPublicIPAddresses", nil, "Failure sending request") + return + } + + return +} + +// SwapPublicIPAddressesPreparer prepares the SwapPublicIPAddresses request. +func (client LoadBalancersClient) SwapPublicIPAddressesPreparer(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SwapPublicIPAddressesSender sends the SwapPublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancersClient) SwapPublicIPAddressesSender(req *http.Request) (future LoadBalancersSwapPublicIPAddressesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// SwapPublicIPAddressesResponder handles the response to the SwapPublicIPAddresses request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) SwapPublicIPAddressesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateTags updates a load balancer tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// parameters - parameters supplied to update load balancer tags. +func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (result LoadBalancer, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, loadBalancerName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/loadBalancers/{loadBalancerName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) UpdateTagsResponder(resp *http.Response) (result LoadBalancer, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/localnetworkgateways.go b/services/network/mgmt/2021-03-01/network/localnetworkgateways.go new file mode 100644 index 000000000000..e94589204b54 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/localnetworkgateways.go @@ -0,0 +1,496 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LocalNetworkGatewaysClient is the network Client +type LocalNetworkGatewaysClient struct { + BaseClient +} + +// NewLocalNetworkGatewaysClient creates an instance of the LocalNetworkGatewaysClient client. +func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysClient { + return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) LocalNetworkGatewaysClient { + return LocalNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a local network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// localNetworkGatewayName - the name of the local network gateway. +// parameters - parameters supplied to the create or update local network gateway operation. +func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (result LocalNetworkGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: localNetworkGatewayName, + Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.LocalNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.LocalNetworkGatewaysClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", 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 LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result LocalNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified local network gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// localNetworkGatewayName - the name of the local network gateway. +func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: localNetworkGatewayName, + Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.LocalNetworkGatewaysClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, localNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/localNetworkGateways/{localNetworkGatewayName}", 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 LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified local network gateway in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// localNetworkGatewayName - the name of the local network gateway. +func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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: localNetworkGatewayName, + Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.LocalNetworkGatewaysClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, localNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/localNetworkGateways/{localNetworkGatewayName}", 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 LocalNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (result LocalNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the local network gateways in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.List") + defer func() { + sc := -1 + if result.lnglr.Response.Response != nil { + sc = result.lnglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lnglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.lnglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.lnglr.hasNextLink() && result.lnglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LocalNetworkGatewaysClient) ListPreparer(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 = "2021-03-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.Network/localNetworkGateways", 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 LocalNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) ListResponder(resp *http.Response) (result LocalNetworkGatewayListResult, err error) { + err = autorest.Respond( + resp, + 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 LocalNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) { + req, err := lastResults.localNetworkGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "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, "network.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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) + return +} + +// UpdateTags updates a local network gateway tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// localNetworkGatewayName - the name of the local network gateway. +// parameters - parameters supplied to update local network gateway tags. +func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (result LocalNetworkGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.UpdateTags") + 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: localNetworkGatewayName, + Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.LocalNetworkGatewaysClient", "UpdateTags", err.Error()) + } + + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/localNetworkGateways/{localNetworkGatewayName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) UpdateTagsResponder(resp *http.Response) (result LocalNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/models.go b/services/network/mgmt/2021-03-01/network/models.go new file mode 100644 index 000000000000..001d82b89107 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/models.go @@ -0,0 +1,49878 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/network/mgmt/2021-03-01/network" + +// AadAuthenticationParameters AAD Vpn authentication type related parameters. +type AadAuthenticationParameters struct { + // AadTenant - AAD Vpn authentication parameter AAD tenant. + AadTenant *string `json:"aadTenant,omitempty"` + // AadAudience - AAD Vpn authentication parameter AAD audience. + AadAudience *string `json:"aadAudience,omitempty"` + // AadIssuer - AAD Vpn authentication parameter AAD issuer. + AadIssuer *string `json:"aadIssuer,omitempty"` +} + +// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the +// virtual network. +type AddressSpace struct { + // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` +} + +// ApplicationGateway application gateway resource. +type ApplicationGateway struct { + autorest.Response `json:"-"` + // ApplicationGatewayPropertiesFormat - Properties of the application gateway. + *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting where the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // Identity - The identity of the application gateway, if configured. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // ID - 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 ApplicationGateway. +func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag.ApplicationGatewayPropertiesFormat != nil { + objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat + } + if ag.Zones != nil { + objectMap["zones"] = ag.Zones + } + if ag.Identity != nil { + objectMap["identity"] = ag.Identity + } + if ag.ID != nil { + objectMap["id"] = ag.ID + } + if ag.Location != nil { + objectMap["location"] = ag.Location + } + if ag.Tags != nil { + objectMap["tags"] = ag.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct. +func (ag *ApplicationGateway) 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 applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat) + if err != nil { + return err + } + ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ag.Etag = &etag + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + ag.Zones = &zones + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ag.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ag.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ag.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ag.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ag.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ag.Tags = tags + } + } + } + + return nil +} + +// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway. +type ApplicationGatewayAuthenticationCertificate struct { + // ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate. + *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the authentication certificate that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate. +func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil { + objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat + } + if agac.Name != nil { + objectMap["name"] = agac.Name + } + if agac.ID != nil { + objectMap["id"] = agac.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct. +func (agac *ApplicationGatewayAuthenticationCertificate) 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 applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat) + if err != nil { + return err + } + agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agac.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agac.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agac.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agac.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an +// application gateway. +type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { + // Data - Certificate public data. + Data *string `json:"data,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the authentication certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificatePropertiesFormat. +func (agacpf ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agacpf.Data != nil { + objectMap["data"] = agacpf.Data + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration. +type ApplicationGatewayAutoscaleConfiguration struct { + // MinCapacity - Lower bound on number of Application Gateway capacity. + MinCapacity *int32 `json:"minCapacity,omitempty"` + // MaxCapacity - Upper bound on number of Application Gateway capacity. + MaxCapacity *int32 `json:"maxCapacity,omitempty"` +} + +// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service +// call. +type ApplicationGatewayAvailableSslOptions struct { + autorest.Response `json:"-"` + // ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options. + *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` + // ID - 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 ApplicationGatewayAvailableSslOptions. +func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil { + objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat + } + if agaso.ID != nil { + objectMap["id"] = agaso.ID + } + if agaso.Location != nil { + objectMap["location"] = agaso.Location + } + if agaso.Tags != nil { + objectMap["tags"] = agaso.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct. +func (agaso *ApplicationGatewayAvailableSslOptions) 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 applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat) + if err != nil { + return err + } + agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agaso.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agaso.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agaso.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + agaso.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + agaso.Tags = tags + } + } + } + + return nil +} + +// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of +// ApplicationGatewayAvailableSslOptions. +type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { + // PredefinedPolicies - List of available Ssl predefined policy. + PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` + // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S' + DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` + // AvailableCipherSuites - List of available Ssl cipher suites. + AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` + // AvailableProtocols - List of available Ssl protocols. + AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` +} + +// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API +// service call. +type ApplicationGatewayAvailableSslPredefinedPolicies struct { + autorest.Response `json:"-"` + // Value - List of available Ssl predefined policy. + Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of +// ApplicationGatewaySslPredefinedPolicy values. +type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct { + i int + page ApplicationGatewayAvailableSslPredefinedPoliciesPage +} + +// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies { + 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy { + if !iter.page.NotDone() { + return ApplicationGatewaySslPredefinedPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type. +func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator { + return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool { + return agaspp.Value == nil || len(*agaspp.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool { + return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0 +} + +// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) { + if !agaspp.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(agaspp.NextLink))) +} + +// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of +// ApplicationGatewaySslPredefinedPolicy values. +type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct { + fn func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error) + agaspp ApplicationGatewayAvailableSslPredefinedPolicies +} + +// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.agaspp) + if err != nil { + return err + } + page.agaspp = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool { + return !page.agaspp.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies { + return page.agaspp +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy { + if page.agaspp.IsEmpty() { + return nil + } + return *page.agaspp.Value +} + +// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type. +func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage { + return ApplicationGatewayAvailableSslPredefinedPoliciesPage{ + fn: getNextPage, + agaspp: cur, + } +} + +// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API +// service call. +type ApplicationGatewayAvailableWafRuleSetsResult struct { + autorest.Response `json:"-"` + // Value - The list of application gateway rule sets. + Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` +} + +// ApplicationGatewayBackendAddress backend address of an application gateway. +type ApplicationGatewayBackendAddress struct { + // Fqdn - Fully qualified domain name (FQDN). + Fqdn *string `json:"fqdn,omitempty"` + // IPAddress - IP address. + IPAddress *string `json:"ipAddress,omitempty"` +} + +// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway. +type ApplicationGatewayBackendAddressPool struct { + // ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool. + *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the backend address pool that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool. +func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil { + objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat + } + if agbap.Name != nil { + objectMap["name"] = agbap.Name + } + if agbap.ID != nil { + objectMap["id"] = agbap.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct. +func (agbap *ApplicationGatewayBackendAddressPool) 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 applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat) + if err != nil { + return err + } + agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agbap.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agbap.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agbap.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agbap.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an +// application gateway. +type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { + // BackendIPConfigurations - READ-ONLY; Collection of references to IPs defined in network interfaces. + BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` + // BackendAddresses - Backend addresses. + BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPoolPropertiesFormat. +func (agbappf ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbappf.BackendAddresses != nil { + objectMap["backendAddresses"] = agbappf.BackendAddresses + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call. +type ApplicationGatewayBackendHealth struct { + autorest.Response `json:"-"` + // BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources. + BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` +} + +// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings. +type ApplicationGatewayBackendHealthHTTPSettings struct { + // BackendHTTPSettings - Reference to an ApplicationGatewayBackendHttpSettings resource. + BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` + // Servers - List of ApplicationGatewayBackendHealthServer resources. + Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` +} + +// ApplicationGatewayBackendHealthOnDemand result of on demand test probe. +type ApplicationGatewayBackendHealthOnDemand struct { + autorest.Response `json:"-"` + // BackendAddressPool - Reference to an ApplicationGatewayBackendAddressPool resource. + BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` + // BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings. + BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` +} + +// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool. +type ApplicationGatewayBackendHealthPool struct { + // BackendAddressPool - Reference to an ApplicationGatewayBackendAddressPool resource. + BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` + // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources. + BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` +} + +// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings. +type ApplicationGatewayBackendHealthServer struct { + // Address - IP address or FQDN of backend server. + Address *string `json:"address,omitempty"` + // IPConfiguration - Reference to IP configuration of backend server. + IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` + // Health - Health of backend server. Possible values include: 'ApplicationGatewayBackendHealthServerHealthUnknown', 'ApplicationGatewayBackendHealthServerHealthUp', 'ApplicationGatewayBackendHealthServerHealthDown', 'ApplicationGatewayBackendHealthServerHealthPartial', 'ApplicationGatewayBackendHealthServerHealthDraining' + Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` + // HealthProbeLog - Health Probe Log. + HealthProbeLog *string `json:"healthProbeLog,omitempty"` +} + +// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway. +type ApplicationGatewayBackendHTTPSettings struct { + // ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings. + *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the backend http settings that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings. +func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil { + objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat + } + if agbhs.Name != nil { + objectMap["name"] = agbhs.Name + } + if agbhs.ID != nil { + objectMap["id"] = agbhs.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct. +func (agbhs *ApplicationGatewayBackendHTTPSettings) 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 applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat) + if err != nil { + return err + } + agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agbhs.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agbhs.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agbhs.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agbhs.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an +// application gateway. +type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { + // Port - The destination port on the backend. + Port *int32 `json:"port,omitempty"` + // Protocol - The protocol used to communicate with the backend. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // CookieBasedAffinity - Cookie based affinity. Possible values include: 'ApplicationGatewayCookieBasedAffinityEnabled', 'ApplicationGatewayCookieBasedAffinityDisabled' + CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` + // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. + RequestTimeout *int32 `json:"requestTimeout,omitempty"` + // Probe - Probe resource of an application gateway. + Probe *SubResource `json:"probe,omitempty"` + // AuthenticationCertificates - Array of references to application gateway authentication certificates. + AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` + // TrustedRootCertificates - Array of references to application gateway trusted root certificates. + TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` + // ConnectionDraining - Connection draining of the backend http settings resource. + ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` + // HostName - Host header to be sent to the backend servers. + HostName *string `json:"hostName,omitempty"` + // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false. + PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` + // AffinityCookieName - Cookie name to use for the affinity cookie. + AffinityCookieName *string `json:"affinityCookieName,omitempty"` + // ProbeEnabled - Whether the probe is enabled. Default value is false. + ProbeEnabled *bool `json:"probeEnabled,omitempty"` + // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + Path *string `json:"path,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the backend HTTP settings resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettingsPropertiesFormat. +func (agbhspf ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbhspf.Port != nil { + objectMap["port"] = agbhspf.Port + } + if agbhspf.Protocol != "" { + objectMap["protocol"] = agbhspf.Protocol + } + if agbhspf.CookieBasedAffinity != "" { + objectMap["cookieBasedAffinity"] = agbhspf.CookieBasedAffinity + } + if agbhspf.RequestTimeout != nil { + objectMap["requestTimeout"] = agbhspf.RequestTimeout + } + if agbhspf.Probe != nil { + objectMap["probe"] = agbhspf.Probe + } + if agbhspf.AuthenticationCertificates != nil { + objectMap["authenticationCertificates"] = agbhspf.AuthenticationCertificates + } + if agbhspf.TrustedRootCertificates != nil { + objectMap["trustedRootCertificates"] = agbhspf.TrustedRootCertificates + } + if agbhspf.ConnectionDraining != nil { + objectMap["connectionDraining"] = agbhspf.ConnectionDraining + } + if agbhspf.HostName != nil { + objectMap["hostName"] = agbhspf.HostName + } + if agbhspf.PickHostNameFromBackendAddress != nil { + objectMap["pickHostNameFromBackendAddress"] = agbhspf.PickHostNameFromBackendAddress + } + if agbhspf.AffinityCookieName != nil { + objectMap["affinityCookieName"] = agbhspf.AffinityCookieName + } + if agbhspf.ProbeEnabled != nil { + objectMap["probeEnabled"] = agbhspf.ProbeEnabled + } + if agbhspf.Path != nil { + objectMap["path"] = agbhspf.Path + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayClientAuthConfiguration application gateway client authentication configuration. +type ApplicationGatewayClientAuthConfiguration struct { + // VerifyClientCertIssuerDN - Verify client certificate issuer name on the application gateway. + VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` +} + +// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to +// be active for a specified time after the backend server got removed from the configuration. +type ApplicationGatewayConnectionDraining struct { + // Enabled - Whether connection draining is enabled or not. + Enabled *bool `json:"enabled,omitempty"` + // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. + DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"` +} + +// ApplicationGatewayCustomError customer error of an application gateway. +type ApplicationGatewayCustomError struct { + // StatusCode - Status code of the application gateway customer error. Possible values include: 'ApplicationGatewayCustomErrorStatusCodeHTTPStatus403', 'ApplicationGatewayCustomErrorStatusCodeHTTPStatus502' + StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` + // CustomErrorPageURL - Error page URL of the application gateway customer error. + CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"` +} + +// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire +// rule group. +type ApplicationGatewayFirewallDisabledRuleGroup struct { + // RuleGroupName - The name of the rule group that will be disabled. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled. + Rules *[]int32 `json:"rules,omitempty"` +} + +// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF +// check. +type ApplicationGatewayFirewallExclusion struct { + // MatchVariable - The variable to be excluded. + MatchVariable *string `json:"matchVariable,omitempty"` + // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. + SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"` + // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + Selector *string `json:"selector,omitempty"` +} + +// ApplicationGatewayFirewallRule a web application firewall rule. +type ApplicationGatewayFirewallRule struct { + // RuleID - The identifier of the web application firewall rule. + RuleID *int32 `json:"ruleId,omitempty"` + // Description - The description of the web application firewall rule. + Description *string `json:"description,omitempty"` +} + +// ApplicationGatewayFirewallRuleGroup a web application firewall rule group. +type ApplicationGatewayFirewallRuleGroup struct { + // RuleGroupName - The name of the web application firewall rule group. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Description - The description of the web application firewall rule group. + Description *string `json:"description,omitempty"` + // Rules - The rules of the web application firewall rule group. + Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"` +} + +// ApplicationGatewayFirewallRuleSet a web application firewall rule set. +type ApplicationGatewayFirewallRuleSet struct { + // ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set. + *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` + // ID - 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 ApplicationGatewayFirewallRuleSet. +func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil { + objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat + } + if agfrs.ID != nil { + objectMap["id"] = agfrs.ID + } + if agfrs.Location != nil { + objectMap["location"] = agfrs.Location + } + if agfrs.Tags != nil { + objectMap["tags"] = agfrs.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct. +func (agfrs *ApplicationGatewayFirewallRuleSet) 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 applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat) + if err != nil { + return err + } + agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agfrs.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agfrs.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agfrs.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + agfrs.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + agfrs.Tags = tags + } + } + } + + return nil +} + +// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set. +type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the web application firewall rule set. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // RuleSetType - The type of the web application firewall rule set. + RuleSetType *string `json:"ruleSetType,omitempty"` + // RuleSetVersion - The version of the web application firewall rule set type. + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` + // RuleGroups - The rule groups of the web application firewall rule set. + RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSetPropertiesFormat. +func (agfrspf ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfrspf.RuleSetType != nil { + objectMap["ruleSetType"] = agfrspf.RuleSetType + } + if agfrspf.RuleSetVersion != nil { + objectMap["ruleSetVersion"] = agfrspf.RuleSetVersion + } + if agfrspf.RuleGroups != nil { + objectMap["ruleGroups"] = agfrspf.RuleGroups + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway. +type ApplicationGatewayFrontendIPConfiguration struct { + // ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration. + *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the frontend IP configuration that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration. +func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat + } + if agfic.Name != nil { + objectMap["name"] = agfic.Name + } + if agfic.ID != nil { + objectMap["id"] = agfic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct. +func (agfic *ApplicationGatewayFrontendIPConfiguration) 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 applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat) + if err != nil { + return err + } + agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agfic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agfic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agfic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agfic.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an +// application gateway. +type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { + // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - Reference to the subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // PublicIPAddress - Reference to the PublicIP resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // PrivateLinkConfiguration - Reference to the application gateway private link configuration. + PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat. +func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agficpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = agficpf.PrivateIPAddress + } + if agficpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod + } + if agficpf.Subnet != nil { + objectMap["subnet"] = agficpf.Subnet + } + if agficpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = agficpf.PublicIPAddress + } + if agficpf.PrivateLinkConfiguration != nil { + objectMap["privateLinkConfiguration"] = agficpf.PrivateLinkConfiguration + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayFrontendPort frontend port of an application gateway. +type ApplicationGatewayFrontendPort struct { + // ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port. + *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the frontend port that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort. +func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil { + objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat + } + if agfp.Name != nil { + objectMap["name"] = agfp.Name + } + if agfp.ID != nil { + objectMap["id"] = agfp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct. +func (agfp *ApplicationGatewayFrontendPort) 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 applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat) + if err != nil { + return err + } + agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agfp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agfp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agfp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agfp.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway. +type ApplicationGatewayFrontendPortPropertiesFormat struct { + // Port - Frontend port. + Port *int32 `json:"port,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat. +func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfppf.Port != nil { + objectMap["port"] = agfppf.Port + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayGlobalConfiguration application Gateway global configuration. +type ApplicationGatewayGlobalConfiguration struct { + // EnableRequestBuffering - Enable request buffering. + EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` + // EnableResponseBuffering - Enable response buffering. + EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` +} + +// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway. +type ApplicationGatewayHeaderConfiguration struct { + // HeaderName - Header name of the header configuration. + HeaderName *string `json:"headerName,omitempty"` + // HeaderValue - Header value of the header configuration. + HeaderValue *string `json:"headerValue,omitempty"` +} + +// ApplicationGatewayHTTPListener http listener of an application gateway. +type ApplicationGatewayHTTPListener struct { + // ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener. + *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the HTTP listener that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener. +func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil { + objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat + } + if aghl.Name != nil { + objectMap["name"] = aghl.Name + } + if aghl.ID != nil { + objectMap["id"] = aghl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct. +func (aghl *ApplicationGatewayHTTPListener) 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 applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat) + if err != nil { + return err + } + aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + aghl.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + aghl.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + aghl.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + aghl.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway. +type ApplicationGatewayHTTPListenerPropertiesFormat struct { + // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // FrontendPort - Frontend port resource of an application gateway. + FrontendPort *SubResource `json:"frontendPort,omitempty"` + // Protocol - Protocol of the HTTP listener. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // HostName - Host name of HTTP listener. + HostName *string `json:"hostName,omitempty"` + // SslCertificate - SSL certificate resource of an application gateway. + SslCertificate *SubResource `json:"sslCertificate,omitempty"` + // SslProfile - SSL profile resource of the application gateway. + SslProfile *SubResource `json:"sslProfile,omitempty"` + // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting. + RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // CustomErrorConfigurations - Custom error configurations of the HTTP listener. + CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` + // FirewallPolicy - Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` + // HostNames - List of Host names for HTTP Listener that allows special wildcard characters as well. + HostNames *[]string `json:"hostNames,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat. +func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aghlpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration + } + if aghlpf.FrontendPort != nil { + objectMap["frontendPort"] = aghlpf.FrontendPort + } + if aghlpf.Protocol != "" { + objectMap["protocol"] = aghlpf.Protocol + } + if aghlpf.HostName != nil { + objectMap["hostName"] = aghlpf.HostName + } + if aghlpf.SslCertificate != nil { + objectMap["sslCertificate"] = aghlpf.SslCertificate + } + if aghlpf.SslProfile != nil { + objectMap["sslProfile"] = aghlpf.SslProfile + } + if aghlpf.RequireServerNameIndication != nil { + objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication + } + if aghlpf.CustomErrorConfigurations != nil { + objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations + } + if aghlpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = aghlpf.FirewallPolicy + } + if aghlpf.HostNames != nil { + objectMap["hostNames"] = aghlpf.HostNames + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 +// private IP configuration is allowed. +type ApplicationGatewayIPConfiguration struct { + // ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration. + *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the IP configuration that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration. +func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat + } + if agic.Name != nil { + objectMap["name"] = agic.Name + } + if agic.ID != nil { + objectMap["id"] = agic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct. +func (agic *ApplicationGatewayIPConfiguration) 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 applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat) + if err != nil { + return err + } + agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agic.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application +// gateway. +type ApplicationGatewayIPConfigurationPropertiesFormat struct { + // Subnet - Reference to the subnet resource. A subnet from where application gateway gets its private address. + Subnet *SubResource `json:"subnet,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat. +func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agicpf.Subnet != nil { + objectMap["subnet"] = agicpf.Subnet + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayListResult response for ListApplicationGateways API service call. +type ApplicationGatewayListResult struct { + autorest.Response `json:"-"` + // Value - List of an application gateways in a resource group. + Value *[]ApplicationGateway `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values. +type ApplicationGatewayListResultIterator struct { + i int + page ApplicationGatewayListResultPage +} + +// 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 *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.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 *ApplicationGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationGatewayListResultIterator) 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 ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult { + 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 ApplicationGatewayListResultIterator) Value() ApplicationGateway { + if !iter.page.NotDone() { + return ApplicationGateway{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationGatewayListResultIterator type. +func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator { + return ApplicationGatewayListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aglr ApplicationGatewayListResult) IsEmpty() bool { + return aglr.Value == nil || len(*aglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (aglr ApplicationGatewayListResult) hasNextLink() bool { + return aglr.NextLink != nil && len(*aglr.NextLink) != 0 +} + +// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { + if !aglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aglr.NextLink))) +} + +// ApplicationGatewayListResultPage contains a page of ApplicationGateway values. +type ApplicationGatewayListResultPage struct { + fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error) + aglr ApplicationGatewayListResult +} + +// 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 *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.aglr) + if err != nil { + return err + } + page.aglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ApplicationGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationGatewayListResultPage) NotDone() bool { + return !page.aglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult { + return page.aglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { + if page.aglr.IsEmpty() { + return nil + } + return *page.aglr.Value +} + +// Creates a new instance of the ApplicationGatewayListResultPage type. +func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { + return ApplicationGatewayListResultPage{ + fn: getNextPage, + aglr: cur, + } +} + +// ApplicationGatewayLoadDistributionPolicy load Distribution Policy of an application gateway. +type ApplicationGatewayLoadDistributionPolicy struct { + // ApplicationGatewayLoadDistributionPolicyPropertiesFormat - Properties of the application gateway load distribution policy. + *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the load distribution policy that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayLoadDistributionPolicy. +func (agldp ApplicationGatewayLoadDistributionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agldp.ApplicationGatewayLoadDistributionPolicyPropertiesFormat != nil { + objectMap["properties"] = agldp.ApplicationGatewayLoadDistributionPolicyPropertiesFormat + } + if agldp.Name != nil { + objectMap["name"] = agldp.Name + } + if agldp.ID != nil { + objectMap["id"] = agldp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayLoadDistributionPolicy struct. +func (agldp *ApplicationGatewayLoadDistributionPolicy) 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 applicationGatewayLoadDistributionPolicyPropertiesFormat ApplicationGatewayLoadDistributionPolicyPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayLoadDistributionPolicyPropertiesFormat) + if err != nil { + return err + } + agldp.ApplicationGatewayLoadDistributionPolicyPropertiesFormat = &applicationGatewayLoadDistributionPolicyPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agldp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agldp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agldp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agldp.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayLoadDistributionPolicyPropertiesFormat properties of Load Distribution Policy of an +// application gateway. +type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { + // LoadDistributionTargets - Load Distribution Targets resource of an application gateway. + LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` + // LoadDistributionAlgorithm - Load Distribution Targets resource of an application gateway. Possible values include: 'ApplicationGatewayLoadDistributionAlgorithmRoundRobin', 'ApplicationGatewayLoadDistributionAlgorithmLeastConnections', 'ApplicationGatewayLoadDistributionAlgorithmIPHash' + LoadDistributionAlgorithm ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the Load Distribution Policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayLoadDistributionPolicyPropertiesFormat. +func (agldppf ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agldppf.LoadDistributionTargets != nil { + objectMap["loadDistributionTargets"] = agldppf.LoadDistributionTargets + } + if agldppf.LoadDistributionAlgorithm != "" { + objectMap["loadDistributionAlgorithm"] = agldppf.LoadDistributionAlgorithm + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayLoadDistributionTarget load Distribution Target of an application gateway. +type ApplicationGatewayLoadDistributionTarget struct { + // ApplicationGatewayLoadDistributionTargetPropertiesFormat - Properties of the application gateway load distribution target. + *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the load distribution policy that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayLoadDistributionTarget. +func (agldt ApplicationGatewayLoadDistributionTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agldt.ApplicationGatewayLoadDistributionTargetPropertiesFormat != nil { + objectMap["properties"] = agldt.ApplicationGatewayLoadDistributionTargetPropertiesFormat + } + if agldt.Name != nil { + objectMap["name"] = agldt.Name + } + if agldt.ID != nil { + objectMap["id"] = agldt.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayLoadDistributionTarget struct. +func (agldt *ApplicationGatewayLoadDistributionTarget) 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 applicationGatewayLoadDistributionTargetPropertiesFormat ApplicationGatewayLoadDistributionTargetPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayLoadDistributionTargetPropertiesFormat) + if err != nil { + return err + } + agldt.ApplicationGatewayLoadDistributionTargetPropertiesFormat = &applicationGatewayLoadDistributionTargetPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agldt.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agldt.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agldt.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agldt.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayLoadDistributionTargetPropertiesFormat ... +type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { + // WeightPerServer - Weight per server. Range between 1 and 100. + WeightPerServer *int32 `json:"weightPerServer,omitempty"` + // BackendAddressPool - Backend address pool resource of the application gateway. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` +} + +// ApplicationGatewayOnDemandProbe details of on demand test probe request. +type ApplicationGatewayOnDemandProbe struct { + // Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // Host - Host name to send the probe to. + Host *string `json:"host,omitempty"` + // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. + Path *string `json:"path,omitempty"` + // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + Timeout *int32 `json:"timeout,omitempty"` + // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. + PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` + // Match - Criterion for classifying a healthy probe response. + Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` + // BackendAddressPool - Reference to backend pool of application gateway to which probe request will be sent. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // BackendHTTPSettings - Reference to backend http setting of application gateway to be used for test probe. + BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` +} + +// ApplicationGatewayPathRule path rule of URL path map of an application gateway. +type ApplicationGatewayPathRule struct { + // ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule. + *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the path rule that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule. +func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agpr.ApplicationGatewayPathRulePropertiesFormat != nil { + objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat + } + if agpr.Name != nil { + objectMap["name"] = agpr.Name + } + if agpr.ID != nil { + objectMap["id"] = agpr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct. +func (agpr *ApplicationGatewayPathRule) 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 applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat) + if err != nil { + return err + } + agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agpr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agpr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agpr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agpr.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway. +type ApplicationGatewayPathRulePropertiesFormat struct { + // Paths - Path rules of URL path map. + Paths *[]string `json:"paths,omitempty"` + // BackendAddressPool - Backend address pool resource of URL path map path rule. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // BackendHTTPSettings - Backend http settings resource of URL path map path rule. + BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` + // RedirectConfiguration - Redirect configuration resource of URL path map path rule. + RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` + // RewriteRuleSet - Rewrite rule set resource of URL path map path rule. + RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` + // LoadDistributionPolicy - Load Distribution Policy resource of URL path map path rule. + LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // FirewallPolicy - Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat. +func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agprpf.Paths != nil { + objectMap["paths"] = agprpf.Paths + } + if agprpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = agprpf.BackendAddressPool + } + if agprpf.BackendHTTPSettings != nil { + objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings + } + if agprpf.RedirectConfiguration != nil { + objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration + } + if agprpf.RewriteRuleSet != nil { + objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet + } + if agprpf.LoadDistributionPolicy != nil { + objectMap["loadDistributionPolicy"] = agprpf.LoadDistributionPolicy + } + if agprpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = agprpf.FirewallPolicy + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayPrivateEndpointConnection private Endpoint connection on an application gateway. +type ApplicationGatewayPrivateEndpointConnection struct { + autorest.Response `json:"-"` + // ApplicationGatewayPrivateEndpointConnectionProperties - Properties of the application gateway private endpoint connection. + *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` + // Name - Name of the private endpoint connection on an application gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnection. +func (agpec ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agpec.ApplicationGatewayPrivateEndpointConnectionProperties != nil { + objectMap["properties"] = agpec.ApplicationGatewayPrivateEndpointConnectionProperties + } + if agpec.Name != nil { + objectMap["name"] = agpec.Name + } + if agpec.ID != nil { + objectMap["id"] = agpec.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateEndpointConnection struct. +func (agpec *ApplicationGatewayPrivateEndpointConnection) 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 applicationGatewayPrivateEndpointConnectionProperties ApplicationGatewayPrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &applicationGatewayPrivateEndpointConnectionProperties) + if err != nil { + return err + } + agpec.ApplicationGatewayPrivateEndpointConnectionProperties = &applicationGatewayPrivateEndpointConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agpec.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agpec.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agpec.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agpec.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayPrivateEndpointConnectionListResult response for +// ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections +// for an application gateway. +type ApplicationGatewayPrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - List of private endpoint connections on an application gateway. + Value *[]ApplicationGatewayPrivateEndpointConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationGatewayPrivateEndpointConnectionListResultIterator provides access to a complete listing of +// ApplicationGatewayPrivateEndpointConnection values. +type ApplicationGatewayPrivateEndpointConnectionListResultIterator struct { + i int + page ApplicationGatewayPrivateEndpointConnectionListResultPage +} + +// 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 *ApplicationGatewayPrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultIterator.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 *ApplicationGatewayPrivateEndpointConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) 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 ApplicationGatewayPrivateEndpointConnectionListResultIterator) Response() ApplicationGatewayPrivateEndpointConnectionListResult { + 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 ApplicationGatewayPrivateEndpointConnectionListResultIterator) Value() ApplicationGatewayPrivateEndpointConnection { + if !iter.page.NotDone() { + return ApplicationGatewayPrivateEndpointConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultIterator type. +func NewApplicationGatewayPrivateEndpointConnectionListResultIterator(page ApplicationGatewayPrivateEndpointConnectionListResultPage) ApplicationGatewayPrivateEndpointConnectionListResultIterator { + return ApplicationGatewayPrivateEndpointConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) IsEmpty() bool { + return agpeclr.Value == nil || len(*agpeclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) hasNextLink() bool { + return agpeclr.NextLink != nil && len(*agpeclr.NextLink) != 0 +} + +// applicationGatewayPrivateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) applicationGatewayPrivateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !agpeclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(agpeclr.NextLink))) +} + +// ApplicationGatewayPrivateEndpointConnectionListResultPage contains a page of +// ApplicationGatewayPrivateEndpointConnection values. +type ApplicationGatewayPrivateEndpointConnectionListResultPage struct { + fn func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error) + agpeclr ApplicationGatewayPrivateEndpointConnectionListResult +} + +// 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 *ApplicationGatewayPrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.agpeclr) + if err != nil { + return err + } + page.agpeclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ApplicationGatewayPrivateEndpointConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) NotDone() bool { + return !page.agpeclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Response() ApplicationGatewayPrivateEndpointConnectionListResult { + return page.agpeclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Values() []ApplicationGatewayPrivateEndpointConnection { + if page.agpeclr.IsEmpty() { + return nil + } + return *page.agpeclr.Value +} + +// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultPage type. +func NewApplicationGatewayPrivateEndpointConnectionListResultPage(cur ApplicationGatewayPrivateEndpointConnectionListResult, getNextPage func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)) ApplicationGatewayPrivateEndpointConnectionListResultPage { + return ApplicationGatewayPrivateEndpointConnectionListResultPage{ + fn: getNextPage, + agpeclr: cur, + } +} + +// ApplicationGatewayPrivateEndpointConnectionProperties properties of Private Link Resource of an +// application gateway. +type ApplicationGatewayPrivateEndpointConnectionProperties struct { + // PrivateEndpoint - READ-ONLY; The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway private endpoint connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // LinkIdentifier - READ-ONLY; The consumer link id. + LinkIdentifier *string `json:"linkIdentifier,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnectionProperties. +func (agpecp ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agpecp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = agpecp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayPrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type ApplicationGatewayPrivateEndpointConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewayPrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewayPrivateEndpointConnectionsDeleteFuture.Result. +func (future *ApplicationGatewayPrivateEndpointConnectionsDeleteFuture) result(client ApplicationGatewayPrivateEndpointConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewayPrivateEndpointConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationGatewayPrivateEndpointConnectionsUpdateFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type ApplicationGatewayPrivateEndpointConnectionsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (ApplicationGatewayPrivateEndpointConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewayPrivateEndpointConnectionsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewayPrivateEndpointConnectionsUpdateFuture.Result. +func (future *ApplicationGatewayPrivateEndpointConnectionsUpdateFuture) result(client ApplicationGatewayPrivateEndpointConnectionsClient) (agpec ApplicationGatewayPrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + agpec.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if agpec.Response.Response, err = future.GetResult(sender); err == nil && agpec.Response.Response.StatusCode != http.StatusNoContent { + agpec, err = client.UpdateResponder(agpec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture", "Result", agpec.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationGatewayPrivateLinkConfiguration private Link Configuration on an application gateway. +type ApplicationGatewayPrivateLinkConfiguration struct { + // ApplicationGatewayPrivateLinkConfigurationProperties - Properties of the application gateway private link configuration. + *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` + // Name - Name of the private link configuration that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfiguration. +func (agplc ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplc.ApplicationGatewayPrivateLinkConfigurationProperties != nil { + objectMap["properties"] = agplc.ApplicationGatewayPrivateLinkConfigurationProperties + } + if agplc.Name != nil { + objectMap["name"] = agplc.Name + } + if agplc.ID != nil { + objectMap["id"] = agplc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkConfiguration struct. +func (agplc *ApplicationGatewayPrivateLinkConfiguration) 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 applicationGatewayPrivateLinkConfigurationProperties ApplicationGatewayPrivateLinkConfigurationProperties + err = json.Unmarshal(*v, &applicationGatewayPrivateLinkConfigurationProperties) + if err != nil { + return err + } + agplc.ApplicationGatewayPrivateLinkConfigurationProperties = &applicationGatewayPrivateLinkConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agplc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agplc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agplc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agplc.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayPrivateLinkConfigurationProperties properties of private link configuration on an +// application gateway. +type ApplicationGatewayPrivateLinkConfigurationProperties struct { + // IPConfigurations - An array of application gateway private link ip configurations. + IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfigurationProperties. +func (agplcp ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplcp.IPConfigurations != nil { + objectMap["ipConfigurations"] = agplcp.IPConfigurations + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayPrivateLinkIPConfiguration the application gateway private link ip configuration. +type ApplicationGatewayPrivateLinkIPConfiguration struct { + // ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link ip configuration. + *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` + // Name - The name of application gateway private link ip configuration. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfiguration. +func (agplic ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties != nil { + objectMap["properties"] = agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties + } + if agplic.Name != nil { + objectMap["name"] = agplic.Name + } + if agplic.ID != nil { + objectMap["id"] = agplic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkIPConfiguration struct. +func (agplic *ApplicationGatewayPrivateLinkIPConfiguration) 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 applicationGatewayPrivateLinkIPConfigurationProperties ApplicationGatewayPrivateLinkIPConfigurationProperties + err = json.Unmarshal(*v, &applicationGatewayPrivateLinkIPConfigurationProperties) + if err != nil { + return err + } + agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties = &applicationGatewayPrivateLinkIPConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agplic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agplic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agplic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agplic.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayPrivateLinkIPConfigurationProperties properties of an application gateway private link +// IP configuration. +type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - Reference to the subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // Primary - Whether the ip configuration is primary or not. + Primary *bool `json:"primary,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link IP configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfigurationProperties. +func (agplicp ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplicp.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = agplicp.PrivateIPAddress + } + if agplicp.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = agplicp.PrivateIPAllocationMethod + } + if agplicp.Subnet != nil { + objectMap["subnet"] = agplicp.Subnet + } + if agplicp.Primary != nil { + objectMap["primary"] = agplicp.Primary + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayPrivateLinkResource privateLink Resource of an application gateway. +type ApplicationGatewayPrivateLinkResource struct { + // ApplicationGatewayPrivateLinkResourceProperties - Properties of the application gateway private link resource. + *ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"` + // Name - Name of the private link resource that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResource. +func (agplr ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplr.ApplicationGatewayPrivateLinkResourceProperties != nil { + objectMap["properties"] = agplr.ApplicationGatewayPrivateLinkResourceProperties + } + if agplr.Name != nil { + objectMap["name"] = agplr.Name + } + if agplr.ID != nil { + objectMap["id"] = agplr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkResource struct. +func (agplr *ApplicationGatewayPrivateLinkResource) 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 applicationGatewayPrivateLinkResourceProperties ApplicationGatewayPrivateLinkResourceProperties + err = json.Unmarshal(*v, &applicationGatewayPrivateLinkResourceProperties) + if err != nil { + return err + } + agplr.ApplicationGatewayPrivateLinkResourceProperties = &applicationGatewayPrivateLinkResourceProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agplr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agplr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agplr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agplr.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayPrivateLinkResourceListResult response for ListApplicationGatewayPrivateLinkResources +// API service call. Gets all private link resources for an application gateway. +type ApplicationGatewayPrivateLinkResourceListResult struct { + autorest.Response `json:"-"` + // Value - List of private link resources of an application gateway. + Value *[]ApplicationGatewayPrivateLinkResource `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationGatewayPrivateLinkResourceListResultIterator provides access to a complete listing of +// ApplicationGatewayPrivateLinkResource values. +type ApplicationGatewayPrivateLinkResourceListResultIterator struct { + i int + page ApplicationGatewayPrivateLinkResourceListResultPage +} + +// 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 *ApplicationGatewayPrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultIterator.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 *ApplicationGatewayPrivateLinkResourceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) 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 ApplicationGatewayPrivateLinkResourceListResultIterator) Response() ApplicationGatewayPrivateLinkResourceListResult { + 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 ApplicationGatewayPrivateLinkResourceListResultIterator) Value() ApplicationGatewayPrivateLinkResource { + if !iter.page.NotDone() { + return ApplicationGatewayPrivateLinkResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultIterator type. +func NewApplicationGatewayPrivateLinkResourceListResultIterator(page ApplicationGatewayPrivateLinkResourceListResultPage) ApplicationGatewayPrivateLinkResourceListResultIterator { + return ApplicationGatewayPrivateLinkResourceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) IsEmpty() bool { + return agplrlr.Value == nil || len(*agplrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) hasNextLink() bool { + return agplrlr.NextLink != nil && len(*agplrlr.NextLink) != 0 +} + +// applicationGatewayPrivateLinkResourceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) applicationGatewayPrivateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !agplrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(agplrlr.NextLink))) +} + +// ApplicationGatewayPrivateLinkResourceListResultPage contains a page of +// ApplicationGatewayPrivateLinkResource values. +type ApplicationGatewayPrivateLinkResourceListResultPage struct { + fn func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error) + agplrlr ApplicationGatewayPrivateLinkResourceListResult +} + +// 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 *ApplicationGatewayPrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.agplrlr) + if err != nil { + return err + } + page.agplrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ApplicationGatewayPrivateLinkResourceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationGatewayPrivateLinkResourceListResultPage) NotDone() bool { + return !page.agplrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationGatewayPrivateLinkResourceListResultPage) Response() ApplicationGatewayPrivateLinkResourceListResult { + return page.agplrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationGatewayPrivateLinkResourceListResultPage) Values() []ApplicationGatewayPrivateLinkResource { + if page.agplrlr.IsEmpty() { + return nil + } + return *page.agplrlr.Value +} + +// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultPage type. +func NewApplicationGatewayPrivateLinkResourceListResultPage(cur ApplicationGatewayPrivateLinkResourceListResult, getNextPage func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)) ApplicationGatewayPrivateLinkResourceListResultPage { + return ApplicationGatewayPrivateLinkResourceListResultPage{ + fn: getNextPage, + agplrlr: cur, + } +} + +// ApplicationGatewayPrivateLinkResourceProperties properties of a private link resource. +type ApplicationGatewayPrivateLinkResourceProperties struct { + // GroupID - READ-ONLY; Group identifier of private link resource. + GroupID *string `json:"groupId,omitempty"` + // RequiredMembers - READ-ONLY; Required member names of private link resource. + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + // RequiredZoneNames - Required DNS zone names of the the private link resource. + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResourceProperties. +func (agplrp ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplrp.RequiredZoneNames != nil { + objectMap["requiredZoneNames"] = agplrp.RequiredZoneNames + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayProbe probe of the application gateway. +type ApplicationGatewayProbe struct { + // ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe. + *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the probe that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayProbe. +func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agp.ApplicationGatewayProbePropertiesFormat != nil { + objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat + } + if agp.Name != nil { + objectMap["name"] = agp.Name + } + if agp.ID != nil { + objectMap["id"] = agp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct. +func (agp *ApplicationGatewayProbe) 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 applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat) + if err != nil { + return err + } + agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agp.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match. +type ApplicationGatewayProbeHealthResponseMatch struct { + // Body - Body that must be contained in the health response. Default value is empty. + Body *string `json:"body,omitempty"` + // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. + StatusCodes *[]string `json:"statusCodes,omitempty"` +} + +// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway. +type ApplicationGatewayProbePropertiesFormat struct { + // Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // Host - Host name to send the probe to. + Host *string `json:"host,omitempty"` + // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. + Path *string `json:"path,omitempty"` + // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. + Interval *int32 `json:"interval,omitempty"` + // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + Timeout *int32 `json:"timeout,omitempty"` + // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. + UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` + // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. + PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` + // MinServers - Minimum number of servers that are always marked healthy. Default value is 0. + MinServers *int32 `json:"minServers,omitempty"` + // Match - Criterion for classifying a healthy probe response. + Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only. + Port *int32 `json:"port,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat. +func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agppf.Protocol != "" { + objectMap["protocol"] = agppf.Protocol + } + if agppf.Host != nil { + objectMap["host"] = agppf.Host + } + if agppf.Path != nil { + objectMap["path"] = agppf.Path + } + if agppf.Interval != nil { + objectMap["interval"] = agppf.Interval + } + if agppf.Timeout != nil { + objectMap["timeout"] = agppf.Timeout + } + if agppf.UnhealthyThreshold != nil { + objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold + } + if agppf.PickHostNameFromBackendHTTPSettings != nil { + objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings + } + if agppf.MinServers != nil { + objectMap["minServers"] = agppf.MinServers + } + if agppf.Match != nil { + objectMap["match"] = agppf.Match + } + if agppf.Port != nil { + objectMap["port"] = agppf.Port + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayPropertiesFormat properties of the application gateway. +type ApplicationGatewayPropertiesFormat struct { + // Sku - SKU of the application gateway resource. + Sku *ApplicationGatewaySku `json:"sku,omitempty"` + // SslPolicy - SSL policy of the application gateway resource. + SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` + // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'ApplicationGatewayOperationalStateStopped', 'ApplicationGatewayOperationalStateStarting', 'ApplicationGatewayOperationalStateRunning', 'ApplicationGatewayOperationalStateStopping' + OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` + // GatewayIPConfigurations - Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` + // AuthenticationCertificates - Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` + // TrustedRootCertificates - Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` + // TrustedClientCertificates - Trusted client certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` + // SslCertificates - SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` + // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` + // FrontendPorts - Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` + // Probes - Probes of the application gateway resource. + Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` + // BackendAddressPools - Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` + // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` + // HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` + // SslProfiles - SSL profiles of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` + // URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` + // RequestRoutingRules - Request routing rules of the application gateway resource. + RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` + // RewriteRuleSets - Rewrite rules for the application gateway resource. + RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` + // RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` + // WebApplicationFirewallConfiguration - Web application firewall configuration. + WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` + // FirewallPolicy - Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` + // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource. + EnableHTTP2 *bool `json:"enableHttp2,omitempty"` + // EnableFips - Whether FIPS is enabled on the application gateway resource. + EnableFips *bool `json:"enableFips,omitempty"` + // AutoscaleConfiguration - Autoscale Configuration. + AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` + // PrivateLinkConfigurations - PrivateLink configurations on application gateway. + PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` + // PrivateEndpointConnections - READ-ONLY; Private Endpoint connections on application gateway. + PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // CustomErrorConfigurations - Custom error configurations of the application gateway resource. + CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` + // ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. + ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` + // LoadDistributionPolicies - Load distribution policies of the application gateway resource. + LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` + // GlobalConfiguration - Global Configuration. + GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat. +func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agpf.Sku != nil { + objectMap["sku"] = agpf.Sku + } + if agpf.SslPolicy != nil { + objectMap["sslPolicy"] = agpf.SslPolicy + } + if agpf.GatewayIPConfigurations != nil { + objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations + } + if agpf.AuthenticationCertificates != nil { + objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates + } + if agpf.TrustedRootCertificates != nil { + objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates + } + if agpf.TrustedClientCertificates != nil { + objectMap["trustedClientCertificates"] = agpf.TrustedClientCertificates + } + if agpf.SslCertificates != nil { + objectMap["sslCertificates"] = agpf.SslCertificates + } + if agpf.FrontendIPConfigurations != nil { + objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations + } + if agpf.FrontendPorts != nil { + objectMap["frontendPorts"] = agpf.FrontendPorts + } + if agpf.Probes != nil { + objectMap["probes"] = agpf.Probes + } + if agpf.BackendAddressPools != nil { + objectMap["backendAddressPools"] = agpf.BackendAddressPools + } + if agpf.BackendHTTPSettingsCollection != nil { + objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection + } + if agpf.HTTPListeners != nil { + objectMap["httpListeners"] = agpf.HTTPListeners + } + if agpf.SslProfiles != nil { + objectMap["sslProfiles"] = agpf.SslProfiles + } + if agpf.URLPathMaps != nil { + objectMap["urlPathMaps"] = agpf.URLPathMaps + } + if agpf.RequestRoutingRules != nil { + objectMap["requestRoutingRules"] = agpf.RequestRoutingRules + } + if agpf.RewriteRuleSets != nil { + objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets + } + if agpf.RedirectConfigurations != nil { + objectMap["redirectConfigurations"] = agpf.RedirectConfigurations + } + if agpf.WebApplicationFirewallConfiguration != nil { + objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration + } + if agpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = agpf.FirewallPolicy + } + if agpf.EnableHTTP2 != nil { + objectMap["enableHttp2"] = agpf.EnableHTTP2 + } + if agpf.EnableFips != nil { + objectMap["enableFips"] = agpf.EnableFips + } + if agpf.AutoscaleConfiguration != nil { + objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration + } + if agpf.PrivateLinkConfigurations != nil { + objectMap["privateLinkConfigurations"] = agpf.PrivateLinkConfigurations + } + if agpf.CustomErrorConfigurations != nil { + objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations + } + if agpf.ForceFirewallPolicyAssociation != nil { + objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation + } + if agpf.LoadDistributionPolicies != nil { + objectMap["loadDistributionPolicies"] = agpf.LoadDistributionPolicies + } + if agpf.GlobalConfiguration != nil { + objectMap["globalConfiguration"] = agpf.GlobalConfiguration + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway. +type ApplicationGatewayRedirectConfiguration struct { + // ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration. + *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the redirect configuration that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration. +func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil { + objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat + } + if agrc.Name != nil { + objectMap["name"] = agrc.Name + } + if agrc.ID != nil { + objectMap["id"] = agrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct. +func (agrc *ApplicationGatewayRedirectConfiguration) 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 applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat) + if err != nil { + return err + } + agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agrc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agrc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agrc.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the +// application gateway. +type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { + // RedirectType - HTTP redirection type. Possible values include: 'ApplicationGatewayRedirectTypePermanent', 'ApplicationGatewayRedirectTypeFound', 'ApplicationGatewayRedirectTypeSeeOther', 'ApplicationGatewayRedirectTypeTemporary' + RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"` + // TargetListener - Reference to a listener to redirect the request to. + TargetListener *SubResource `json:"targetListener,omitempty"` + // TargetURL - Url to redirect the request to. + TargetURL *string `json:"targetUrl,omitempty"` + // IncludePath - Include path in the redirected url. + IncludePath *bool `json:"includePath,omitempty"` + // IncludeQueryString - Include query string in the redirected url. + IncludeQueryString *bool `json:"includeQueryString,omitempty"` + // RequestRoutingRules - Request routing specifying redirect configuration. + RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` + // URLPathMaps - Url path maps specifying default redirect configuration. + URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` + // PathRules - Path rules specifying redirect configuration. + PathRules *[]SubResource `json:"pathRules,omitempty"` +} + +// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway. +type ApplicationGatewayRequestRoutingRule struct { + // ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule. + *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the request routing rule that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule. +func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil { + objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat + } + if agrrr.Name != nil { + objectMap["name"] = agrrr.Name + } + if agrrr.ID != nil { + objectMap["id"] = agrrr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct. +func (agrrr *ApplicationGatewayRequestRoutingRule) 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 applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat) + if err != nil { + return err + } + agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agrrr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agrrr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agrrr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agrrr.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the +// application gateway. +type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { + // RuleType - Rule type. Possible values include: 'ApplicationGatewayRequestRoutingRuleTypeBasic', 'ApplicationGatewayRequestRoutingRuleTypePathBasedRouting' + RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` + // Priority - Priority of the request routing rule. + Priority *int32 `json:"priority,omitempty"` + // BackendAddressPool - Backend address pool resource of the application gateway. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // BackendHTTPSettings - Backend http settings resource of the application gateway. + BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` + // HTTPListener - Http listener resource of the application gateway. + HTTPListener *SubResource `json:"httpListener,omitempty"` + // URLPathMap - URL path map resource of the application gateway. + URLPathMap *SubResource `json:"urlPathMap,omitempty"` + // RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway. + RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` + // RedirectConfiguration - Redirect configuration resource of the application gateway. + RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` + // LoadDistributionPolicy - Load Distribution Policy resource of the application gateway. + LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat. +func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrrpf.RuleType != "" { + objectMap["ruleType"] = agrrrpf.RuleType + } + if agrrrpf.Priority != nil { + objectMap["priority"] = agrrrpf.Priority + } + if agrrrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool + } + if agrrrpf.BackendHTTPSettings != nil { + objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings + } + if agrrrpf.HTTPListener != nil { + objectMap["httpListener"] = agrrrpf.HTTPListener + } + if agrrrpf.URLPathMap != nil { + objectMap["urlPathMap"] = agrrrpf.URLPathMap + } + if agrrrpf.RewriteRuleSet != nil { + objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet + } + if agrrrpf.RedirectConfiguration != nil { + objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration + } + if agrrrpf.LoadDistributionPolicy != nil { + objectMap["loadDistributionPolicy"] = agrrrpf.LoadDistributionPolicy + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayRewriteRule rewrite rule of an application gateway. +type ApplicationGatewayRewriteRule struct { + // Name - Name of the rewrite rule that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. + RuleSequence *int32 `json:"ruleSequence,omitempty"` + // Conditions - Conditions based on which the action set execution will be evaluated. + Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` + // ActionSet - Set of actions to be done as part of the rewrite Rule. + ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` +} + +// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway. +type ApplicationGatewayRewriteRuleActionSet struct { + // RequestHeaderConfigurations - Request Header Actions in the Action Set. + RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` + // ResponseHeaderConfigurations - Response Header Actions in the Action Set. + ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` + // URLConfiguration - Url Configuration Action in the Action Set. + URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"` +} + +// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway. +type ApplicationGatewayRewriteRuleCondition struct { + // Variable - The condition parameter of the RewriteRuleCondition. + Variable *string `json:"variable,omitempty"` + // Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. + Pattern *string `json:"pattern,omitempty"` + // IgnoreCase - Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. + IgnoreCase *bool `json:"ignoreCase,omitempty"` + // Negate - Setting this value as truth will force to check the negation of the condition given by the user. + Negate *bool `json:"negate,omitempty"` +} + +// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway. +type ApplicationGatewayRewriteRuleSet struct { + // ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set. + *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the rewrite rule set that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet. +func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil { + objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat + } + if agrrs.Name != nil { + objectMap["name"] = agrrs.Name + } + if agrrs.ID != nil { + objectMap["id"] = agrrs.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct. +func (agrrs *ApplicationGatewayRewriteRuleSet) 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 applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat) + if err != nil { + return err + } + agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agrrs.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agrrs.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agrrs.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application +// gateway. +type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { + // RewriteRules - Rewrite rules in the rewrite rule set. + RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat. +func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrspf.RewriteRules != nil { + objectMap["rewriteRules"] = agrrspf.RewriteRules + } + return json.Marshal(objectMap) +} + +// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationGatewaysBackendHealthFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result. +func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + agbh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent { + agbh, err = client.BackendHealthResponder(agbh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ApplicationGatewaysBackendHealthOnDemandFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result. +func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + agbhod.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent { + agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewaysClient) (ApplicationGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result. +func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ag.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { + ag, err = client.CreateOrUpdateResponder(ag.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewaysDeleteFuture.Result. +func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationGatewaySku SKU of an application gateway. +type ApplicationGatewaySku struct { + // Name - Name of an application gateway SKU. Possible values include: 'ApplicationGatewaySkuNameStandardSmall', 'ApplicationGatewaySkuNameStandardMedium', 'ApplicationGatewaySkuNameStandardLarge', 'ApplicationGatewaySkuNameWAFMedium', 'ApplicationGatewaySkuNameWAFLarge', 'ApplicationGatewaySkuNameStandardV2', 'ApplicationGatewaySkuNameWAFV2' + Name ApplicationGatewaySkuName `json:"name,omitempty"` + // Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2' + Tier ApplicationGatewayTier `json:"tier,omitempty"` + // Capacity - Capacity (instance count) of an application gateway. + Capacity *int32 `json:"capacity,omitempty"` +} + +// ApplicationGatewaySslCertificate SSL certificates of an application gateway. +type ApplicationGatewaySslCertificate struct { + // ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate. + *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the SSL certificate that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate. +func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil { + objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat + } + if agsc.Name != nil { + objectMap["name"] = agsc.Name + } + if agsc.ID != nil { + objectMap["id"] = agsc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct. +func (agsc *ApplicationGatewaySslCertificate) 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 applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat) + if err != nil { + return err + } + agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agsc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agsc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agsc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agsc.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application +// gateway. +type ApplicationGatewaySslCertificatePropertiesFormat struct { + // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request. + Data *string `json:"data,omitempty"` + // Password - Password for the pfx file specified in data. Only applicable in PUT request. + Password *string `json:"password,omitempty"` + // PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. + PublicCertData *string `json:"publicCertData,omitempty"` + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat. +func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agscpf.Data != nil { + objectMap["data"] = agscpf.Data + } + if agscpf.Password != nil { + objectMap["password"] = agscpf.Password + } + if agscpf.KeyVaultSecretID != nil { + objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID + } + return json.Marshal(objectMap) +} + +// ApplicationGatewaySslPolicy application Gateway Ssl policy. +type ApplicationGatewaySslPolicy struct { + // DisabledSslProtocols - Ssl protocols to be disabled on application gateway. + DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` + // PolicyType - Type of Ssl Policy. Possible values include: 'ApplicationGatewaySslPolicyTypePredefined', 'ApplicationGatewaySslPolicyTypeCustom' + PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` + // PolicyName - Name of Ssl predefined policy. Possible values include: 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S' + PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` + // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway. + CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` + // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'ApplicationGatewaySslProtocolTLSv10', 'ApplicationGatewaySslProtocolTLSv11', 'ApplicationGatewaySslProtocolTLSv12' + MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` +} + +// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy. +type ApplicationGatewaySslPredefinedPolicy struct { + autorest.Response `json:"-"` + // Name - Name of the Ssl predefined policy. + Name *string `json:"name,omitempty"` + // ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy. + *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy. +func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agspp.Name != nil { + objectMap["name"] = agspp.Name + } + if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil { + objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat + } + if agspp.ID != nil { + objectMap["id"] = agspp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct. +func (agspp *ApplicationGatewaySslPredefinedPolicy) 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 + } + agspp.Name = &name + } + case "properties": + if v != nil { + var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat) + if err != nil { + return err + } + agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agspp.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of +// ApplicationGatewaySslPredefinedPolicy. +type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { + // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway. + CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` + // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'ApplicationGatewaySslProtocolTLSv10', 'ApplicationGatewaySslProtocolTLSv11', 'ApplicationGatewaySslProtocolTLSv12' + MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` +} + +// ApplicationGatewaySslProfile SSL profile of an application gateway. +type ApplicationGatewaySslProfile struct { + // ApplicationGatewaySslProfilePropertiesFormat - Properties of the application gateway SSL profile. + *ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the SSL profile that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewaySslProfile. +func (agsp ApplicationGatewaySslProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agsp.ApplicationGatewaySslProfilePropertiesFormat != nil { + objectMap["properties"] = agsp.ApplicationGatewaySslProfilePropertiesFormat + } + if agsp.Name != nil { + objectMap["name"] = agsp.Name + } + if agsp.ID != nil { + objectMap["id"] = agsp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslProfile struct. +func (agsp *ApplicationGatewaySslProfile) 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 applicationGatewaySslProfilePropertiesFormat ApplicationGatewaySslProfilePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewaySslProfilePropertiesFormat) + if err != nil { + return err + } + agsp.ApplicationGatewaySslProfilePropertiesFormat = &applicationGatewaySslProfilePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agsp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agsp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agsp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agsp.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewaySslProfilePropertiesFormat properties of SSL profile of an application gateway. +type ApplicationGatewaySslProfilePropertiesFormat struct { + // TrustedClientCertificates - Array of references to application gateway trusted client certificates. + TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"` + // SslPolicy - SSL policy of the application gateway resource. + SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` + // ClientAuthConfiguration - Client authentication configuration of the application gateway resource. + ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewaySslProfilePropertiesFormat. +func (agsppf ApplicationGatewaySslProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agsppf.TrustedClientCertificates != nil { + objectMap["trustedClientCertificates"] = agsppf.TrustedClientCertificates + } + if agsppf.SslPolicy != nil { + objectMap["sslPolicy"] = agsppf.SslPolicy + } + if agsppf.ClientAuthConfiguration != nil { + objectMap["clientAuthConfiguration"] = agsppf.ClientAuthConfiguration + } + return json.Marshal(objectMap) +} + +// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationGatewaysStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewaysStartFuture.Result. +func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ApplicationGatewaysStopFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationGatewaysStopFuture.Result. +func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationGatewayTrustedClientCertificate trusted client certificates of an application gateway. +type ApplicationGatewayTrustedClientCertificate struct { + // ApplicationGatewayTrustedClientCertificatePropertiesFormat - Properties of the application gateway trusted client certificate. + *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the trusted client certificate that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificate. +func (agtcc ApplicationGatewayTrustedClientCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat != nil { + objectMap["properties"] = agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat + } + if agtcc.Name != nil { + objectMap["name"] = agtcc.Name + } + if agtcc.ID != nil { + objectMap["id"] = agtcc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedClientCertificate struct. +func (agtcc *ApplicationGatewayTrustedClientCertificate) 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 applicationGatewayTrustedClientCertificatePropertiesFormat ApplicationGatewayTrustedClientCertificatePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayTrustedClientCertificatePropertiesFormat) + if err != nil { + return err + } + agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat = &applicationGatewayTrustedClientCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agtcc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agtcc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agtcc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agtcc.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayTrustedClientCertificatePropertiesFormat trusted client certificates properties of an +// application gateway. +type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { + // Data - Certificate public data. + Data *string `json:"data,omitempty"` + // ValidatedCertData - READ-ONLY; Validated certificate data. + ValidatedCertData *string `json:"validatedCertData,omitempty"` + // ClientCertIssuerDN - READ-ONLY; Distinguished name of client certificate issuer. + ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the trusted client certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificatePropertiesFormat. +func (agtccpf ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agtccpf.Data != nil { + objectMap["data"] = agtccpf.Data + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway. +type ApplicationGatewayTrustedRootCertificate struct { + // ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate. + *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the trusted root certificate that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate. +func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil { + objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat + } + if agtrc.Name != nil { + objectMap["name"] = agtrc.Name + } + if agtrc.ID != nil { + objectMap["id"] = agtrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct. +func (agtrc *ApplicationGatewayTrustedRootCertificate) 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 applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat) + if err != nil { + return err + } + agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agtrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agtrc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agtrc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agtrc.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an +// application gateway. +type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { + // Data - Certificate public data. + Data *string `json:"data,omitempty"` + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat. +func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agtrcpf.Data != nil { + objectMap["data"] = agtrcpf.Data + } + if agtrcpf.KeyVaultSecretID != nil { + objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway. +type ApplicationGatewayURLConfiguration struct { + // ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null. + ModifiedPath *string `json:"modifiedPath,omitempty"` + // ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null. + ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` + // Reroute - If set as true, it will re-evaluate the url path map provided in path based request routing rules using modified path. Default value is false. + Reroute *bool `json:"reroute,omitempty"` +} + +// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for +// PathBasedRouting. +type ApplicationGatewayURLPathMap struct { + // ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map. + *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the URL path map that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap. +func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil { + objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat + } + if agupm.Name != nil { + objectMap["name"] = agupm.Name + } + if agupm.ID != nil { + objectMap["id"] = agupm.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct. +func (agupm *ApplicationGatewayURLPathMap) 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 applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat) + if err != nil { + return err + } + agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agupm.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agupm.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agupm.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agupm.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway. +type ApplicationGatewayURLPathMapPropertiesFormat struct { + // DefaultBackendAddressPool - Default backend address pool resource of URL path map. + DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` + // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map. + DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` + // DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map. + DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` + // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map. + DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` + // DefaultLoadDistributionPolicy - Default Load Distribution Policy resource of URL path map. + DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` + // PathRules - Path rule of URL path map resource. + PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat. +func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agupmpf.DefaultBackendAddressPool != nil { + objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool + } + if agupmpf.DefaultBackendHTTPSettings != nil { + objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings + } + if agupmpf.DefaultRewriteRuleSet != nil { + objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet + } + if agupmpf.DefaultRedirectConfiguration != nil { + objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration + } + if agupmpf.DefaultLoadDistributionPolicy != nil { + objectMap["defaultLoadDistributionPolicy"] = agupmpf.DefaultLoadDistributionPolicy + } + if agupmpf.PathRules != nil { + objectMap["pathRules"] = agupmpf.PathRules + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall +// configuration. +type ApplicationGatewayWebApplicationFirewallConfiguration struct { + // Enabled - Whether the web application firewall is enabled or not. + Enabled *bool `json:"enabled,omitempty"` + // FirewallMode - Web application firewall mode. Possible values include: 'ApplicationGatewayFirewallModeDetection', 'ApplicationGatewayFirewallModePrevention' + FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` + // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'. + RuleSetType *string `json:"ruleSetType,omitempty"` + // RuleSetVersion - The version of the rule set type. + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` + // DisabledRuleGroups - The disabled rule groups. + DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` + // RequestBodyCheck - Whether allow WAF to check request Body. + RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` + // MaxRequestBodySize - Maximum request body size for WAF. + MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"` + // MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF. + MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"` + // FileUploadLimitInMb - Maximum file upload size in Mb for WAF. + FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"` + // Exclusions - The exclusion list. + Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` +} + +// ApplicationRule rule of type application. +type ApplicationRule struct { + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses or Service Tags. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // Protocols - Array of Application Protocols. + Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"` + // TargetFqdns - List of FQDNs for this rule. + TargetFqdns *[]string `json:"targetFqdns,omitempty"` + // TargetUrls - List of Urls for this rule condition. + TargetUrls *[]string `json:"targetUrls,omitempty"` + // FqdnTags - List of FQDN Tags for this rule. + FqdnTags *[]string `json:"fqdnTags,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` + // TerminateTLS - Terminate TLS connections for this rule. + TerminateTLS *bool `json:"terminateTLS,omitempty"` + // WebCategories - List of destination azure web categories. + WebCategories *[]string `json:"webCategories,omitempty"` + // Name - Name of the rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule' + RuleType RuleType `json:"ruleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationRule. +func (ar ApplicationRule) MarshalJSON() ([]byte, error) { + ar.RuleType = RuleTypeApplicationRule + objectMap := make(map[string]interface{}) + if ar.SourceAddresses != nil { + objectMap["sourceAddresses"] = ar.SourceAddresses + } + if ar.DestinationAddresses != nil { + objectMap["destinationAddresses"] = ar.DestinationAddresses + } + if ar.Protocols != nil { + objectMap["protocols"] = ar.Protocols + } + if ar.TargetFqdns != nil { + objectMap["targetFqdns"] = ar.TargetFqdns + } + if ar.TargetUrls != nil { + objectMap["targetUrls"] = ar.TargetUrls + } + if ar.FqdnTags != nil { + objectMap["fqdnTags"] = ar.FqdnTags + } + if ar.SourceIPGroups != nil { + objectMap["sourceIpGroups"] = ar.SourceIPGroups + } + if ar.TerminateTLS != nil { + objectMap["terminateTLS"] = ar.TerminateTLS + } + if ar.WebCategories != nil { + objectMap["webCategories"] = ar.WebCategories + } + if ar.Name != nil { + objectMap["name"] = ar.Name + } + if ar.Description != nil { + objectMap["description"] = ar.Description + } + if ar.RuleType != "" { + objectMap["ruleType"] = ar.RuleType + } + return json.Marshal(objectMap) +} + +// AsApplicationRule is the BasicFirewallPolicyRule implementation for ApplicationRule. +func (ar ApplicationRule) AsApplicationRule() (*ApplicationRule, bool) { + return &ar, true +} + +// AsNatRule is the BasicFirewallPolicyRule implementation for ApplicationRule. +func (ar ApplicationRule) AsNatRule() (*NatRule, bool) { + return nil, false +} + +// AsRule is the BasicFirewallPolicyRule implementation for ApplicationRule. +func (ar ApplicationRule) AsRule() (*Rule, bool) { + return nil, false +} + +// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule. +func (ar ApplicationRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule. +func (ar ApplicationRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { + return &ar, true +} + +// ApplicationSecurityGroup an application security group in a resource group. +type ApplicationSecurityGroup struct { + autorest.Response `json:"-"` + // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group. + *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 ApplicationSecurityGroup. +func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asg.ApplicationSecurityGroupPropertiesFormat != nil { + objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat + } + if asg.ID != nil { + objectMap["id"] = asg.ID + } + if asg.Location != nil { + objectMap["location"] = asg.Location + } + if asg.Tags != nil { + objectMap["tags"] = asg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct. +func (asg *ApplicationSecurityGroup) 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 applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat + err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat) + if err != nil { + return err + } + asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + asg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + asg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + asg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + asg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + asg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + asg.Tags = tags + } + } + } + + return nil +} + +// ApplicationSecurityGroupListResult a list of application security groups. +type ApplicationSecurityGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of application security groups. + Value *[]ApplicationSecurityGroup `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult. +func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asglr.Value != nil { + objectMap["value"] = asglr.Value + } + return json.Marshal(objectMap) +} + +// ApplicationSecurityGroupListResultIterator provides access to a complete listing of +// ApplicationSecurityGroup values. +type ApplicationSecurityGroupListResultIterator struct { + i int + page ApplicationSecurityGroupListResultPage +} + +// 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 *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.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 *ApplicationSecurityGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationSecurityGroupListResultIterator) 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 ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult { + 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 ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup { + if !iter.page.NotDone() { + return ApplicationSecurityGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationSecurityGroupListResultIterator type. +func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator { + return ApplicationSecurityGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool { + return asglr.Value == nil || len(*asglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool { + return asglr.NextLink != nil && len(*asglr.NextLink) != 0 +} + +// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !asglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(asglr.NextLink))) +} + +// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values. +type ApplicationSecurityGroupListResultPage struct { + fn func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error) + asglr ApplicationSecurityGroupListResult +} + +// 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 *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.asglr) + if err != nil { + return err + } + page.asglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ApplicationSecurityGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationSecurityGroupListResultPage) NotDone() bool { + return !page.asglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult { + return page.asglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup { + if page.asglr.IsEmpty() { + return nil + } + return *page.asglr.Value +} + +// Creates a new instance of the ApplicationSecurityGroupListResultPage type. +func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage { + return ApplicationSecurityGroupListResultPage{ + fn: getNextPage, + asglr: cur, + } +} + +// ApplicationSecurityGroupPropertiesFormat application security group properties. +type ApplicationSecurityGroupPropertiesFormat struct { + // ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat. +func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ApplicationSecurityGroupsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result. +func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + asg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent { + asg, err = client.CreateOrUpdateResponder(asg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationSecurityGroupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApplicationSecurityGroupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result. +func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations +// that belongs to an ExpressRouteCircuit. +type AuthorizationListResult struct { + autorest.Response `json:"-"` + // Value - The authorizations in an ExpressRoute Circuit. + Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AuthorizationListResultIterator provides access to a complete listing of +// ExpressRouteCircuitAuthorization values. +type AuthorizationListResultIterator struct { + i int + page AuthorizationListResultPage +} + +// 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 *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.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 *AuthorizationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AuthorizationListResultIterator) 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 AuthorizationListResultIterator) Response() AuthorizationListResult { + 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 AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization { + if !iter.page.NotDone() { + return ExpressRouteCircuitAuthorization{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AuthorizationListResultIterator type. +func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator { + return AuthorizationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (alr AuthorizationListResult) IsEmpty() bool { + return alr.Value == nil || len(*alr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (alr AuthorizationListResult) hasNextLink() bool { + return alr.NextLink != nil && len(*alr.NextLink) != 0 +} + +// authorizationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !alr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(alr.NextLink))) +} + +// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values. +type AuthorizationListResultPage struct { + fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error) + alr AuthorizationListResult +} + +// 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 *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AuthorizationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AuthorizationListResultPage) NotDone() bool { + return !page.alr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AuthorizationListResultPage) Response() AuthorizationListResult { + return page.alr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization { + if page.alr.IsEmpty() { + return nil + } + return *page.alr.Value +} + +// Creates a new instance of the AuthorizationListResultPage type. +func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { + return AuthorizationListResultPage{ + fn: getNextPage, + alr: cur, + } +} + +// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. +type AuthorizationPropertiesFormat struct { + // AuthorizationKey - The authorization key. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // AuthorizationUseStatus - The authorization use status. Possible values include: 'AuthorizationUseStatusAvailable', 'AuthorizationUseStatusInUse' + AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat. +func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apf.AuthorizationKey != nil { + objectMap["authorizationKey"] = apf.AuthorizationKey + } + if apf.AuthorizationUseStatus != "" { + objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus + } + return json.Marshal(objectMap) +} + +// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService. +type AutoApprovedPrivateLinkService struct { + // PrivateLinkService - The id of the private link service resource. + PrivateLinkService *string `json:"privateLinkService,omitempty"` +} + +// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a +// private end point with auto approved. +type AutoApprovedPrivateLinkServicesResult struct { + autorest.Response `json:"-"` + // Value - An array of auto approved private link service. + Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult. +func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aaplsr.Value != nil { + objectMap["value"] = aaplsr.Value + } + return json.Marshal(objectMap) +} + +// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of +// AutoApprovedPrivateLinkService values. +type AutoApprovedPrivateLinkServicesResultIterator struct { + i int + page AutoApprovedPrivateLinkServicesResultPage +} + +// 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 *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.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 *AutoApprovedPrivateLinkServicesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AutoApprovedPrivateLinkServicesResultIterator) 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 AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult { + 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 AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService { + if !iter.page.NotDone() { + return AutoApprovedPrivateLinkService{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type. +func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator { + return AutoApprovedPrivateLinkServicesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool { + return aaplsr.Value == nil || len(*aaplsr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool { + return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0 +} + +// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) { + if !aaplsr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aaplsr.NextLink))) +} + +// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values. +type AutoApprovedPrivateLinkServicesResultPage struct { + fn func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error) + aaplsr AutoApprovedPrivateLinkServicesResult +} + +// 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 *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.aaplsr) + if err != nil { + return err + } + page.aaplsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AutoApprovedPrivateLinkServicesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool { + return !page.aaplsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult { + return page.aaplsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService { + if page.aaplsr.IsEmpty() { + return nil + } + return *page.aaplsr.Value +} + +// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type. +func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage { + return AutoApprovedPrivateLinkServicesResultPage{ + fn: getNextPage, + aaplsr: cur, + } +} + +// Availability availability of the metric. +type Availability struct { + // TimeGrain - The time grain of the availability. + TimeGrain *string `json:"timeGrain,omitempty"` + // Retention - The retention of the availability. + Retention *string `json:"retention,omitempty"` + // BlobDuration - Duration of the availability blob. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a +// subnet. +type AvailableDelegation struct { + // Name - The name of the AvailableDelegation resource. + Name *string `json:"name,omitempty"` + // ID - A unique identifier of the AvailableDelegation resource. + ID *string `json:"id,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ServiceName - The name of the service and resource. + ServiceName *string `json:"serviceName,omitempty"` + // Actions - The actions permitted to the service upon delegation. + Actions *[]string `json:"actions,omitempty"` +} + +// AvailableDelegationsResult an array of available delegations. +type AvailableDelegationsResult struct { + autorest.Response `json:"-"` + // Value - An array of available delegations. + Value *[]AvailableDelegation `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for AvailableDelegationsResult. +func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if adr.Value != nil { + objectMap["value"] = adr.Value + } + return json.Marshal(objectMap) +} + +// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values. +type AvailableDelegationsResultIterator struct { + i int + page AvailableDelegationsResultPage +} + +// 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 *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.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 *AvailableDelegationsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailableDelegationsResultIterator) 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 AvailableDelegationsResultIterator) Response() AvailableDelegationsResult { + 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 AvailableDelegationsResultIterator) Value() AvailableDelegation { + if !iter.page.NotDone() { + return AvailableDelegation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AvailableDelegationsResultIterator type. +func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator { + return AvailableDelegationsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (adr AvailableDelegationsResult) IsEmpty() bool { + return adr.Value == nil || len(*adr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (adr AvailableDelegationsResult) hasNextLink() bool { + return adr.NextLink != nil && len(*adr.NextLink) != 0 +} + +// availableDelegationsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) { + if !adr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(adr.NextLink))) +} + +// AvailableDelegationsResultPage contains a page of AvailableDelegation values. +type AvailableDelegationsResultPage struct { + fn func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error) + adr AvailableDelegationsResult +} + +// 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 *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.adr) + if err != nil { + return err + } + page.adr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AvailableDelegationsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailableDelegationsResultPage) NotDone() bool { + return !page.adr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult { + return page.adr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailableDelegationsResultPage) Values() []AvailableDelegation { + if page.adr.IsEmpty() { + return nil + } + return *page.adr.Value +} + +// Creates a new instance of the AvailableDelegationsResultPage type. +func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage { + return AvailableDelegationsResultPage{ + fn: getNextPage, + adr: cur, + } +} + +// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType. +type AvailablePrivateEndpointType struct { + // Name - The name of the service and resource. + Name *string `json:"name,omitempty"` + // ID - A unique identifier of the AvailablePrivateEndpoint Type resource. + ID *string `json:"id,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ResourceName - The name of the service and resource. + ResourceName *string `json:"resourceName,omitempty"` + // DisplayName - Display name of the resource. + DisplayName *string `json:"displayName,omitempty"` +} + +// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types. +type AvailablePrivateEndpointTypesResult struct { + autorest.Response `json:"-"` + // Value - An array of available privateEndpoint type. + Value *[]AvailablePrivateEndpointType `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult. +func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apetr.Value != nil { + objectMap["value"] = apetr.Value + } + return json.Marshal(objectMap) +} + +// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of +// AvailablePrivateEndpointType values. +type AvailablePrivateEndpointTypesResultIterator struct { + i int + page AvailablePrivateEndpointTypesResultPage +} + +// 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 *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.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 *AvailablePrivateEndpointTypesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailablePrivateEndpointTypesResultIterator) 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 AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult { + 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 AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType { + if !iter.page.NotDone() { + return AvailablePrivateEndpointType{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type. +func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator { + return AvailablePrivateEndpointTypesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool { + return apetr.Value == nil || len(*apetr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool { + return apetr.NextLink != nil && len(*apetr.NextLink) != 0 +} + +// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) { + if !apetr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(apetr.NextLink))) +} + +// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values. +type AvailablePrivateEndpointTypesResultPage struct { + fn func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error) + apetr AvailablePrivateEndpointTypesResult +} + +// 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 *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.apetr) + if err != nil { + return err + } + page.apetr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AvailablePrivateEndpointTypesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool { + return !page.apetr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult { + return page.apetr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType { + if page.apetr.IsEmpty() { + return nil + } + return *page.apetr.Value +} + +// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type. +func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage { + return AvailablePrivateEndpointTypesResultPage{ + fn: getNextPage, + apetr: cur, + } +} + +// AvailableProvidersList list of available countries with details. +type AvailableProvidersList struct { + autorest.Response `json:"-"` + // Countries - List of available countries. + Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"` +} + +// AvailableProvidersListCity city or town details. +type AvailableProvidersListCity struct { + // CityName - The city or town name. + CityName *string `json:"cityName,omitempty"` + // Providers - A list of Internet service providers. + Providers *[]string `json:"providers,omitempty"` +} + +// AvailableProvidersListCountry country details. +type AvailableProvidersListCountry struct { + // CountryName - The country name. + CountryName *string `json:"countryName,omitempty"` + // Providers - A list of Internet service providers. + Providers *[]string `json:"providers,omitempty"` + // States - List of available states in the country. + States *[]AvailableProvidersListState `json:"states,omitempty"` +} + +// AvailableProvidersListParameters constraints that determine the list of available Internet service +// providers. +type AvailableProvidersListParameters struct { + // AzureLocations - A list of Azure regions. + AzureLocations *[]string `json:"azureLocations,omitempty"` + // Country - The country for available providers list. + Country *string `json:"country,omitempty"` + // State - The state for available providers list. + State *string `json:"state,omitempty"` + // City - The city or town for available providers list. + City *string `json:"city,omitempty"` +} + +// AvailableProvidersListState state details. +type AvailableProvidersListState struct { + // StateName - The state name. + StateName *string `json:"stateName,omitempty"` + // Providers - A list of Internet service providers. + Providers *[]string `json:"providers,omitempty"` + // Cities - List of available cities or towns in the state. + Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` +} + +// AvailableServiceAlias the available service alias. +type AvailableServiceAlias struct { + // Name - The name of the service alias. + Name *string `json:"name,omitempty"` + // ID - The ID of the service alias. + ID *string `json:"id,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` + // ResourceName - The resource name of the service alias. + ResourceName *string `json:"resourceName,omitempty"` +} + +// AvailableServiceAliasesResult an array of available service aliases. +type AvailableServiceAliasesResult struct { + autorest.Response `json:"-"` + // Value - An array of available service aliases. + Value *[]AvailableServiceAlias `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult. +func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asar.Value != nil { + objectMap["value"] = asar.Value + } + return json.Marshal(objectMap) +} + +// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias +// values. +type AvailableServiceAliasesResultIterator struct { + i int + page AvailableServiceAliasesResultPage +} + +// 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 *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.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 *AvailableServiceAliasesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailableServiceAliasesResultIterator) 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 AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult { + 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 AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias { + if !iter.page.NotDone() { + return AvailableServiceAlias{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AvailableServiceAliasesResultIterator type. +func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator { + return AvailableServiceAliasesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (asar AvailableServiceAliasesResult) IsEmpty() bool { + return asar.Value == nil || len(*asar.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (asar AvailableServiceAliasesResult) hasNextLink() bool { + return asar.NextLink != nil && len(*asar.NextLink) != 0 +} + +// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) { + if !asar.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(asar.NextLink))) +} + +// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values. +type AvailableServiceAliasesResultPage struct { + fn func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error) + asar AvailableServiceAliasesResult +} + +// 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 *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.asar) + if err != nil { + return err + } + page.asar = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AvailableServiceAliasesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailableServiceAliasesResultPage) NotDone() bool { + return !page.asar.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult { + return page.asar +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias { + if page.asar.IsEmpty() { + return nil + } + return *page.asar.Value +} + +// Creates a new instance of the AvailableServiceAliasesResultPage type. +func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage { + return AvailableServiceAliasesResultPage{ + fn: getNextPage, + asar: cur, + } +} + +// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, +// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct +// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous +// operation succeeded, the response body includes the HTTP status code for the successful request. If the +// asynchronous operation failed, the response body includes the HTTP status code for the failed request +// and error information regarding the failure. +type AzureAsyncOperationResult struct { + // Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' + Status OperationStatus `json:"status,omitempty"` + // Error - Details of the error occurred during specified asynchronous operation. + Error *Error `json:"error,omitempty"` +} + +// AzureFirewall azure Firewall resource. +type AzureFirewall struct { + autorest.Response `json:"-"` + // AzureFirewallPropertiesFormat - Properties of the azure firewall. + *AzureFirewallPropertiesFormat `json:"properties,omitempty"` + // Zones - A list of availability zones denoting where the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 AzureFirewall. +func (af AzureFirewall) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if af.AzureFirewallPropertiesFormat != nil { + objectMap["properties"] = af.AzureFirewallPropertiesFormat + } + if af.Zones != nil { + objectMap["zones"] = af.Zones + } + if af.ID != nil { + objectMap["id"] = af.ID + } + if af.Location != nil { + objectMap["location"] = af.Location + } + if af.Tags != nil { + objectMap["tags"] = af.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct. +func (af *AzureFirewall) 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 azureFirewallPropertiesFormat AzureFirewallPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallPropertiesFormat) + if err != nil { + return err + } + af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + af.Zones = &zones + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + af.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + af.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + af.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + af.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + af.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + af.Tags = tags + } + } + } + + return nil +} + +// AzureFirewallApplicationRule properties of an application rule. +type AzureFirewallApplicationRule struct { + // Name - Name of the application rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // Protocols - Array of ApplicationRuleProtocols. + Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"` + // TargetFqdns - List of FQDNs for this rule. + TargetFqdns *[]string `json:"targetFqdns,omitempty"` + // FqdnTags - List of FQDN Tags for this rule. + FqdnTags *[]string `json:"fqdnTags,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` +} + +// AzureFirewallApplicationRuleCollection application rule collection resource. +type AzureFirewallApplicationRuleCollection struct { + // AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection. + *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection. +func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil { + objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat + } + if afarc.Name != nil { + objectMap["name"] = afarc.Name + } + if afarc.ID != nil { + objectMap["id"] = afarc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct. +func (afarc *AzureFirewallApplicationRuleCollection) 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 azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat) + if err != nil { + return err + } + afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + afarc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + afarc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + afarc.ID = &ID + } + } + } + + return nil +} + +// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection. +type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { + // Priority - Priority of the application rule collection resource. + Priority *int32 `json:"priority,omitempty"` + // Action - The action type of a rule collection. + Action *AzureFirewallRCAction `json:"action,omitempty"` + // Rules - Collection of rules used by a application rule collection. + Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat. +func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afarcpf.Priority != nil { + objectMap["priority"] = afarcpf.Priority + } + if afarcpf.Action != nil { + objectMap["action"] = afarcpf.Action + } + if afarcpf.Rules != nil { + objectMap["rules"] = afarcpf.Rules + } + return json.Marshal(objectMap) +} + +// AzureFirewallApplicationRuleProtocol properties of the application rule protocol. +type AzureFirewallApplicationRuleProtocol struct { + // ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql' + ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"` + // Port - Port number for the protocol, cannot be greater than 64000. This field is optional. + Port *int32 `json:"port,omitempty"` +} + +// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource. +type AzureFirewallFqdnTag struct { + // AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag. + *AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 AzureFirewallFqdnTag. +func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afft.AzureFirewallFqdnTagPropertiesFormat != nil { + objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat + } + if afft.ID != nil { + objectMap["id"] = afft.ID + } + if afft.Location != nil { + objectMap["location"] = afft.Location + } + if afft.Tags != nil { + objectMap["tags"] = afft.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct. +func (afft *AzureFirewallFqdnTag) 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 azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat) + if err != nil { + return err + } + afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + afft.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + afft.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + afft.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + afft.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + afft.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + afft.Tags = tags + } + } + } + + return nil +} + +// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call. +type AzureFirewallFqdnTagListResult struct { + autorest.Response `json:"-"` + // Value - List of Azure Firewall FQDN Tags in a resource group. + Value *[]AzureFirewallFqdnTag `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag +// values. +type AzureFirewallFqdnTagListResultIterator struct { + i int + page AzureFirewallFqdnTagListResultPage +} + +// 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 *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.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 *AzureFirewallFqdnTagListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AzureFirewallFqdnTagListResultIterator) 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 AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult { + 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 AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag { + if !iter.page.NotDone() { + return AzureFirewallFqdnTag{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type. +func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator { + return AzureFirewallFqdnTagListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool { + return afftlr.Value == nil || len(*afftlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool { + return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0 +} + +// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) { + if !afftlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(afftlr.NextLink))) +} + +// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values. +type AzureFirewallFqdnTagListResultPage struct { + fn func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error) + afftlr AzureFirewallFqdnTagListResult +} + +// 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 *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.afftlr) + if err != nil { + return err + } + page.afftlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AzureFirewallFqdnTagListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AzureFirewallFqdnTagListResultPage) NotDone() bool { + return !page.afftlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult { + return page.afftlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag { + if page.afftlr.IsEmpty() { + return nil + } + return *page.afftlr.Value +} + +// Creates a new instance of the AzureFirewallFqdnTagListResultPage type. +func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage { + return AzureFirewallFqdnTagListResultPage{ + fn: getNextPage, + afftlr: cur, + } +} + +// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties. +type AzureFirewallFqdnTagPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // FqdnTagName - READ-ONLY; The name of this FQDN Tag. + FqdnTagName *string `json:"fqdnTagName,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat. +func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AzureFirewallIPConfiguration IP configuration of an Azure Firewall. +type AzureFirewallIPConfiguration struct { + // AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration. + *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration. +func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afic.AzureFirewallIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat + } + if afic.Name != nil { + objectMap["name"] = afic.Name + } + if afic.ID != nil { + objectMap["id"] = afic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct. +func (afic *AzureFirewallIPConfiguration) 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 azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat) + if err != nil { + return err + } + afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + afic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + afic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + afic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + afic.ID = &ID + } + } + } + + return nil +} + +// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall. +type AzureFirewallIPConfigurationPropertiesFormat struct { + // PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. + Subnet *SubResource `json:"subnet,omitempty"` + // PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat. +func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aficpf.Subnet != nil { + objectMap["subnet"] = aficpf.Subnet + } + if aficpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = aficpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + +// AzureFirewallIPGroups ipGroups associated with azure firewall. +type AzureFirewallIPGroups struct { + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // ChangeNumber - READ-ONLY; The iteration number. + ChangeNumber *string `json:"changeNumber,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallIPGroups. +func (afig AzureFirewallIPGroups) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AzureFirewallListResult response for ListAzureFirewalls API service call. +type AzureFirewallListResult struct { + autorest.Response `json:"-"` + // Value - List of Azure Firewalls in a resource group. + Value *[]AzureFirewall `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values. +type AzureFirewallListResultIterator struct { + i int + page AzureFirewallListResultPage +} + +// 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 *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.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 *AzureFirewallListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AzureFirewallListResultIterator) 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 AzureFirewallListResultIterator) Response() AzureFirewallListResult { + 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 AzureFirewallListResultIterator) Value() AzureFirewall { + if !iter.page.NotDone() { + return AzureFirewall{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AzureFirewallListResultIterator type. +func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator { + return AzureFirewallListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aflr AzureFirewallListResult) IsEmpty() bool { + return aflr.Value == nil || len(*aflr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (aflr AzureFirewallListResult) hasNextLink() bool { + return aflr.NextLink != nil && len(*aflr.NextLink) != 0 +} + +// azureFirewallListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) { + if !aflr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aflr.NextLink))) +} + +// AzureFirewallListResultPage contains a page of AzureFirewall values. +type AzureFirewallListResultPage struct { + fn func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error) + aflr AzureFirewallListResult +} + +// 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 *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.aflr) + if err != nil { + return err + } + page.aflr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AzureFirewallListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AzureFirewallListResultPage) NotDone() bool { + return !page.aflr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AzureFirewallListResultPage) Response() AzureFirewallListResult { + return page.aflr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AzureFirewallListResultPage) Values() []AzureFirewall { + if page.aflr.IsEmpty() { + return nil + } + return *page.aflr.Value +} + +// Creates a new instance of the AzureFirewallListResultPage type. +func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage { + return AzureFirewallListResultPage{ + fn: getNextPage, + aflr: cur, + } +} + +// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action. +type AzureFirewallNatRCAction struct { + // Type - The type of action. Possible values include: 'AzureFirewallNatRCActionTypeSnat', 'AzureFirewallNatRCActionTypeDnat' + Type AzureFirewallNatRCActionType `json:"type,omitempty"` +} + +// AzureFirewallNatRule properties of a NAT rule. +type AzureFirewallNatRule struct { + // Name - Name of the NAT rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // DestinationPorts - List of destination ports. + DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` + // TranslatedAddress - The translated address for this NAT rule. + TranslatedAddress *string `json:"translatedAddress,omitempty"` + // TranslatedPort - The translated port for this NAT rule. + TranslatedPort *string `json:"translatedPort,omitempty"` + // TranslatedFqdn - The translated FQDN for this NAT rule. + TranslatedFqdn *string `json:"translatedFqdn,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` +} + +// AzureFirewallNatRuleCollection NAT rule collection resource. +type AzureFirewallNatRuleCollection struct { + // AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection. + *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection. +func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afnrc.AzureFirewallNatRuleCollectionProperties != nil { + objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties + } + if afnrc.Name != nil { + objectMap["name"] = afnrc.Name + } + if afnrc.ID != nil { + objectMap["id"] = afnrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct. +func (afnrc *AzureFirewallNatRuleCollection) 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 azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties + err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties) + if err != nil { + return err + } + afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + afnrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + afnrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + afnrc.ID = &ID + } + } + } + + return nil +} + +// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection. +type AzureFirewallNatRuleCollectionProperties struct { + // Priority - Priority of the NAT rule collection resource. + Priority *int32 `json:"priority,omitempty"` + // Action - The action type of a NAT rule collection. + Action *AzureFirewallNatRCAction `json:"action,omitempty"` + // Rules - Collection of rules used by a NAT rule collection. + Rules *[]AzureFirewallNatRule `json:"rules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties. +func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afnrcp.Priority != nil { + objectMap["priority"] = afnrcp.Priority + } + if afnrcp.Action != nil { + objectMap["action"] = afnrcp.Action + } + if afnrcp.Rules != nil { + objectMap["rules"] = afnrcp.Rules + } + return json.Marshal(objectMap) +} + +// AzureFirewallNetworkRule properties of the network rule. +type AzureFirewallNetworkRule struct { + // Name - Name of the network rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // Protocols - Array of AzureFirewallNetworkRuleProtocols. + Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // DestinationPorts - List of destination ports. + DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // DestinationFqdns - List of destination FQDNs. + DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` + // DestinationIPGroups - List of destination IpGroups for this rule. + DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` +} + +// AzureFirewallNetworkRuleCollection network rule collection resource. +type AzureFirewallNetworkRuleCollection struct { + // AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection. + *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection. +func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil { + objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat + } + if afnrc.Name != nil { + objectMap["name"] = afnrc.Name + } + if afnrc.ID != nil { + objectMap["id"] = afnrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct. +func (afnrc *AzureFirewallNetworkRuleCollection) 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 azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat) + if err != nil { + return err + } + afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + afnrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + afnrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + afnrc.ID = &ID + } + } + } + + return nil +} + +// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection. +type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { + // Priority - Priority of the network rule collection resource. + Priority *int32 `json:"priority,omitempty"` + // Action - The action type of a rule collection. + Action *AzureFirewallRCAction `json:"action,omitempty"` + // Rules - Collection of rules used by a network rule collection. + Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat. +func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afnrcpf.Priority != nil { + objectMap["priority"] = afnrcpf.Priority + } + if afnrcpf.Action != nil { + objectMap["action"] = afnrcpf.Action + } + if afnrcpf.Rules != nil { + objectMap["rules"] = afnrcpf.Rules + } + return json.Marshal(objectMap) +} + +// AzureFirewallPropertiesFormat properties of the Azure Firewall. +type AzureFirewallPropertiesFormat struct { + // ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall. + ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"` + // NatRuleCollections - Collection of NAT rule collections used by Azure Firewall. + NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"` + // NetworkRuleCollections - Collection of network rule collections used by Azure Firewall. + NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` + // IPConfigurations - IP configuration of the Azure Firewall resource. + IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` + // ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic. + ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff' + ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` + // VirtualHub - The virtualHub to which the firewall belongs. + VirtualHub *SubResource `json:"virtualHub,omitempty"` + // FirewallPolicy - The firewallPolicy associated with this azure firewall. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` + // HubIPAddresses - IP addresses associated with AzureFirewall. + HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"` + // IPGroups - READ-ONLY; IpGroups associated with AzureFirewall. + IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"` + // Sku - The Azure Firewall Resource SKU. + Sku *AzureFirewallSku `json:"sku,omitempty"` + // AdditionalProperties - The additional properties used to further config this azure firewall. + AdditionalProperties map[string]*string `json:"additionalProperties"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat. +func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afpf.ApplicationRuleCollections != nil { + objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections + } + if afpf.NatRuleCollections != nil { + objectMap["natRuleCollections"] = afpf.NatRuleCollections + } + if afpf.NetworkRuleCollections != nil { + objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections + } + if afpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = afpf.IPConfigurations + } + if afpf.ManagementIPConfiguration != nil { + objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration + } + if afpf.ThreatIntelMode != "" { + objectMap["threatIntelMode"] = afpf.ThreatIntelMode + } + if afpf.VirtualHub != nil { + objectMap["virtualHub"] = afpf.VirtualHub + } + if afpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = afpf.FirewallPolicy + } + if afpf.HubIPAddresses != nil { + objectMap["hubIPAddresses"] = afpf.HubIPAddresses + } + if afpf.Sku != nil { + objectMap["sku"] = afpf.Sku + } + if afpf.AdditionalProperties != nil { + objectMap["additionalProperties"] = afpf.AdditionalProperties + } + return json.Marshal(objectMap) +} + +// AzureFirewallPublicIPAddress public IP Address associated with azure firewall. +type AzureFirewallPublicIPAddress struct { + // Address - Public IP Address value. + Address *string `json:"address,omitempty"` +} + +// AzureFirewallRCAction properties of the AzureFirewallRCAction. +type AzureFirewallRCAction struct { + // Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny' + Type AzureFirewallRCActionType `json:"type,omitempty"` +} + +// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AzureFirewallsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AzureFirewallsClient) (AzureFirewall, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result. +func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + af.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent { + af, err = client.CreateOrUpdateResponder(af.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request") + } + } + return +} + +// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AzureFirewallsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AzureFirewallsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AzureFirewallsDeleteFuture.Result. +func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AzureFirewallSku SKU of an Azure Firewall. +type AzureFirewallSku struct { + // Name - Name of an Azure Firewall SKU. Possible values include: 'AzureFirewallSkuNameAZFWVNet', 'AzureFirewallSkuNameAZFWHub' + Name AzureFirewallSkuName `json:"name,omitempty"` + // Tier - Tier of an Azure Firewall. Possible values include: 'AzureFirewallSkuTierStandard', 'AzureFirewallSkuTierPremium' + Tier AzureFirewallSkuTier `json:"tier,omitempty"` +} + +// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AzureFirewallsUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AzureFirewallsClient) (AzureFirewall, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AzureFirewallsUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AzureFirewallsUpdateTagsFuture.Result. +func (future *AzureFirewallsUpdateTagsFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + af.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent { + af, err = client.UpdateTagsResponder(af.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", af.Response.Response, "Failure responding to request") + } + } + return +} + +// AzureReachabilityReport azure reachability report details. +type AzureReachabilityReport struct { + autorest.Response `json:"-"` + // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. + AggregationLevel *string `json:"aggregationLevel,omitempty"` + // ProviderLocation - Parameters that define a geographic location. + ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` + // ReachabilityReport - List of Azure reachability report items. + ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` +} + +// AzureReachabilityReportItem azure reachability report details for a given provider location. +type AzureReachabilityReportItem struct { + // Provider - The Internet service provider. + Provider *string `json:"provider,omitempty"` + // AzureLocation - The Azure region. + AzureLocation *string `json:"azureLocation,omitempty"` + // Latencies - List of latency details for each of the time series. + Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` +} + +// AzureReachabilityReportLatencyInfo details on latency for a time series. +type AzureReachabilityReportLatencyInfo struct { + // TimeStamp - The time stamp. + TimeStamp *date.Time `json:"timeStamp,omitempty"` + // Score - The relative latency score between 1 and 100, higher values indicating a faster connection. + Score *int32 `json:"score,omitempty"` +} + +// AzureReachabilityReportLocation parameters that define a geographic location. +type AzureReachabilityReportLocation struct { + // Country - The name of the country. + Country *string `json:"country,omitempty"` + // State - The name of the state. + State *string `json:"state,omitempty"` + // City - The name of the city or town. + City *string `json:"city,omitempty"` +} + +// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. +type AzureReachabilityReportParameters struct { + // ProviderLocation - Parameters that define a geographic location. + ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` + // Providers - List of Internet service providers. + Providers *[]string `json:"providers,omitempty"` + // AzureLocations - Optional Azure regions to scope the query to. + AzureLocations *[]string `json:"azureLocations,omitempty"` + // StartTime - The start time for the Azure reachability report. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time for the Azure reachability report. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// AzureWebCategory azure Web Category Resource. +type AzureWebCategory struct { + autorest.Response `json:"-"` + // AzureWebCategoryPropertiesFormat - Properties of the Azure Web Category. + *AzureWebCategoryPropertiesFormat `json:"properties,omitempty"` + // ID - 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"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWebCategory. +func (awc AzureWebCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if awc.AzureWebCategoryPropertiesFormat != nil { + objectMap["properties"] = awc.AzureWebCategoryPropertiesFormat + } + if awc.ID != nil { + objectMap["id"] = awc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureWebCategory struct. +func (awc *AzureWebCategory) 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 azureWebCategoryPropertiesFormat AzureWebCategoryPropertiesFormat + err = json.Unmarshal(*v, &azureWebCategoryPropertiesFormat) + if err != nil { + return err + } + awc.AzureWebCategoryPropertiesFormat = &azureWebCategoryPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + awc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + awc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + awc.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + awc.Etag = &etag + } + } + } + + return nil +} + +// AzureWebCategoryListResult response for ListAzureWebCategories API service call. +type AzureWebCategoryListResult struct { + autorest.Response `json:"-"` + // Value - List of Azure Web Categories for a given Subscription. + Value *[]AzureWebCategory `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AzureWebCategoryListResultIterator provides access to a complete listing of AzureWebCategory values. +type AzureWebCategoryListResultIterator struct { + i int + page AzureWebCategoryListResultPage +} + +// 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 *AzureWebCategoryListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultIterator.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 *AzureWebCategoryListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AzureWebCategoryListResultIterator) 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 AzureWebCategoryListResultIterator) Response() AzureWebCategoryListResult { + 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 AzureWebCategoryListResultIterator) Value() AzureWebCategory { + if !iter.page.NotDone() { + return AzureWebCategory{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AzureWebCategoryListResultIterator type. +func NewAzureWebCategoryListResultIterator(page AzureWebCategoryListResultPage) AzureWebCategoryListResultIterator { + return AzureWebCategoryListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (awclr AzureWebCategoryListResult) IsEmpty() bool { + return awclr.Value == nil || len(*awclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (awclr AzureWebCategoryListResult) hasNextLink() bool { + return awclr.NextLink != nil && len(*awclr.NextLink) != 0 +} + +// azureWebCategoryListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (awclr AzureWebCategoryListResult) azureWebCategoryListResultPreparer(ctx context.Context) (*http.Request, error) { + if !awclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(awclr.NextLink))) +} + +// AzureWebCategoryListResultPage contains a page of AzureWebCategory values. +type AzureWebCategoryListResultPage struct { + fn func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error) + awclr AzureWebCategoryListResult +} + +// 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 *AzureWebCategoryListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.awclr) + if err != nil { + return err + } + page.awclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AzureWebCategoryListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AzureWebCategoryListResultPage) NotDone() bool { + return !page.awclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AzureWebCategoryListResultPage) Response() AzureWebCategoryListResult { + return page.awclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AzureWebCategoryListResultPage) Values() []AzureWebCategory { + if page.awclr.IsEmpty() { + return nil + } + return *page.awclr.Value +} + +// Creates a new instance of the AzureWebCategoryListResultPage type. +func NewAzureWebCategoryListResultPage(cur AzureWebCategoryListResult, getNextPage func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)) AzureWebCategoryListResultPage { + return AzureWebCategoryListResultPage{ + fn: getNextPage, + awclr: cur, + } +} + +// AzureWebCategoryPropertiesFormat azure Web Category Properties. +type AzureWebCategoryPropertiesFormat struct { + // Group - READ-ONLY; The name of the group that the category belongs to. + Group *string `json:"group,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWebCategoryPropertiesFormat. +func (awcpf AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BackendAddressPool pool of backend IP addresses. +type BackendAddressPool struct { + autorest.Response `json:"-"` + // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. + *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackendAddressPool. +func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bap.BackendAddressPoolPropertiesFormat != nil { + objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat + } + if bap.Name != nil { + objectMap["name"] = bap.Name + } + if bap.ID != nil { + objectMap["id"] = bap.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. +func (bap *BackendAddressPool) 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 backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat + err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) + if err != nil { + return err + } + bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bap.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bap.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bap.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bap.ID = &ID + } + } + } + + return nil +} + +// BackendAddressPoolPropertiesFormat properties of the backend address pool. +type BackendAddressPoolPropertiesFormat struct { + // Location - The location of the backend address pool. + Location *string `json:"location,omitempty"` + // TunnelInterfaces - An array of gateway load balancer tunnel interfaces. + TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` + // LoadBalancerBackendAddresses - An array of backend addresses. + LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` + // BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces. + BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` + // LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool. + OutboundRule *SubResource `json:"outboundRule,omitempty"` + // OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool. + OutboundRules *[]SubResource `json:"outboundRules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat. +func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bappf.Location != nil { + objectMap["location"] = bappf.Location + } + if bappf.TunnelInterfaces != nil { + objectMap["tunnelInterfaces"] = bappf.TunnelInterfaces + } + if bappf.LoadBalancerBackendAddresses != nil { + objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses + } + return json.Marshal(objectMap) +} + +// BastionActiveSession the session detail for a target. +type BastionActiveSession struct { + // SessionID - READ-ONLY; A unique id for the session. + SessionID *string `json:"sessionId,omitempty"` + // StartTime - READ-ONLY; The time when the session started. + StartTime interface{} `json:"startTime,omitempty"` + // TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine. + TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"` + // ResourceType - READ-ONLY; The type of the resource. + ResourceType *string `json:"resourceType,omitempty"` + // TargetHostName - READ-ONLY; The host name of the target. + TargetHostName *string `json:"targetHostName,omitempty"` + // TargetResourceGroup - READ-ONLY; The resource group of the target. + TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` + // UserName - READ-ONLY; The user name who is active on this session. + UserName *string `json:"userName,omitempty"` + // TargetIPAddress - READ-ONLY; The IP Address of the target. + TargetIPAddress *string `json:"targetIpAddress,omitempty"` + // Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'BastionConnectProtocolSSH', 'BastionConnectProtocolRDP' + Protocol BastionConnectProtocol `json:"protocol,omitempty"` + // TargetResourceID - READ-ONLY; The resource id of the target. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // SessionDurationInMins - READ-ONLY; Duration in mins the session has been active. + SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionActiveSession. +func (bas BastionActiveSession) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BastionActiveSessionListResult response for GetActiveSessions. +type BastionActiveSessionListResult struct { + autorest.Response `json:"-"` + // Value - List of active sessions on the bastion. + Value *[]BastionActiveSession `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession +// values. +type BastionActiveSessionListResultIterator struct { + i int + page BastionActiveSessionListResultPage +} + +// 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 *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.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 *BastionActiveSessionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BastionActiveSessionListResultIterator) 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 BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult { + 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 BastionActiveSessionListResultIterator) Value() BastionActiveSession { + if !iter.page.NotDone() { + return BastionActiveSession{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BastionActiveSessionListResultIterator type. +func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator { + return BastionActiveSessionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (baslr BastionActiveSessionListResult) IsEmpty() bool { + return baslr.Value == nil || len(*baslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (baslr BastionActiveSessionListResult) hasNextLink() bool { + return baslr.NextLink != nil && len(*baslr.NextLink) != 0 +} + +// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !baslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(baslr.NextLink))) +} + +// BastionActiveSessionListResultPage contains a page of BastionActiveSession values. +type BastionActiveSessionListResultPage struct { + fn func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error) + baslr BastionActiveSessionListResult +} + +// 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 *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.baslr) + if err != nil { + return err + } + page.baslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BastionActiveSessionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BastionActiveSessionListResultPage) NotDone() bool { + return !page.baslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult { + return page.baslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession { + if page.baslr.IsEmpty() { + return nil + } + return *page.baslr.Value +} + +// Creates a new instance of the BastionActiveSessionListResultPage type. +func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { + return BastionActiveSessionListResultPage{ + fn: getNextPage, + baslr: cur, + } +} + +// BastionHost bastion Host resource. +type BastionHost struct { + autorest.Response `json:"-"` + // BastionHostPropertiesFormat - Represents the bastion host resource. + *BastionHostPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Sku - The sku of this Bastion Host. + Sku *Sku `json:"sku,omitempty"` + // ID - 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 BastionHost. +func (bh BastionHost) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bh.BastionHostPropertiesFormat != nil { + objectMap["properties"] = bh.BastionHostPropertiesFormat + } + if bh.Sku != nil { + objectMap["sku"] = bh.Sku + } + if bh.ID != nil { + objectMap["id"] = bh.ID + } + if bh.Location != nil { + objectMap["location"] = bh.Location + } + if bh.Tags != nil { + objectMap["tags"] = bh.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BastionHost struct. +func (bh *BastionHost) 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 bastionHostPropertiesFormat BastionHostPropertiesFormat + err = json.Unmarshal(*v, &bastionHostPropertiesFormat) + if err != nil { + return err + } + bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bh.Etag = &etag + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + bh.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bh.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bh.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bh.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bh.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bh.Tags = tags + } + } + } + + return nil +} + +// BastionHostIPConfiguration IP configuration of an Bastion Host. +type BastionHostIPConfiguration struct { + // BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource. + *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Ip configuration type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionHostIPConfiguration. +func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bhic.BastionHostIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat + } + if bhic.Name != nil { + objectMap["name"] = bhic.Name + } + if bhic.ID != nil { + objectMap["id"] = bhic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct. +func (bhic *BastionHostIPConfiguration) 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 bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat) + if err != nil { + return err + } + bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bhic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bhic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bhic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bhic.ID = &ID + } + } + } + + return nil +} + +// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host. +type BastionHostIPConfigurationPropertiesFormat struct { + // Subnet - Reference of the subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // PublicIPAddress - Reference of the PublicIP resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat. +func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bhicpf.Subnet != nil { + objectMap["subnet"] = bhicpf.Subnet + } + if bhicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = bhicpf.PublicIPAddress + } + if bhicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod + } + return json.Marshal(objectMap) +} + +// BastionHostListResult response for ListBastionHosts API service call. +type BastionHostListResult struct { + autorest.Response `json:"-"` + // Value - List of Bastion Hosts in a resource group. + Value *[]BastionHost `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// BastionHostListResultIterator provides access to a complete listing of BastionHost values. +type BastionHostListResultIterator struct { + i int + page BastionHostListResultPage +} + +// 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 *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.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 *BastionHostListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BastionHostListResultIterator) 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 BastionHostListResultIterator) Response() BastionHostListResult { + 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 BastionHostListResultIterator) Value() BastionHost { + if !iter.page.NotDone() { + return BastionHost{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BastionHostListResultIterator type. +func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator { + return BastionHostListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bhlr BastionHostListResult) IsEmpty() bool { + return bhlr.Value == nil || len(*bhlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bhlr BastionHostListResult) hasNextLink() bool { + return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0 +} + +// bastionHostListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) { + if !bhlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bhlr.NextLink))) +} + +// BastionHostListResultPage contains a page of BastionHost values. +type BastionHostListResultPage struct { + fn func(context.Context, BastionHostListResult) (BastionHostListResult, error) + bhlr BastionHostListResult +} + +// 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 *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bhlr) + if err != nil { + return err + } + page.bhlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BastionHostListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BastionHostListResultPage) NotDone() bool { + return !page.bhlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BastionHostListResultPage) Response() BastionHostListResult { + return page.bhlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BastionHostListResultPage) Values() []BastionHost { + if page.bhlr.IsEmpty() { + return nil + } + return *page.bhlr.Value +} + +// Creates a new instance of the BastionHostListResultPage type. +func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage { + return BastionHostListResultPage{ + fn: getNextPage, + bhlr: cur, + } +} + +// BastionHostPropertiesFormat properties of the Bastion Host. +type BastionHostPropertiesFormat struct { + // IPConfigurations - IP configuration of the Bastion Host resource. + IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` + // DNSName - FQDN for the endpoint on which bastion host is accessible. + DNSName *string `json:"dnsName,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ScaleUnits - The scale units for the Bastion Host resource. + ScaleUnits *int32 `json:"scaleUnits,omitempty"` + // DisableCopyPaste - Enable/Disable Copy/Paste feature of the Bastion Host resource. + DisableCopyPaste *bool `json:"disableCopyPaste,omitempty"` + // EnableFileCopy - Enable/Disable File Copy feature of the Bastion Host resource. + EnableFileCopy *bool `json:"enableFileCopy,omitempty"` + // EnableIPConnect - Enable/Disable IP Connect feature of the Bastion Host resource. + EnableIPConnect *bool `json:"enableIpConnect,omitempty"` + // EnableShareableLink - Enable/Disable Shareable Link of the Bastion Host resource. + EnableShareableLink *bool `json:"enableShareableLink,omitempty"` + // EnableTunneling - Enable/Disable Tunneling feature of the Bastion Host resource. + EnableTunneling *bool `json:"enableTunneling,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat. +func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bhpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = bhpf.IPConfigurations + } + if bhpf.DNSName != nil { + objectMap["dnsName"] = bhpf.DNSName + } + if bhpf.ScaleUnits != nil { + objectMap["scaleUnits"] = bhpf.ScaleUnits + } + if bhpf.DisableCopyPaste != nil { + objectMap["disableCopyPaste"] = bhpf.DisableCopyPaste + } + if bhpf.EnableFileCopy != nil { + objectMap["enableFileCopy"] = bhpf.EnableFileCopy + } + if bhpf.EnableIPConnect != nil { + objectMap["enableIpConnect"] = bhpf.EnableIPConnect + } + if bhpf.EnableShareableLink != nil { + objectMap["enableShareableLink"] = bhpf.EnableShareableLink + } + if bhpf.EnableTunneling != nil { + objectMap["enableTunneling"] = bhpf.EnableTunneling + } + return json.Marshal(objectMap) +} + +// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BastionHostsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BastionHostsClient) (BastionHost, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result. +func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent { + bh, err = client.CreateOrUpdateResponder(bh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request") + } + } + return +} + +// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BastionHostsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BastionHostsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BastionHostsDeleteFuture.Result. +func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// BastionHostsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BastionHostsUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BastionHostsClient) (BastionHost, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BastionHostsUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BastionHostsUpdateTagsFuture.Result. +func (future *BastionHostsUpdateTagsFuture) result(client BastionHostsClient) (bh BastionHost, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.BastionHostsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent { + bh, err = client.UpdateTagsResponder(bh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", bh.Response.Response, "Failure responding to request") + } + } + return +} + +// BastionSessionDeleteResult response for DisconnectActiveSessions. +type BastionSessionDeleteResult struct { + autorest.Response `json:"-"` + // Value - List of sessions with their corresponding state. + Value *[]BastionSessionState `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values. +type BastionSessionDeleteResultIterator struct { + i int + page BastionSessionDeleteResultPage +} + +// 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 *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.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 *BastionSessionDeleteResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BastionSessionDeleteResultIterator) 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 BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult { + 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 BastionSessionDeleteResultIterator) Value() BastionSessionState { + if !iter.page.NotDone() { + return BastionSessionState{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BastionSessionDeleteResultIterator type. +func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator { + return BastionSessionDeleteResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bsdr BastionSessionDeleteResult) IsEmpty() bool { + return bsdr.Value == nil || len(*bsdr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bsdr BastionSessionDeleteResult) hasNextLink() bool { + return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0 +} + +// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) { + if !bsdr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bsdr.NextLink))) +} + +// BastionSessionDeleteResultPage contains a page of BastionSessionState values. +type BastionSessionDeleteResultPage struct { + fn func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error) + bsdr BastionSessionDeleteResult +} + +// 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 *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bsdr) + if err != nil { + return err + } + page.bsdr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BastionSessionDeleteResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BastionSessionDeleteResultPage) NotDone() bool { + return !page.bsdr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult { + return page.bsdr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BastionSessionDeleteResultPage) Values() []BastionSessionState { + if page.bsdr.IsEmpty() { + return nil + } + return *page.bsdr.Value +} + +// Creates a new instance of the BastionSessionDeleteResultPage type. +func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { + return BastionSessionDeleteResultPage{ + fn: getNextPage, + bsdr: cur, + } +} + +// BastionSessionState the session state detail for a target. +type BastionSessionState struct { + // SessionID - READ-ONLY; A unique id for the session. + SessionID *string `json:"sessionId,omitempty"` + // Message - READ-ONLY; Used for extra information. + Message *string `json:"message,omitempty"` + // State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound. + State *string `json:"state,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionSessionState. +func (bss BastionSessionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BastionShareableLink bastion Shareable Link. +type BastionShareableLink struct { + // VM - Reference of the virtual machine resource. + VM *VM `json:"vm,omitempty"` + // Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine. + Bsl *string `json:"bsl,omitempty"` + // CreatedAt - READ-ONLY; The time when the link was created. + CreatedAt *string `json:"createdAt,omitempty"` + // Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure. + Message *string `json:"message,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionShareableLink. +func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bsl.VM != nil { + objectMap["vm"] = bsl.VM + } + return json.Marshal(objectMap) +} + +// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints. +type BastionShareableLinkListRequest struct { + // Vms - List of VM references. + Vms *[]BastionShareableLink `json:"vms,omitempty"` +} + +// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints. +type BastionShareableLinkListResult struct { + autorest.Response `json:"-"` + // Value - List of Bastion Shareable Links for the request. + Value *[]BastionShareableLink `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink +// values. +type BastionShareableLinkListResultIterator struct { + i int + page BastionShareableLinkListResultPage +} + +// 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 *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.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 *BastionShareableLinkListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BastionShareableLinkListResultIterator) 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 BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult { + 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 BastionShareableLinkListResultIterator) Value() BastionShareableLink { + if !iter.page.NotDone() { + return BastionShareableLink{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BastionShareableLinkListResultIterator type. +func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator { + return BastionShareableLinkListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bsllr BastionShareableLinkListResult) IsEmpty() bool { + return bsllr.Value == nil || len(*bsllr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bsllr BastionShareableLinkListResult) hasNextLink() bool { + return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0 +} + +// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) { + if !bsllr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bsllr.NextLink))) +} + +// BastionShareableLinkListResultPage contains a page of BastionShareableLink values. +type BastionShareableLinkListResultPage struct { + fn func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error) + bsllr BastionShareableLinkListResult +} + +// 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 *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bsllr) + if err != nil { + return err + } + page.bsllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BastionShareableLinkListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BastionShareableLinkListResultPage) NotDone() bool { + return !page.bsllr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult { + return page.bsllr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink { + if page.bsllr.IsEmpty() { + return nil + } + return *page.bsllr.Value +} + +// Creates a new instance of the BastionShareableLinkListResultPage type. +func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { + return BastionShareableLinkListResultPage{ + fn: getNextPage, + bsllr: cur, + } +} + +// BGPCommunity contains bgp community information offered in Service Community resources. +type BGPCommunity struct { + // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. + ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` + // CommunityName - The name of the bgp community. e.g. Skype. + CommunityName *string `json:"communityName,omitempty"` + // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + CommunityValue *string `json:"communityValue,omitempty"` + // CommunityPrefixes - The prefixes that the bgp community contains. + CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` + // IsAuthorizedToUse - Customer is authorized to use bgp community or not. + IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` + // ServiceGroup - The service group of the bgp community contains. + ServiceGroup *string `json:"serviceGroup,omitempty"` +} + +// BgpConnection virtual Appliance Site resource. +type BgpConnection struct { + autorest.Response `json:"-"` + // BgpConnectionProperties - The properties of the Bgp connections. + *BgpConnectionProperties `json:"properties,omitempty"` + // Name - Name of the connection. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Connection type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for BgpConnection. +func (bc BgpConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bc.BgpConnectionProperties != nil { + objectMap["properties"] = bc.BgpConnectionProperties + } + if bc.Name != nil { + objectMap["name"] = bc.Name + } + if bc.ID != nil { + objectMap["id"] = bc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BgpConnection struct. +func (bc *BgpConnection) 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 bgpConnectionProperties BgpConnectionProperties + err = json.Unmarshal(*v, &bgpConnectionProperties) + if err != nil { + return err + } + bc.BgpConnectionProperties = &bgpConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bc.ID = &ID + } + } + } + + return nil +} + +// BgpConnectionProperties properties of the bgp connection. +type BgpConnectionProperties struct { + // PeerAsn - Peer ASN. + PeerAsn *int64 `json:"peerAsn,omitempty"` + // PeerIP - Peer IP. + PeerIP *string `json:"peerIp,omitempty"` + // HubVirtualNetworkConnection - The reference to the HubVirtualNetworkConnection resource. + HubVirtualNetworkConnection *SubResource `json:"hubVirtualNetworkConnection,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ConnectionState - READ-ONLY; The current state of the VirtualHub to Peer. Possible values include: 'HubBgpConnectionStatusUnknown', 'HubBgpConnectionStatusConnecting', 'HubBgpConnectionStatusConnected', 'HubBgpConnectionStatusNotConnected' + ConnectionState HubBgpConnectionStatus `json:"connectionState,omitempty"` +} + +// MarshalJSON is the custom marshaler for BgpConnectionProperties. +func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bcp.PeerAsn != nil { + objectMap["peerAsn"] = bcp.PeerAsn + } + if bcp.PeerIP != nil { + objectMap["peerIp"] = bcp.PeerIP + } + if bcp.HubVirtualNetworkConnection != nil { + objectMap["hubVirtualNetworkConnection"] = bcp.HubVirtualNetworkConnection + } + return json.Marshal(objectMap) +} + +// BgpPeerStatus BGP peer status details. +type BgpPeerStatus struct { + // LocalAddress - READ-ONLY; The virtual network gateway's local address. + LocalAddress *string `json:"localAddress,omitempty"` + // Neighbor - READ-ONLY; The remote BGP peer. + Neighbor *string `json:"neighbor,omitempty"` + // Asn - READ-ONLY; The autonomous system number of the remote BGP peer. + Asn *int64 `json:"asn,omitempty"` + // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' + State BgpPeerState `json:"state,omitempty"` + // ConnectedDuration - READ-ONLY; For how long the peering has been up. + ConnectedDuration *string `json:"connectedDuration,omitempty"` + // RoutesReceived - READ-ONLY; The number of routes learned from this peer. + RoutesReceived *int64 `json:"routesReceived,omitempty"` + // MessagesSent - READ-ONLY; The number of BGP messages sent. + MessagesSent *int64 `json:"messagesSent,omitempty"` + // MessagesReceived - READ-ONLY; The number of BGP messages received. + MessagesReceived *int64 `json:"messagesReceived,omitempty"` +} + +// MarshalJSON is the custom marshaler for BgpPeerStatus. +func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BgpPeerStatusListResult response for list BGP peer status API service call. +type BgpPeerStatusListResult struct { + autorest.Response `json:"-"` + // Value - List of BGP peers. + Value *[]BgpPeerStatus `json:"value,omitempty"` +} + +// BgpServiceCommunity service Community Properties. +type BgpServiceCommunity struct { + // BgpServiceCommunityPropertiesFormat - Properties of the BGP service community. + *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` + // ID - 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 BgpServiceCommunity. +func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bsc.BgpServiceCommunityPropertiesFormat != nil { + objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat + } + if bsc.ID != nil { + objectMap["id"] = bsc.ID + } + if bsc.Location != nil { + objectMap["location"] = bsc.Location + } + if bsc.Tags != nil { + objectMap["tags"] = bsc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. +func (bsc *BgpServiceCommunity) 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 bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat + err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) + if err != nil { + return err + } + bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bsc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bsc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bsc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bsc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bsc.Tags = tags + } + } + } + + return nil +} + +// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. +type BgpServiceCommunityListResult struct { + autorest.Response `json:"-"` + // Value - A list of service community resources. + Value *[]BgpServiceCommunity `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity +// values. +type BgpServiceCommunityListResultIterator struct { + i int + page BgpServiceCommunityListResultPage +} + +// 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 *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.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 *BgpServiceCommunityListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BgpServiceCommunityListResultIterator) 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 BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { + 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 BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { + if !iter.page.NotDone() { + return BgpServiceCommunity{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BgpServiceCommunityListResultIterator type. +func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator { + return BgpServiceCommunityListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { + return bsclr.Value == nil || len(*bsclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bsclr BgpServiceCommunityListResult) hasNextLink() bool { + return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0 +} + +// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) { + if !bsclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bsclr.NextLink))) +} + +// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. +type BgpServiceCommunityListResultPage struct { + fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) + bsclr BgpServiceCommunityListResult +} + +// 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 *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bsclr) + if err != nil { + return err + } + page.bsclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BgpServiceCommunityListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BgpServiceCommunityListResultPage) NotDone() bool { + return !page.bsclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { + return page.bsclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { + if page.bsclr.IsEmpty() { + return nil + } + return *page.bsclr.Value +} + +// Creates a new instance of the BgpServiceCommunityListResultPage type. +func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { + return BgpServiceCommunityListResultPage{ + fn: getNextPage, + bsclr: cur, + } +} + +// BgpServiceCommunityPropertiesFormat properties of Service Community. +type BgpServiceCommunityPropertiesFormat struct { + // ServiceName - The name of the bgp community. e.g. Skype. + ServiceName *string `json:"serviceName,omitempty"` + // BgpCommunities - A list of bgp communities. + BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` +} + +// BgpSettings BGP settings details. +type BgpSettings struct { + // Asn - The BGP speaker's ASN. + Asn *int64 `json:"asn,omitempty"` + // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` + // PeerWeight - The weight added to routes learned from this BGP speaker. + PeerWeight *int32 `json:"peerWeight,omitempty"` + // BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway. + BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` +} + +// BreakOutCategoryPolicies network Virtual Appliance Sku Properties. +type BreakOutCategoryPolicies struct { + // Allow - Flag to control breakout of o365 allow category. + Allow *bool `json:"allow,omitempty"` + // Optimize - Flag to control breakout of o365 optimize category. + Optimize *bool `json:"optimize,omitempty"` + // Default - Flag to control breakout of o365 default category. + Default *bool `json:"default,omitempty"` +} + +// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API +// service call. +type CheckPrivateLinkServiceVisibilityRequest struct { + // PrivateLinkServiceAlias - The alias of the private link service. + PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` +} + +// CloudError an error response from the service. +type CloudError struct { + // Error - Cloud error body. + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody an error response from the service. +type CloudErrorBody 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"` + // Details - A list of additional details about the error. + Details *[]CloudErrorBody `json:"details,omitempty"` +} + +// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic. +type ConfigurationDiagnosticParameters struct { + // TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // VerbosityLevel - Verbosity level. Possible values include: 'VerbosityLevelNormal', 'VerbosityLevelMinimum', 'VerbosityLevelFull' + VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"` + // Profiles - List of network configuration diagnostic profiles. + Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"` +} + +// ConfigurationDiagnosticProfile parameters to compare with network configuration. +type ConfigurationDiagnosticProfile struct { + // Direction - The direction of the traffic. Possible values include: 'DirectionInbound', 'DirectionOutbound' + Direction Direction `json:"direction,omitempty"` + // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP. + Protocol *string `json:"protocol,omitempty"` + // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + Source *string `json:"source,omitempty"` + // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + Destination *string `json:"destination,omitempty"` + // DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). + DestinationPort *string `json:"destinationPort,omitempty"` +} + +// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource. +type ConfigurationDiagnosticResponse struct { + autorest.Response `json:"-"` + // Results - READ-ONLY; List of network configuration diagnostic results. + Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse. +func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic +// query. +type ConfigurationDiagnosticResult struct { + // Profile - Network configuration diagnostic profile. + Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"` + // NetworkSecurityGroupResult - Network security group result. + NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` +} + +// ConnectionMonitor parameters that define the operation to create a connection monitor. +type ConnectionMonitor struct { + // Location - Connection monitor location. + Location *string `json:"location,omitempty"` + // Tags - Connection monitor tags. + Tags map[string]*string `json:"tags"` + // ConnectionMonitorParameters - Properties of the connection monitor. + *ConnectionMonitorParameters `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionMonitor. +func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cm.Location != nil { + objectMap["location"] = cm.Location + } + if cm.Tags != nil { + objectMap["tags"] = cm.Tags + } + if cm.ConnectionMonitorParameters != nil { + objectMap["properties"] = cm.ConnectionMonitorParameters + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. +func (cm *ConnectionMonitor) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cm.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cm.Tags = tags + } + case "properties": + if v != nil { + var connectionMonitorParameters ConnectionMonitorParameters + err = json.Unmarshal(*v, &connectionMonitorParameters) + if err != nil { + return err + } + cm.ConnectionMonitorParameters = &connectionMonitorParameters + } + } + } + + return nil +} + +// ConnectionMonitorDestination describes the destination of connection monitor. +type ConnectionMonitorDestination struct { + // ResourceID - The ID of the resource used as the destination by connection monitor. + ResourceID *string `json:"resourceId,omitempty"` + // Address - Address of the connection monitor destination (IP or domain name). + Address *string `json:"address,omitempty"` + // Port - The destination port used by connection monitor. + Port *int32 `json:"port,omitempty"` +} + +// ConnectionMonitorEndpoint describes the connection monitor endpoint. +type ConnectionMonitorEndpoint struct { + // Name - The name of the connection monitor endpoint. + Name *string `json:"name,omitempty"` + // Type - The endpoint type. Possible values include: 'EndpointTypeAzureVM', 'EndpointTypeAzureVNet', 'EndpointTypeAzureSubnet', 'EndpointTypeExternalAddress', 'EndpointTypeMMAWorkspaceMachine', 'EndpointTypeMMAWorkspaceNetwork' + Type EndpointType `json:"type,omitempty"` + // ResourceID - Resource ID of the connection monitor endpoint. + ResourceID *string `json:"resourceId,omitempty"` + // Address - Address of the connection monitor endpoint (IP or domain name). + Address *string `json:"address,omitempty"` + // Filter - Filter for sub-items within the endpoint. + Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"` + // Scope - Endpoint scope. + Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"` + // CoverageLevel - Test coverage for the endpoint. Possible values include: 'CoverageLevelDefault', 'CoverageLevelLow', 'CoverageLevelBelowAverage', 'CoverageLevelAverage', 'CoverageLevelAboveAverage', 'CoverageLevelFull' + CoverageLevel CoverageLevel `json:"coverageLevel,omitempty"` +} + +// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter. +type ConnectionMonitorEndpointFilter struct { + // Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'ConnectionMonitorEndpointFilterTypeInclude' + Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"` + // Items - List of items in the filter. + Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"` +} + +// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item. +type ConnectionMonitorEndpointFilterItem struct { + // Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'ConnectionMonitorEndpointFilterItemTypeAgentAddress' + Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"` + // Address - The address of the filter item. + Address *string `json:"address,omitempty"` +} + +// ConnectionMonitorEndpointScope describes the connection monitor endpoint scope. +type ConnectionMonitorEndpointScope struct { + // Include - List of items which needs to be included to the endpoint scope. + Include *[]ConnectionMonitorEndpointScopeItem `json:"include,omitempty"` + // Exclude - List of items which needs to be excluded from the endpoint scope. + Exclude *[]ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"` +} + +// ConnectionMonitorEndpointScopeItem describes the connection monitor endpoint scope item. +type ConnectionMonitorEndpointScopeItem struct { + // Address - The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. + Address *string `json:"address,omitempty"` +} + +// ConnectionMonitorHTTPConfiguration describes the HTTP configuration. +type ConnectionMonitorHTTPConfiguration struct { + // Port - The port to connect to. + Port *int32 `json:"port,omitempty"` + // Method - The HTTP method to use. Possible values include: 'HTTPConfigurationMethodGet', 'HTTPConfigurationMethodPost' + Method HTTPConfigurationMethod `json:"method,omitempty"` + // Path - The path component of the URI. For instance, "/dir1/dir2". + Path *string `json:"path,omitempty"` + // RequestHeaders - The HTTP headers to transmit with the request. + RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"` + // ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418". + ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"` + // PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit. + PreferHTTPS *bool `json:"preferHTTPS,omitempty"` +} + +// ConnectionMonitorIcmpConfiguration describes the ICMP configuration. +type ConnectionMonitorIcmpConfiguration struct { + // DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled. + DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` +} + +// ConnectionMonitorListResult list of connection monitors. +type ConnectionMonitorListResult struct { + autorest.Response `json:"-"` + // Value - Information about connection monitors. + Value *[]ConnectionMonitorResult `json:"value,omitempty"` +} + +// ConnectionMonitorOutput describes a connection monitor output destination. +type ConnectionMonitorOutput struct { + // Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'OutputTypeWorkspace' + Type OutputType `json:"type,omitempty"` + // WorkspaceSettings - Describes the settings for producing output into a log analytics workspace. + WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"` +} + +// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. +type ConnectionMonitorParameters struct { + // Source - Describes the source of connection monitor. + Source *ConnectionMonitorSource `json:"source,omitempty"` + // Destination - Describes the destination of connection monitor. + Destination *ConnectionMonitorDestination `json:"destination,omitempty"` + // AutoStart - Determines if the connection monitor will start automatically once created. + AutoStart *bool `json:"autoStart,omitempty"` + // MonitoringIntervalInSeconds - Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` + // Endpoints - List of connection monitor endpoints. + Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"` + // TestConfigurations - List of connection monitor test configurations. + TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` + // TestGroups - List of connection monitor test groups. + TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"` + // Outputs - List of connection monitor outputs. + Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"` + // Notes - Optional notes to be associated with the connection monitor. + Notes *string `json:"notes,omitempty"` +} + +// ConnectionMonitorQueryResult list of connection states snapshots. +type ConnectionMonitorQueryResult struct { + autorest.Response `json:"-"` + // SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive' + SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` + // States - Information about connection states. + States *[]ConnectionStateSnapshot `json:"states,omitempty"` +} + +// ConnectionMonitorResult information about the connection monitor. +type ConnectionMonitorResult struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; Name of the connection monitor. + Name *string `json:"name,omitempty"` + // ID - READ-ONLY; ID of the connection monitor. + ID *string `json:"id,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Connection monitor type. + Type *string `json:"type,omitempty"` + // Location - Connection monitor location. + Location *string `json:"location,omitempty"` + // Tags - Connection monitor tags. + Tags map[string]*string `json:"tags"` + // ConnectionMonitorResultProperties - Properties of the connection monitor result. + *ConnectionMonitorResultProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionMonitorResult. +func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cmr.Location != nil { + objectMap["location"] = cmr.Location + } + if cmr.Tags != nil { + objectMap["tags"] = cmr.Tags + } + if cmr.ConnectionMonitorResultProperties != nil { + objectMap["properties"] = cmr.ConnectionMonitorResultProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. +func (cmr *ConnectionMonitorResult) 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 + } + cmr.Name = &name + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cmr.ID = &ID + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cmr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cmr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cmr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cmr.Tags = tags + } + case "properties": + if v != nil { + var connectionMonitorResultProperties ConnectionMonitorResultProperties + err = json.Unmarshal(*v, &connectionMonitorResultProperties) + if err != nil { + return err + } + cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties + } + } + } + + return nil +} + +// ConnectionMonitorResultProperties describes the properties of a connection monitor. +type ConnectionMonitorResultProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // StartTime - READ-ONLY; The date and time when the connection monitor was started. + StartTime *date.Time `json:"startTime,omitempty"` + // MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor. + MonitoringStatus *string `json:"monitoringStatus,omitempty"` + // ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'ConnectionMonitorTypeMultiEndpoint', 'ConnectionMonitorTypeSingleSourceDestination' + ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"` + // Source - Describes the source of connection monitor. + Source *ConnectionMonitorSource `json:"source,omitempty"` + // Destination - Describes the destination of connection monitor. + Destination *ConnectionMonitorDestination `json:"destination,omitempty"` + // AutoStart - Determines if the connection monitor will start automatically once created. + AutoStart *bool `json:"autoStart,omitempty"` + // MonitoringIntervalInSeconds - Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` + // Endpoints - List of connection monitor endpoints. + Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"` + // TestConfigurations - List of connection monitor test configurations. + TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` + // TestGroups - List of connection monitor test groups. + TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"` + // Outputs - List of connection monitor outputs. + Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"` + // Notes - Optional notes to be associated with the connection monitor. + Notes *string `json:"notes,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties. +func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cmrp.Source != nil { + objectMap["source"] = cmrp.Source + } + if cmrp.Destination != nil { + objectMap["destination"] = cmrp.Destination + } + if cmrp.AutoStart != nil { + objectMap["autoStart"] = cmrp.AutoStart + } + if cmrp.MonitoringIntervalInSeconds != nil { + objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds + } + if cmrp.Endpoints != nil { + objectMap["endpoints"] = cmrp.Endpoints + } + if cmrp.TestConfigurations != nil { + objectMap["testConfigurations"] = cmrp.TestConfigurations + } + if cmrp.TestGroups != nil { + objectMap["testGroups"] = cmrp.TestGroups + } + if cmrp.Outputs != nil { + objectMap["outputs"] = cmrp.Outputs + } + if cmrp.Notes != nil { + objectMap["notes"] = cmrp.Notes + } + return json.Marshal(objectMap) +} + +// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConnectionMonitorsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result. +func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cmr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { + cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") + } + } + return +} + +// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConnectionMonitorsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConnectionMonitorsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConnectionMonitorsDeleteFuture.Result. +func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ConnectionMonitorSource describes the source of connection monitor. +type ConnectionMonitorSource struct { + // ResourceID - The ID of the resource used as the source by connection monitor. + ResourceID *string `json:"resourceId,omitempty"` + // Port - The source port used by connection monitor. + Port *int32 `json:"port,omitempty"` +} + +// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsQueryFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConnectionMonitorsQueryFuture.Result. +func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cmqr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { + cmqr, err = client.QueryResponder(cmqr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") + } + } + return +} + +// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConnectionMonitorsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConnectionMonitorsStartFuture.Result. +func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") + return + } + ar.Response = future.Response() + return +} + +// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsStopFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConnectionMonitorsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConnectionMonitorsStopFuture.Result. +func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") + return + } + ar.Response = future.Response() + return +} + +// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful. +type ConnectionMonitorSuccessThreshold struct { + // ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful. + ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"` + // RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful. + RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"` +} + +// ConnectionMonitorTCPConfiguration describes the TCP configuration. +type ConnectionMonitorTCPConfiguration struct { + // Port - The port to connect to. + Port *int32 `json:"port,omitempty"` + // DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled. + DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` + // DestinationPortBehavior - Destination port behavior. Possible values include: 'DestinationPortBehaviorNone', 'DestinationPortBehaviorListenIfAvailable' + DestinationPortBehavior DestinationPortBehavior `json:"destinationPortBehavior,omitempty"` +} + +// ConnectionMonitorTestConfiguration describes a connection monitor test configuration. +type ConnectionMonitorTestConfiguration struct { + // Name - The name of the connection monitor test configuration. + Name *string `json:"name,omitempty"` + // TestFrequencySec - The frequency of test evaluation, in seconds. + TestFrequencySec *int32 `json:"testFrequencySec,omitempty"` + // Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp' + Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"` + // PreferredIPVersion - The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. Possible values include: 'PreferredIPVersionIPv4', 'PreferredIPVersionIPv6' + PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"` + // HTTPConfiguration - The parameters used to perform test evaluation over HTTP. + HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"` + // TCPConfiguration - The parameters used to perform test evaluation over TCP. + TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"` + // IcmpConfiguration - The parameters used to perform test evaluation over ICMP. + IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"` + // SuccessThreshold - The threshold for declaring a test successful. + SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"` +} + +// ConnectionMonitorTestGroup describes the connection monitor test group. +type ConnectionMonitorTestGroup struct { + // Name - The name of the connection monitor test group. + Name *string `json:"name,omitempty"` + // Disable - Value indicating whether test group is disabled. + Disable *bool `json:"disable,omitempty"` + // TestConfigurations - List of test configuration names. + TestConfigurations *[]string `json:"testConfigurations,omitempty"` + // Sources - List of source endpoint names. + Sources *[]string `json:"sources,omitempty"` + // Destinations - List of destination endpoint names. + Destinations *[]string `json:"destinations,omitempty"` +} + +// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics +// workspace. +type ConnectionMonitorWorkspaceSettings struct { + // WorkspaceResourceID - Log analytics workspace resource ID. + WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` +} + +// ConnectionResetSharedKey the virtual network connection reset shared key. +type ConnectionResetSharedKey struct { + autorest.Response `json:"-"` + // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. + KeyLength *int32 `json:"keyLength,omitempty"` +} + +// ConnectionSharedKey response for GetConnectionSharedKey API service call. +type ConnectionSharedKey struct { + autorest.Response `json:"-"` + // Value - The virtual network connection shared key value. + Value *string `json:"value,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// ConnectionStateSnapshot connection state snapshot. +type ConnectionStateSnapshot struct { + // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' + ConnectionState ConnectionState `json:"connectionState,omitempty"` + // StartTime - The start time of the connection snapshot. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the connection snapshot. + EndTime *date.Time `json:"endTime,omitempty"` + // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'EvaluationStateNotStarted', 'EvaluationStateInProgress', 'EvaluationStateCompleted' + EvaluationState EvaluationState `json:"evaluationState,omitempty"` + // AvgLatencyInMs - Average latency in ms. + AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"` + // MinLatencyInMs - Minimum latency in ms. + MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"` + // MaxLatencyInMs - Maximum latency in ms. + MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"` + // ProbesSent - The number of sent probes. + ProbesSent *int64 `json:"probesSent,omitempty"` + // ProbesFailed - The number of failed probes. + ProbesFailed *int64 `json:"probesFailed,omitempty"` + // Hops - READ-ONLY; List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionStateSnapshot. +func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if CSS.ConnectionState != "" { + objectMap["connectionState"] = CSS.ConnectionState + } + if CSS.StartTime != nil { + objectMap["startTime"] = CSS.StartTime + } + if CSS.EndTime != nil { + objectMap["endTime"] = CSS.EndTime + } + if CSS.EvaluationState != "" { + objectMap["evaluationState"] = CSS.EvaluationState + } + if CSS.AvgLatencyInMs != nil { + objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs + } + if CSS.MinLatencyInMs != nil { + objectMap["minLatencyInMs"] = CSS.MinLatencyInMs + } + if CSS.MaxLatencyInMs != nil { + objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs + } + if CSS.ProbesSent != nil { + objectMap["probesSent"] = CSS.ProbesSent + } + if CSS.ProbesFailed != nil { + objectMap["probesFailed"] = CSS.ProbesFailed + } + return json.Marshal(objectMap) +} + +// ConnectivityDestination parameters that define destination of connection. +type ConnectivityDestination struct { + // ResourceID - The ID of the resource to which a connection attempt will be made. + ResourceID *string `json:"resourceId,omitempty"` + // Address - The IP address or URI the resource to which a connection attempt will be made. + Address *string `json:"address,omitempty"` + // Port - Port on which check connectivity will be performed. + Port *int32 `json:"port,omitempty"` +} + +// ConnectivityHop information about a hop between the source and the destination. +type ConnectivityHop struct { + // Type - READ-ONLY; The type of the hop. + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; The ID of the hop. + ID *string `json:"id,omitempty"` + // Address - READ-ONLY; The IP address of the hop. + Address *string `json:"address,omitempty"` + // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop. + ResourceID *string `json:"resourceId,omitempty"` + // NextHopIds - READ-ONLY; List of next hop identifiers. + NextHopIds *[]string `json:"nextHopIds,omitempty"` + // PreviousHopIds - READ-ONLY; List of previous hop identifiers. + PreviousHopIds *[]string `json:"previousHopIds,omitempty"` + // Links - READ-ONLY; List of hop links. + Links *[]HopLink `json:"links,omitempty"` + // PreviousLinks - READ-ONLY; List of previous hop links. + PreviousLinks *[]HopLink `json:"previousLinks,omitempty"` + // Issues - READ-ONLY; List of issues. + Issues *[]ConnectivityIssue `json:"issues,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectivityHop. +func (ch ConnectivityHop) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ConnectivityInformation information on the connectivity status. +type ConnectivityInformation struct { + autorest.Response `json:"-"` + // Hops - READ-ONLY; List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` + // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' + ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` + // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds. + AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` + // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds. + MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` + // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds. + MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` + // ProbesSent - READ-ONLY; Total number of probes sent. + ProbesSent *int32 `json:"probesSent,omitempty"` + // ProbesFailed - READ-ONLY; Number of failed probes. + ProbesFailed *int32 `json:"probesFailed,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectivityInformation. +func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. +type ConnectivityIssue struct { + // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' + Origin Origin `json:"origin,omitempty"` + // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' + Severity Severity `json:"severity,omitempty"` + // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' + Type IssueType `json:"type,omitempty"` + // Context - READ-ONLY; Provides additional context on the issue. + Context *[]map[string]*string `json:"context,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectivityIssue. +func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ConnectivityParameters parameters that determine how the connectivity check will be performed. +type ConnectivityParameters struct { + // Source - The source of the connection. + Source *ConnectivitySource `json:"source,omitempty"` + // Destination - The destination of connection. + Destination *ConnectivityDestination `json:"destination,omitempty"` + // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' + 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: 'IPVersionIPv4', 'IPVersionIPv6' + PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"` +} + +// ConnectivitySource parameters that define the source of the connection. +type ConnectivitySource struct { + // ResourceID - The ID of the resource from which a connectivity check will be initiated. + ResourceID *string `json:"resourceId,omitempty"` + // Port - The source port from which a connectivity check will be performed. + Port *int32 `json:"port,omitempty"` +} + +// Container reference to container resource in remote resource provider. +type Container struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// ContainerNetworkInterface container network interface child resource. +type ContainerNetworkInterface struct { + // ContainerNetworkInterfacePropertiesFormat - Container network interface properties. + *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterface. +func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cni.ContainerNetworkInterfacePropertiesFormat != nil { + objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat + } + if cni.Name != nil { + objectMap["name"] = cni.Name + } + if cni.ID != nil { + objectMap["id"] = cni.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct. +func (cni *ContainerNetworkInterface) 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 containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat + err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat) + if err != nil { + return err + } + cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cni.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cni.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cni.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cni.ID = &ID + } + } + } + + return nil +} + +// ContainerNetworkInterfaceConfiguration container network interface configuration child resource. +type ContainerNetworkInterfaceConfiguration struct { + // ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties. + *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration. +func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil { + objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat + } + if cnic.Name != nil { + objectMap["name"] = cnic.Name + } + if cnic.ID != nil { + objectMap["id"] = cnic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct. +func (cnic *ContainerNetworkInterfaceConfiguration) 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 containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat + err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat) + if err != nil { + return err + } + cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cnic.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cnic.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cnic.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cnic.ID = &ID + } + } + } + + return nil +} + +// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration +// properties. +type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { + // IPConfigurations - A list of ip configurations of the container network interface configuration. + IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"` + // ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration. + ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat. +func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cnicpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = cnicpf.IPConfigurations + } + if cnicpf.ContainerNetworkInterfaces != nil { + objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces + } + return json.Marshal(objectMap) +} + +// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface. +type ContainerNetworkInterfaceIPConfiguration struct { + // ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration. + *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration. +func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat + } + if cniic.Name != nil { + objectMap["name"] = cniic.Name + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct. +func (cniic *ContainerNetworkInterfaceIPConfiguration) 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 containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat) + if err != nil { + return err + } + cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cniic.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cniic.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cniic.Etag = &etag + } + } + } + + return nil +} + +// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface +// IP configuration. +type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat. +func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ContainerNetworkInterfacePropertiesFormat properties of container network interface. +type ContainerNetworkInterfacePropertiesFormat struct { + // ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created. + ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` + // Container - Reference to the container to which this container network interface is attached. + Container *Container `json:"container,omitempty"` + // IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic. + IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat. +func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cnipf.Container != nil { + objectMap["container"] = cnipf.Container + } + return json.Marshal(objectMap) +} + +// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer. +type CustomDNSConfigPropertiesFormat struct { + // Fqdn - Fqdn that resolves to private endpoint ip address. + Fqdn *string `json:"fqdn,omitempty"` + // IPAddresses - A list of private ip addresses of the private endpoint. + IPAddresses *[]string `json:"ipAddresses,omitempty"` +} + +// CustomIPPrefix custom IP prefix resource. +type CustomIPPrefix struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the custom IP prefix. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // CustomIPPrefixPropertiesFormat - Custom IP prefix properties. + *CustomIPPrefixPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // ID - 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 CustomIPPrefix. +func (cip CustomIPPrefix) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cip.ExtendedLocation != nil { + objectMap["extendedLocation"] = cip.ExtendedLocation + } + if cip.CustomIPPrefixPropertiesFormat != nil { + objectMap["properties"] = cip.CustomIPPrefixPropertiesFormat + } + if cip.Zones != nil { + objectMap["zones"] = cip.Zones + } + if cip.ID != nil { + objectMap["id"] = cip.ID + } + if cip.Location != nil { + objectMap["location"] = cip.Location + } + if cip.Tags != nil { + objectMap["tags"] = cip.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CustomIPPrefix struct. +func (cip *CustomIPPrefix) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + cip.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var customIPPrefixPropertiesFormat CustomIPPrefixPropertiesFormat + err = json.Unmarshal(*v, &customIPPrefixPropertiesFormat) + if err != nil { + return err + } + cip.CustomIPPrefixPropertiesFormat = &customIPPrefixPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cip.Etag = &etag + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + cip.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cip.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cip.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cip.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cip.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cip.Tags = tags + } + } + } + + return nil +} + +// CustomIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomIPPrefixesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomIPPrefixesClient) (CustomIPPrefix, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomIPPrefixesCreateOrUpdateFuture.Result. +func (future *CustomIPPrefixesCreateOrUpdateFuture) result(client CustomIPPrefixesClient) (cip CustomIPPrefix, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cip.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.CustomIPPrefixesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cip.Response.Response, err = future.GetResult(sender); err == nil && cip.Response.Response.StatusCode != http.StatusNoContent { + cip, err = client.CreateOrUpdateResponder(cip.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesCreateOrUpdateFuture", "Result", cip.Response.Response, "Failure responding to request") + } + } + return +} + +// CustomIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CustomIPPrefixesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomIPPrefixesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomIPPrefixesDeleteFuture.Result. +func (future *CustomIPPrefixesDeleteFuture) result(client CustomIPPrefixesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.CustomIPPrefixesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// CustomIPPrefixListResult response for ListCustomIpPrefixes API service call. +type CustomIPPrefixListResult struct { + autorest.Response `json:"-"` + // Value - A list of Custom IP prefixes that exists in a resource group. + Value *[]CustomIPPrefix `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// CustomIPPrefixListResultIterator provides access to a complete listing of CustomIPPrefix values. +type CustomIPPrefixListResultIterator struct { + i int + page CustomIPPrefixListResultPage +} + +// 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 *CustomIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultIterator.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 *CustomIPPrefixListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CustomIPPrefixListResultIterator) 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 CustomIPPrefixListResultIterator) Response() CustomIPPrefixListResult { + 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 CustomIPPrefixListResultIterator) Value() CustomIPPrefix { + if !iter.page.NotDone() { + return CustomIPPrefix{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CustomIPPrefixListResultIterator type. +func NewCustomIPPrefixListResultIterator(page CustomIPPrefixListResultPage) CustomIPPrefixListResultIterator { + return CustomIPPrefixListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ciplr CustomIPPrefixListResult) IsEmpty() bool { + return ciplr.Value == nil || len(*ciplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ciplr CustomIPPrefixListResult) hasNextLink() bool { + return ciplr.NextLink != nil && len(*ciplr.NextLink) != 0 +} + +// customIPPrefixListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ciplr CustomIPPrefixListResult) customIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ciplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ciplr.NextLink))) +} + +// CustomIPPrefixListResultPage contains a page of CustomIPPrefix values. +type CustomIPPrefixListResultPage struct { + fn func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error) + ciplr CustomIPPrefixListResult +} + +// 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 *CustomIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ciplr) + if err != nil { + return err + } + page.ciplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *CustomIPPrefixListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CustomIPPrefixListResultPage) NotDone() bool { + return !page.ciplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CustomIPPrefixListResultPage) Response() CustomIPPrefixListResult { + return page.ciplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CustomIPPrefixListResultPage) Values() []CustomIPPrefix { + if page.ciplr.IsEmpty() { + return nil + } + return *page.ciplr.Value +} + +// Creates a new instance of the CustomIPPrefixListResultPage type. +func NewCustomIPPrefixListResultPage(cur CustomIPPrefixListResult, getNextPage func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)) CustomIPPrefixListResultPage { + return CustomIPPrefixListResultPage{ + fn: getNextPage, + ciplr: cur, + } +} + +// CustomIPPrefixPropertiesFormat custom IP prefix properties. +type CustomIPPrefixPropertiesFormat struct { + // Cidr - The prefix range in CIDR notation. Should include the start address and the prefix length. + Cidr *string `json:"cidr,omitempty"` + // SignedMessage - Signed message for WAN validation. + SignedMessage *string `json:"signedMessage,omitempty"` + // AuthorizationMessage - Authorization message for WAN validation. + AuthorizationMessage *string `json:"authorizationMessage,omitempty"` + // CustomIPPrefixParent - The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + CustomIPPrefixParent *CustomIPPrefix `json:"customIpPrefixParent,omitempty"` + // ChildCustomIPPrefixes - READ-ONLY; The list of all Children for IPv6 /48 CustomIpPrefix. + ChildCustomIPPrefixes *[]CustomIPPrefix `json:"childCustomIpPrefixes,omitempty"` + // CommissionedState - The commissioned state of the Custom IP Prefix. Possible values include: 'CommissionedStateProvisioning', 'CommissionedStateProvisioned', 'CommissionedStateCommissioning', 'CommissionedStateCommissioned', 'CommissionedStateDecommissioning', 'CommissionedStateDeprovisioning' + CommissionedState CommissionedState `json:"commissionedState,omitempty"` + // PublicIPPrefixes - READ-ONLY; The list of all referenced PublicIpPrefixes. + PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the custom IP prefix resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // FailedReason - READ-ONLY; The reason why resource is in failed state. + FailedReason *string `json:"failedReason,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the custom IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for CustomIPPrefixPropertiesFormat. +func (cippf CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cippf.Cidr != nil { + objectMap["cidr"] = cippf.Cidr + } + if cippf.SignedMessage != nil { + objectMap["signedMessage"] = cippf.SignedMessage + } + if cippf.AuthorizationMessage != nil { + objectMap["authorizationMessage"] = cippf.AuthorizationMessage + } + if cippf.CustomIPPrefixParent != nil { + objectMap["customIpPrefixParent"] = cippf.CustomIPPrefixParent + } + if cippf.CommissionedState != "" { + objectMap["commissionedState"] = cippf.CommissionedState + } + return json.Marshal(objectMap) +} + +// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosCustomPoliciesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result. +func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + dcp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent { + dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request") + } + } + return +} + +// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosCustomPoliciesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DdosCustomPoliciesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result. +func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DdosCustomPolicy a DDoS custom policy in a resource group. +type DdosCustomPolicy struct { + autorest.Response `json:"-"` + // DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy. + *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 DdosCustomPolicy. +func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dcp.DdosCustomPolicyPropertiesFormat != nil { + objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat + } + if dcp.ID != nil { + objectMap["id"] = dcp.ID + } + if dcp.Location != nil { + objectMap["location"] = dcp.Location + } + if dcp.Tags != nil { + objectMap["tags"] = dcp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct. +func (dcp *DdosCustomPolicy) 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 ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat + err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat) + if err != nil { + return err + } + dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + dcp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dcp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dcp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dcp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dcp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dcp.Tags = tags + } + } + } + + return nil +} + +// DdosCustomPolicyPropertiesFormat dDoS custom policy properties. +type DdosCustomPolicyPropertiesFormat struct { + // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only. + PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"` + // ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters. + ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"` +} + +// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat. +func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dcppf.ProtocolCustomSettings != nil { + objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings + } + return json.Marshal(objectMap) +} + +// DdosProtectionPlan a DDoS protection plan in a resource group. +type DdosProtectionPlan struct { + autorest.Response `json:"-"` + // 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"` + // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. + *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for DdosProtectionPlan. +func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpp.Location != nil { + objectMap["location"] = dpp.Location + } + if dpp.Tags != nil { + objectMap["tags"] = dpp.Tags + } + if dpp.DdosProtectionPlanPropertiesFormat != nil { + objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. +func (dpp *DdosProtectionPlan) 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 + } + dpp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dpp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dpp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dpp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dpp.Tags = tags + } + case "properties": + if v != nil { + var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat + err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) + if err != nil { + return err + } + dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + dpp.Etag = &etag + } + } + } + + return nil +} + +// DdosProtectionPlanListResult a list of DDoS protection plans. +type DdosProtectionPlanListResult struct { + autorest.Response `json:"-"` + // Value - A list of DDoS protection plans. + Value *[]DdosProtectionPlan `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult. +func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpplr.Value != nil { + objectMap["value"] = dpplr.Value + } + return json.Marshal(objectMap) +} + +// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. +type DdosProtectionPlanListResultIterator struct { + i int + page DdosProtectionPlanListResultPage +} + +// 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 *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.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 *DdosProtectionPlanListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DdosProtectionPlanListResultIterator) 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 DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { + 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 DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { + if !iter.page.NotDone() { + return DdosProtectionPlan{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DdosProtectionPlanListResultIterator type. +func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator { + return DdosProtectionPlanListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { + return dpplr.Value == nil || len(*dpplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dpplr DdosProtectionPlanListResult) hasNextLink() bool { + return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0 +} + +// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dpplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dpplr.NextLink))) +} + +// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. +type DdosProtectionPlanListResultPage struct { + fn func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) + dpplr DdosProtectionPlanListResult +} + +// 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 *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dpplr) + if err != nil { + return err + } + page.dpplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DdosProtectionPlanListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DdosProtectionPlanListResultPage) NotDone() bool { + return !page.dpplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { + return page.dpplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { + if page.dpplr.IsEmpty() { + return nil + } + return *page.dpplr.Value +} + +// Creates a new instance of the DdosProtectionPlanListResultPage type. +func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { + return DdosProtectionPlanListResultPage{ + fn: getNextPage, + dpplr: cur, + } +} + +// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. +type DdosProtectionPlanPropertiesFormat struct { + // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` +} + +// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat. +func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosProtectionPlansCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result. +func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + dpp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { + dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request") + } + } + return +} + +// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosProtectionPlansDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DdosProtectionPlansClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DdosProtectionPlansDeleteFuture.Result. +func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DdosSettings contains the DDoS protection settings of the public IP. +type DdosSettings struct { + // DdosCustomPolicy - The DDoS custom policy associated with the public IP. + DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"` + // ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'DdosSettingsProtectionCoverageBasic', 'DdosSettingsProtectionCoverageStandard' + ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"` + // ProtectedIP - Enables DDoS protection on the public IP. + ProtectedIP *bool `json:"protectedIP,omitempty"` +} + +// Delegation details the service to which the subnet is delegated. +type Delegation struct { + // ServiceDelegationPropertiesFormat - Properties of the subnet. + *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a subnet. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for Delegation. +func (d Delegation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if d.ServiceDelegationPropertiesFormat != nil { + objectMap["properties"] = d.ServiceDelegationPropertiesFormat + } + if d.Name != nil { + objectMap["name"] = d.Name + } + if d.Type != nil { + objectMap["type"] = d.Type + } + if d.ID != nil { + objectMap["id"] = d.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Delegation struct. +func (d *Delegation) 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 serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat + err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat) + if err != nil { + return err + } + d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + d.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + d.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + d.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + d.ID = &ID + } + } + } + + return nil +} + +// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DeleteBastionShareableLinkFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BaseClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DeleteBastionShareableLinkFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DeleteBastionShareableLinkFuture.Result. +func (future *DeleteBastionShareableLinkFuture) result(client BaseClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DeleteBastionShareableLinkFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DeleteBastionShareableLinkFuture") + return + } + ar.Response = future.Response() + return +} + +// DeviceProperties list of properties of the device. +type DeviceProperties struct { + // DeviceVendor - Name of the device Vendor. + DeviceVendor *string `json:"deviceVendor,omitempty"` + // DeviceModel - Model of the device. + DeviceModel *string `json:"deviceModel,omitempty"` + // LinkSpeedInMbps - Link speed. + LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` +} + +// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual +// network. Standard DHCP option for a subnet overrides VNET DHCP options. +type DhcpOptions struct { + // DNSServers - The list of DNS servers IP addresses. + DNSServers *[]string `json:"dnsServers,omitempty"` +} + +// Dimension dimension of the metric. +type Dimension struct { + // Name - The name of the dimension. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the dimension. + DisplayName *string `json:"displayName,omitempty"` + // InternalName - The internal name of the dimension. + InternalName *string `json:"internalName,omitempty"` +} + +// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. +type DNSNameAvailabilityResult struct { + autorest.Response `json:"-"` + // Available - Domain availability (True/False). + Available *bool `json:"available,omitempty"` +} + +// DNSSettings DNS Proxy Settings in Firewall Policy. +type DNSSettings struct { + // Servers - List of Custom DNS Servers. + Servers *[]string `json:"servers,omitempty"` + // EnableProxy - Enable DNS Proxy on Firewalls attached to the Firewall Policy. + EnableProxy *bool `json:"enableProxy,omitempty"` + // RequireProxyForNetworkRules - FQDNs in Network Rules are supported when set to true. + RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"` +} + +// DscpConfiguration differentiated Services Code Point configuration for any given network interface +type DscpConfiguration struct { + autorest.Response `json:"-"` + // DscpConfigurationPropertiesFormat - Properties of the network interface. + *DscpConfigurationPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 DscpConfiguration. +func (dc DscpConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dc.DscpConfigurationPropertiesFormat != nil { + objectMap["properties"] = dc.DscpConfigurationPropertiesFormat + } + if dc.ID != nil { + objectMap["id"] = dc.ID + } + if dc.Location != nil { + objectMap["location"] = dc.Location + } + if dc.Tags != nil { + objectMap["tags"] = dc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DscpConfiguration struct. +func (dc *DscpConfiguration) 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 dscpConfigurationPropertiesFormat DscpConfigurationPropertiesFormat + err = json.Unmarshal(*v, &dscpConfigurationPropertiesFormat) + if err != nil { + return err + } + dc.DscpConfigurationPropertiesFormat = &dscpConfigurationPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + dc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dc.Tags = tags + } + } + } + + return nil +} + +// DscpConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DscpConfigurationCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DscpConfigurationClient) (DscpConfiguration, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DscpConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DscpConfigurationCreateOrUpdateFuture.Result. +func (future *DscpConfigurationCreateOrUpdateFuture) result(client DscpConfigurationClient) (dc DscpConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + dc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DscpConfigurationCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dc.Response.Response, err = future.GetResult(sender); err == nil && dc.Response.Response.StatusCode != http.StatusNoContent { + dc, err = client.CreateOrUpdateResponder(dc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationCreateOrUpdateFuture", "Result", dc.Response.Response, "Failure responding to request") + } + } + return +} + +// DscpConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DscpConfigurationDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DscpConfigurationClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DscpConfigurationDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DscpConfigurationDeleteFuture.Result. +func (future *DscpConfigurationDeleteFuture) result(client DscpConfigurationClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DscpConfigurationDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.DscpConfigurationDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DscpConfigurationListResult response for the DscpConfigurationList API service call. +type DscpConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - A list of dscp configurations in a resource group. + Value *[]DscpConfiguration `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for DscpConfigurationListResult. +func (dclr DscpConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dclr.Value != nil { + objectMap["value"] = dclr.Value + } + return json.Marshal(objectMap) +} + +// DscpConfigurationListResultIterator provides access to a complete listing of DscpConfiguration values. +type DscpConfigurationListResultIterator struct { + i int + page DscpConfigurationListResultPage +} + +// 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 *DscpConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultIterator.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 *DscpConfigurationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DscpConfigurationListResultIterator) 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 DscpConfigurationListResultIterator) Response() DscpConfigurationListResult { + 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 DscpConfigurationListResultIterator) Value() DscpConfiguration { + if !iter.page.NotDone() { + return DscpConfiguration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DscpConfigurationListResultIterator type. +func NewDscpConfigurationListResultIterator(page DscpConfigurationListResultPage) DscpConfigurationListResultIterator { + return DscpConfigurationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dclr DscpConfigurationListResult) IsEmpty() bool { + return dclr.Value == nil || len(*dclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dclr DscpConfigurationListResult) hasNextLink() bool { + return dclr.NextLink != nil && len(*dclr.NextLink) != 0 +} + +// dscpConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dclr DscpConfigurationListResult) dscpConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dclr.NextLink))) +} + +// DscpConfigurationListResultPage contains a page of DscpConfiguration values. +type DscpConfigurationListResultPage struct { + fn func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error) + dclr DscpConfigurationListResult +} + +// 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 *DscpConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dclr) + if err != nil { + return err + } + page.dclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *DscpConfigurationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DscpConfigurationListResultPage) NotDone() bool { + return !page.dclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DscpConfigurationListResultPage) Response() DscpConfigurationListResult { + return page.dclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DscpConfigurationListResultPage) Values() []DscpConfiguration { + if page.dclr.IsEmpty() { + return nil + } + return *page.dclr.Value +} + +// Creates a new instance of the DscpConfigurationListResultPage type. +func NewDscpConfigurationListResultPage(cur DscpConfigurationListResult, getNextPage func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)) DscpConfigurationListResultPage { + return DscpConfigurationListResultPage{ + fn: getNextPage, + dclr: cur, + } +} + +// DscpConfigurationPropertiesFormat differentiated Services Code Point configuration properties. +type DscpConfigurationPropertiesFormat struct { + // Markings - List of markings to be used in the configuration. + Markings *[]int32 `json:"markings,omitempty"` + // SourceIPRanges - Source IP ranges. + SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` + // DestinationIPRanges - Destination IP ranges. + DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` + // SourcePortRanges - Sources port ranges. + SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - Destination port ranges. + DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` + // Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll' + Protocol ProtocolType `json:"protocol,omitempty"` + // QosDefinitionCollection - QoS object definitions + QosDefinitionCollection *[]QosDefinition `json:"qosDefinitionCollection,omitempty"` + // QosCollectionID - READ-ONLY; Qos Collection ID generated by RNM. + QosCollectionID *string `json:"qosCollectionId,omitempty"` + // AssociatedNetworkInterfaces - READ-ONLY; Associated Network Interfaces to the DSCP Configuration. + AssociatedNetworkInterfaces *[]Interface `json:"associatedNetworkInterfaces,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the DSCP Configuration resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the DSCP Configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for DscpConfigurationPropertiesFormat. +func (dcpf DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dcpf.Markings != nil { + objectMap["markings"] = dcpf.Markings + } + if dcpf.SourceIPRanges != nil { + objectMap["sourceIpRanges"] = dcpf.SourceIPRanges + } + if dcpf.DestinationIPRanges != nil { + objectMap["destinationIpRanges"] = dcpf.DestinationIPRanges + } + if dcpf.SourcePortRanges != nil { + objectMap["sourcePortRanges"] = dcpf.SourcePortRanges + } + if dcpf.DestinationPortRanges != nil { + objectMap["destinationPortRanges"] = dcpf.DestinationPortRanges + } + if dcpf.Protocol != "" { + objectMap["protocol"] = dcpf.Protocol + } + if dcpf.QosDefinitionCollection != nil { + objectMap["qosDefinitionCollection"] = dcpf.QosDefinitionCollection + } + return json.Marshal(objectMap) +} + +// EffectiveNetworkSecurityGroup effective network security group. +type EffectiveNetworkSecurityGroup struct { + // NetworkSecurityGroup - The ID of network security group that is applied. + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + // Association - Associated resources. + Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` + // EffectiveSecurityRules - A collection of effective security rules. + EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` + // TagMap - Mapping of tags to list of IP Addresses included within the tag. + TagMap map[string][]string `json:"tagMap"` +} + +// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. +func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensg.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup + } + if ensg.Association != nil { + objectMap["association"] = ensg.Association + } + if ensg.EffectiveSecurityRules != nil { + objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules + } + if ensg.TagMap != nil { + objectMap["tagMap"] = ensg.TagMap + } + return json.Marshal(objectMap) +} + +// EffectiveNetworkSecurityGroupAssociation the effective network security group association. +type EffectiveNetworkSecurityGroupAssociation struct { + // NetworkManager - The ID of the Azure network manager if assigned. + NetworkManager *SubResource `json:"networkManager,omitempty"` + // Subnet - The ID of the subnet if assigned. + Subnet *SubResource `json:"subnet,omitempty"` + // NetworkInterface - The ID of the network interface if assigned. + NetworkInterface *SubResource `json:"networkInterface,omitempty"` +} + +// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service +// call. +type EffectiveNetworkSecurityGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of effective network security groups. + Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult. +func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensglr.Value != nil { + objectMap["value"] = ensglr.Value + } + return json.Marshal(objectMap) +} + +// EffectiveNetworkSecurityRule effective network security rules. +type EffectiveNetworkSecurityRule struct { + // Name - The name of the security rule specified by the user (if created by the user). + Name *string `json:"name,omitempty"` + // Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll' + Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` + // SourcePortRange - The source port or range. + SourcePortRange *string `json:"sourcePortRange,omitempty"` + // DestinationPortRange - The destination port or range. + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + // SourceAddressPrefix - The source address prefix. + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + // DestinationAddressPrefix - The destination address prefix. + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + // ExpandedSourceAddressPrefix - The expanded source address prefix. + ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` + // ExpandedDestinationAddressPrefix - Expanded destination address prefix. + ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` + // Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + Access SecurityRuleAccess `json:"access,omitempty"` + // Priority - The priority of the rule. + Priority *int32 `json:"priority,omitempty"` + // Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' + Direction SecurityRuleDirection `json:"direction,omitempty"` +} + +// EffectiveRoute effective Route. +type EffectiveRoute struct { + // Name - The name of the user defined route. This is optional. + Name *string `json:"name,omitempty"` + // DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet. + DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` + // Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' + Source EffectiveRouteSource `json:"source,omitempty"` + // State - The value of effective route. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid' + State EffectiveRouteState `json:"state,omitempty"` + // AddressPrefix - The address prefixes of the effective routes in CIDR notation. + AddressPrefix *[]string `json:"addressPrefix,omitempty"` + // NextHopIPAddress - The IP address of the next hop of the effective route. + NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` + // NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' + NextHopType RouteNextHopType `json:"nextHopType,omitempty"` +} + +// EffectiveRouteListResult response for list effective route API service call. +type EffectiveRouteListResult struct { + autorest.Response `json:"-"` + // Value - A list of effective routes. + Value *[]EffectiveRoute `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for EffectiveRouteListResult. +func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erlr.Value != nil { + objectMap["value"] = erlr.Value + } + return json.Marshal(objectMap) +} + +// EffectiveRoutesParameters the parameters specifying the resource whose effective routes are being +// requested. +type EffectiveRoutesParameters struct { + // ResourceID - The resource whose effective routes are being requested. + ResourceID *string `json:"resourceId,omitempty"` + // VirtualWanResourceType - The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. + VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"` +} + +// EndpointServiceResult endpoint service. +type EndpointServiceResult struct { + // Name - READ-ONLY; Name of the endpoint service. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the endpoint service. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for EndpointServiceResult. +func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esr.ID != nil { + objectMap["id"] = esr.ID + } + return json.Marshal(objectMap) +} + +// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. +type EndpointServicesListResult struct { + autorest.Response `json:"-"` + // Value - List of available endpoint services in a region. + Value *[]EndpointServiceResult `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult +// values. +type EndpointServicesListResultIterator struct { + i int + page EndpointServicesListResultPage +} + +// 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 *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.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 *EndpointServicesListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EndpointServicesListResultIterator) 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 EndpointServicesListResultIterator) Response() EndpointServicesListResult { + 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 EndpointServicesListResultIterator) Value() EndpointServiceResult { + if !iter.page.NotDone() { + return EndpointServiceResult{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EndpointServicesListResultIterator type. +func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator { + return EndpointServicesListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (eslr EndpointServicesListResult) IsEmpty() bool { + return eslr.Value == nil || len(*eslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (eslr EndpointServicesListResult) hasNextLink() bool { + return eslr.NextLink != nil && len(*eslr.NextLink) != 0 +} + +// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) { + if !eslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(eslr.NextLink))) +} + +// EndpointServicesListResultPage contains a page of EndpointServiceResult values. +type EndpointServicesListResultPage struct { + fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error) + eslr EndpointServicesListResult +} + +// 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 *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.eslr) + if err != nil { + return err + } + page.eslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *EndpointServicesListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EndpointServicesListResultPage) NotDone() bool { + return !page.eslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { + return page.eslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { + if page.eslr.IsEmpty() { + return nil + } + return *page.eslr.Value +} + +// Creates a new instance of the EndpointServicesListResultPage type. +func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { + return EndpointServicesListResultPage{ + fn: getNextPage, + eslr: cur, + } +} + +// Error common error representation. +type Error struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` + // Target - Error target. + Target *string `json:"target,omitempty"` + // Details - Error details. + Details *[]ErrorDetails `json:"details,omitempty"` + // InnerError - Inner error message. + InnerError *string `json:"innerError,omitempty"` +} + +// ErrorDetails common error details representation. +type ErrorDetails struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Target - Error target. + Target *string `json:"target,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` +} + +// ErrorResponse the error object. +type ErrorResponse struct { + // Error - The error details object. + Error *ErrorDetails `json:"error,omitempty"` +} + +// EvaluatedNetworkSecurityGroup results of network security group evaluation. +type EvaluatedNetworkSecurityGroup struct { + // NetworkSecurityGroupID - Network security group ID. + NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"` + // AppliedTo - Resource ID of nic or subnet to which network security group is applied. + AppliedTo *string `json:"appliedTo,omitempty"` + // MatchedRule - Matched network security rule. + MatchedRule *MatchedRule `json:"matchedRule,omitempty"` + // RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results. + RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"` +} + +// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup. +func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensg.NetworkSecurityGroupID != nil { + objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID + } + if ensg.AppliedTo != nil { + objectMap["appliedTo"] = ensg.AppliedTo + } + if ensg.MatchedRule != nil { + objectMap["matchedRule"] = ensg.MatchedRule + } + return json.Marshal(objectMap) +} + +// ExplicitProxySettings explicit Proxy Settings in Firewall Policy. +type ExplicitProxySettings struct { + // EnableExplicitProxy - When set to true, explicit proxy mode is enabled. + EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"` + // HTTPPort - Port number for explicit proxy http protocol, cannot be greater than 64000. + HTTPPort *int32 `json:"httpPort,omitempty"` + // HTTPSPort - Port number for explicit proxy https protocol, cannot be greater than 64000. + HTTPSPort *int32 `json:"httpsPort,omitempty"` + // PacFilePort - Port number for firewall to serve PAC file. + PacFilePort *int32 `json:"pacFilePort,omitempty"` + // PacFile - SAS URL for PAC file. + PacFile *string `json:"pacFile,omitempty"` +} + +// ExpressRouteCircuit expressRouteCircuit resource. +type ExpressRouteCircuit struct { + autorest.Response `json:"-"` + // Sku - The SKU. + Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` + // ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit. + *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 ExpressRouteCircuit. +func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erc.Sku != nil { + objectMap["sku"] = erc.Sku + } + if erc.ExpressRouteCircuitPropertiesFormat != nil { + objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat + } + if erc.ID != nil { + objectMap["id"] = erc.ID + } + if erc.Location != nil { + objectMap["location"] = erc.Location + } + if erc.Tags != nil { + objectMap["tags"] = erc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. +func (erc *ExpressRouteCircuit) 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 "sku": + if v != nil { + var sku ExpressRouteCircuitSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + erc.Sku = &sku + } + case "properties": + if v != nil { + var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) + if err != nil { + return err + } + erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erc.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitArpTable struct { + // Age - Entry age in minutes. + Age *int32 `json:"age,omitempty"` + // Interface - Interface address. + Interface *string `json:"interface,omitempty"` + // IPAddress - The IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // MacAddress - The MAC address. + MacAddress *string `json:"macAddress,omitempty"` +} + +// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. +type ExpressRouteCircuitAuthorization struct { + autorest.Response `json:"-"` + // AuthorizationPropertiesFormat - Properties of the express route circuit authorization. + *AuthorizationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. +func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erca.AuthorizationPropertiesFormat != nil { + objectMap["properties"] = erca.AuthorizationPropertiesFormat + } + if erca.Name != nil { + objectMap["name"] = erca.Name + } + if erca.ID != nil { + objectMap["id"] = erca.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. +func (erca *ExpressRouteCircuitAuthorization) 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 authorizationPropertiesFormat AuthorizationPropertiesFormat + err = json.Unmarshal(*v, &authorizationPropertiesFormat) + if err != nil { + return err + } + erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erca.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erca.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erca.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erca.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result. +func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erca.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { + erca, err = client.CreateOrUpdateResponder(erca.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCircuitAuthorizationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result. +func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering +// resource. +type ExpressRouteCircuitConnection struct { + autorest.Response `json:"-"` + // ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection. + *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. +func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { + objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat + } + if ercc.Name != nil { + objectMap["name"] = ercc.Name + } + if ercc.ID != nil { + objectMap["id"] = ercc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. +func (ercc *ExpressRouteCircuitConnection) 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 expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) + if err != nil { + return err + } + ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ercc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercc.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all +// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. +type ExpressRouteCircuitConnectionListResult struct { + autorest.Response `json:"-"` + // Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit. + Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of +// ExpressRouteCircuitConnection values. +type ExpressRouteCircuitConnectionListResultIterator struct { + i int + page ExpressRouteCircuitConnectionListResultPage +} + +// 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 *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.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 *ExpressRouteCircuitConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitConnectionListResultIterator) 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 ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult { + 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 ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection { + if !iter.page.NotDone() { + return ExpressRouteCircuitConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type. +func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator { + return ExpressRouteCircuitConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool { + return ercclr.Value == nil || len(*ercclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool { + return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0 +} + +// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ercclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercclr.NextLink))) +} + +// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values. +type ExpressRouteCircuitConnectionListResultPage struct { + fn func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error) + ercclr ExpressRouteCircuitConnectionListResult +} + +// 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 *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteCircuitConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool { + return !page.ercclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult { + return page.ercclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection { + if page.ercclr.IsEmpty() { + return nil + } + return *page.ercclr.Value +} + +// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type. +func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage { + return ExpressRouteCircuitConnectionListResultPage{ + fn: getNextPage, + ercclr: cur, + } +} + +// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection. +type ExpressRouteCircuitConnectionPropertiesFormat struct { + // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` + // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` + // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // AuthorizationKey - The authorization key. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection. + Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` + // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat. +func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccpf.ExpressRouteCircuitPeering != nil { + objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering + } + if erccpf.PeerExpressRouteCircuitPeering != nil { + objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering + } + if erccpf.AddressPrefix != nil { + objectMap["addressPrefix"] = erccpf.AddressPrefix + } + if erccpf.AuthorizationKey != nil { + objectMap["authorizationKey"] = erccpf.AuthorizationKey + } + if erccpf.Ipv6CircuitConnectionConfig != nil { + objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig + } + if erccpf.CircuitConnectionStatus != "" { + objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus + } + return json.Marshal(objectMap) +} + +// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result. +func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result. +func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. +type ExpressRouteCircuitListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRouteCircuits in a resource group. + Value *[]ExpressRouteCircuit `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit +// values. +type ExpressRouteCircuitListResultIterator struct { + i int + page ExpressRouteCircuitListResultPage +} + +// 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 *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.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 *ExpressRouteCircuitListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitListResultIterator) 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 ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { + 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 ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { + if !iter.page.NotDone() { + return ExpressRouteCircuit{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCircuitListResultIterator type. +func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { + return ExpressRouteCircuitListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { + return erclr.Value == nil || len(*erclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (erclr ExpressRouteCircuitListResult) hasNextLink() bool { + return erclr.NextLink != nil && len(*erclr.NextLink) != 0 +} + +// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { + if !erclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erclr.NextLink))) +} + +// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. +type ExpressRouteCircuitListResultPage struct { + fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) + erclr ExpressRouteCircuitListResult +} + +// 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 *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.erclr) + if err != nil { + return err + } + page.erclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteCircuitListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitListResultPage) NotDone() bool { + return !page.erclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { + return page.erclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { + if page.erclr.IsEmpty() { + return nil + } + return *page.erclr.Value +} + +// Creates a new instance of the ExpressRouteCircuitListResultPage type. +func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { + return ExpressRouteCircuitListResultPage{ + fn: getNextPage, + erclr: cur, + } +} + +// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. +type ExpressRouteCircuitPeering struct { + autorest.Response `json:"-"` + // ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering. + *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. +func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { + objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat + } + if ercp.Name != nil { + objectMap["name"] = ercp.Name + } + if ercp.ID != nil { + objectMap["id"] = ercp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. +func (ercp *ExpressRouteCircuitPeering) 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 expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) + if err != nil { + return err + } + ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ercp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercp.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCircuitPeeringConfig specifies the peering configuration. +type ExpressRouteCircuitPeeringConfig struct { + // AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes. + AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` + // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering. + AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` + // AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded' + AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` + // LegacyMode - The legacy mode of the peering. + LegacyMode *int32 `json:"legacyMode,omitempty"` + // CustomerASN - The CustomerASN of the peering. + CustomerASN *int32 `json:"customerASN,omitempty"` + // RoutingRegistryName - The RoutingRegistryName of the configuration. + RoutingRegistryName *string `json:"routingRegistryName,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig. +func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercpc.AdvertisedPublicPrefixes != nil { + objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes + } + if ercpc.AdvertisedCommunities != nil { + objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities + } + if ercpc.LegacyMode != nil { + objectMap["legacyMode"] = ercpc.LegacyMode + } + if ercpc.CustomerASN != nil { + objectMap["customerASN"] = ercpc.CustomerASN + } + if ercpc.RoutingRegistryName != nil { + objectMap["routingRegistryName"] = ercpc.RoutingRegistryName + } + return json.Marshal(objectMap) +} + +// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier. +type ExpressRouteCircuitPeeringID struct { + // ID - The ID of the ExpressRoute circuit peering. + ID *string `json:"id,omitempty"` +} + +// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings +// that belong to an ExpressRouteCircuit. +type ExpressRouteCircuitPeeringListResult struct { + autorest.Response `json:"-"` + // Value - The peerings in an express route circuit. + Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of +// ExpressRouteCircuitPeering values. +type ExpressRouteCircuitPeeringListResultIterator struct { + i int + page ExpressRouteCircuitPeeringListResultPage +} + +// 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 *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.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 *ExpressRouteCircuitPeeringListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitPeeringListResultIterator) 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 ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { + 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 ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { + if !iter.page.NotDone() { + return ExpressRouteCircuitPeering{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. +func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { + return ExpressRouteCircuitPeeringListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { + return ercplr.Value == nil || len(*ercplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool { + return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0 +} + +// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ercplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercplr.NextLink))) +} + +// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. +type ExpressRouteCircuitPeeringListResultPage struct { + fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) + ercplr ExpressRouteCircuitPeeringListResult +} + +// 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 *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ercplr) + if err != nil { + return err + } + page.ercplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteCircuitPeeringListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { + return !page.ercplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { + return page.ercplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { + if page.ercplr.IsEmpty() { + return nil + } + return *page.ercplr.Value +} + +// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. +func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { + return ExpressRouteCircuitPeeringListResultPage{ + fn: getNextPage, + ercplr: cur, + } +} + +// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering. +type ExpressRouteCircuitPeeringPropertiesFormat struct { + // PeeringType - The peering type. Possible values include: 'ExpressRoutePeeringTypeAzurePublicPeering', 'ExpressRoutePeeringTypeAzurePrivatePeering', 'ExpressRoutePeeringTypeMicrosoftPeering' + PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` + // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' + State ExpressRoutePeeringState `json:"state,omitempty"` + // AzureASN - The Azure ASN. + AzureASN *int32 `json:"azureASN,omitempty"` + // PeerASN - The peer ASN. + PeerASN *int64 `json:"peerASN,omitempty"` + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // PrimaryAzurePort - The primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - The secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // SharedKey - The shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // VlanID - The VLAN ID. + VlanID *int32 `json:"vlanId,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // Stats - The peering stats of express route circuit. + Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // LastModifiedBy - READ-ONLY; Who was the last to modify the peering. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // RouteFilter - The reference to the RouteFilter resource. + RouteFilter *SubResource `json:"routeFilter,omitempty"` + // Ipv6PeeringConfig - The IPv6 peering configuration. + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` + // ExpressRouteConnection - The ExpressRoute connection. + ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` + // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. + Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` + // PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit. + PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat. +func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercppf.PeeringType != "" { + objectMap["peeringType"] = ercppf.PeeringType + } + if ercppf.State != "" { + objectMap["state"] = ercppf.State + } + if ercppf.AzureASN != nil { + objectMap["azureASN"] = ercppf.AzureASN + } + if ercppf.PeerASN != nil { + objectMap["peerASN"] = ercppf.PeerASN + } + if ercppf.PrimaryPeerAddressPrefix != nil { + objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix + } + if ercppf.SecondaryPeerAddressPrefix != nil { + objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix + } + if ercppf.PrimaryAzurePort != nil { + objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort + } + if ercppf.SecondaryAzurePort != nil { + objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort + } + if ercppf.SharedKey != nil { + objectMap["sharedKey"] = ercppf.SharedKey + } + if ercppf.VlanID != nil { + objectMap["vlanId"] = ercppf.VlanID + } + if ercppf.MicrosoftPeeringConfig != nil { + objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig + } + if ercppf.Stats != nil { + objectMap["stats"] = ercppf.Stats + } + if ercppf.GatewayManagerEtag != nil { + objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag + } + if ercppf.RouteFilter != nil { + objectMap["routeFilter"] = ercppf.RouteFilter + } + if ercppf.Ipv6PeeringConfig != nil { + objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig + } + if ercppf.ExpressRouteConnection != nil { + objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection + } + if ercppf.Connections != nil { + objectMap["connections"] = ercppf.Connections + } + return json.Marshal(objectMap) +} + +// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result. +func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { + ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitPeeringsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result. +func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. +type ExpressRouteCircuitPropertiesFormat struct { + // AllowClassicOperations - Allow classic operations. + AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` + // CircuitProvisioningState - The CircuitProvisioningState state of the resource. + CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` + // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning' + ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` + // Authorizations - The list of authorizations. + Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` + // ServiceKey - The ServiceKey. + ServiceKey *string `json:"serviceKey,omitempty"` + // ServiceProviderNotes - The ServiceProviderNotes. + ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` + // ServiceProviderProperties - The ServiceProviderProperties. + ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` + // ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. + ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` + // BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. + BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` + // Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + Stag *int32 `json:"stag,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // GlobalReachEnabled - Flag denoting global reach status. + GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat. +func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercpf.AllowClassicOperations != nil { + objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations + } + if ercpf.CircuitProvisioningState != nil { + objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState + } + if ercpf.ServiceProviderProvisioningState != "" { + objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState + } + if ercpf.Authorizations != nil { + objectMap["authorizations"] = ercpf.Authorizations + } + if ercpf.Peerings != nil { + objectMap["peerings"] = ercpf.Peerings + } + if ercpf.ServiceKey != nil { + objectMap["serviceKey"] = ercpf.ServiceKey + } + if ercpf.ServiceProviderNotes != nil { + objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes + } + if ercpf.ServiceProviderProperties != nil { + objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties + } + if ercpf.ExpressRoutePort != nil { + objectMap["expressRoutePort"] = ercpf.ExpressRoutePort + } + if ercpf.BandwidthInGbps != nil { + objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps + } + if ercpf.GatewayManagerEtag != nil { + objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag + } + if ercpf.GlobalReachEnabled != nil { + objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled + } + return json.Marshal(objectMap) +} + +// ExpressRouteCircuitReference reference to an express route circuit. +type ExpressRouteCircuitReference struct { + // ID - Corresponding Express Route Circuit Id. + ID *string `json:"id,omitempty"` +} + +// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTable struct { + // NetworkProperty - IP address of a network entity. + NetworkProperty *string `json:"network,omitempty"` + // NextHop - NextHop address. + NextHop *string `json:"nextHop,omitempty"` + // LocPrf - Local preference value as set with the set local-preference route-map configuration command. + LocPrf *string `json:"locPrf,omitempty"` + // Weight - Route Weight. + Weight *int32 `json:"weight,omitempty"` + // Path - Autonomous system paths to the destination network. + Path *string `json:"path,omitempty"` +} + +// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTableSummary struct { + // Neighbor - IP address of the neighbor. + Neighbor *string `json:"neighbor,omitempty"` + // V - BGP version number spoken to the neighbor. + V *int32 `json:"v,omitempty"` + // As - Autonomous system number. + As *int32 `json:"as,omitempty"` + // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + UpDown *string `json:"upDown,omitempty"` + // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StatePfxRcd *string `json:"statePfxRcd,omitempty"` +} + +// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route +// Circuits API. +type ExpressRouteCircuitsArpTableListResult struct { + autorest.Response `json:"-"` + // Value - A list of the ARP tables. + Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result. +func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.CreateOrUpdateResponder(erc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result. +func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an +// ExpressRouteCircuit. +type ExpressRouteCircuitServiceProviderProperties struct { + // ServiceProviderName - The serviceProviderName. + ServiceProviderName *string `json:"serviceProviderName,omitempty"` + // PeeringLocation - The peering location. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - The BandwidthInMbps. + BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` +} + +// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. +type ExpressRouteCircuitSku struct { + // Name - The name of the SKU. + Name *string `json:"name,omitempty"` + // Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal' + Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` + // Family - The family of the SKU. Possible values include: 'ExpressRouteCircuitSkuFamilyUnlimitedData', 'ExpressRouteCircuitSkuFamilyMeteredData' + Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` +} + +// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListArpTableFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result. +func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercatlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { + ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListRoutesTableFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result. +func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercrtlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { + ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result. +func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercrtslr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { + ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route +// Circuits API. +type ExpressRouteCircuitsRoutesTableListResult struct { + autorest.Response `json:"-"` + // Value - The list of routes table. + Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the +// Express Route Circuits API. +type ExpressRouteCircuitsRoutesTableSummaryListResult struct { + autorest.Response `json:"-"` + // Value - A list of the routes table. + Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitStats contains stats associated with the peering. +type ExpressRouteCircuitStats struct { + autorest.Response `json:"-"` + // PrimarybytesIn - The Primary BytesIn of the peering. + PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` + // PrimarybytesOut - The primary BytesOut of the peering. + PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` + // SecondarybytesIn - The secondary BytesIn of the peering. + SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` + // SecondarybytesOut - The secondary BytesOut of the peering. + SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` +} + +// ExpressRouteConnection expressRouteConnection resource. +type ExpressRouteConnection struct { + autorest.Response `json:"-"` + // ExpressRouteConnectionProperties - Properties of the express route connection. + *ExpressRouteConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource. + Name *string `json:"name,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteConnection. +func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erc.ExpressRouteConnectionProperties != nil { + objectMap["properties"] = erc.ExpressRouteConnectionProperties + } + if erc.Name != nil { + objectMap["name"] = erc.Name + } + if erc.ID != nil { + objectMap["id"] = erc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct. +func (erc *ExpressRouteConnection) 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 expressRouteConnectionProperties ExpressRouteConnectionProperties + err = json.Unmarshal(*v, &expressRouteConnectionProperties) + if err != nil { + return err + } + erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erc.Name = &name + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erc.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteConnectionID the ID of the ExpressRouteConnection. +type ExpressRouteConnectionID struct { + // ID - READ-ONLY; The ID of the ExpressRouteConnection. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteConnectionID. +func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExpressRouteConnectionList expressRouteConnection list. +type ExpressRouteConnectionList struct { + autorest.Response `json:"-"` + // Value - The list of ExpressRoute connections. + Value *[]ExpressRouteConnection `json:"value,omitempty"` +} + +// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource. +type ExpressRouteConnectionProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ExpressRouteCircuitPeering - The ExpressRoute circuit peering. + ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"` + // AuthorizationKey - Authorization key to establish the connection. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // RoutingWeight - The routing weight associated to the connection. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // EnableInternetSecurity - Enable internet security. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // ExpressRouteGatewayBypass - Enable FastPath to vWan Firewall hub. + ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` + // RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties. +func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercp.ExpressRouteCircuitPeering != nil { + objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering + } + if ercp.AuthorizationKey != nil { + objectMap["authorizationKey"] = ercp.AuthorizationKey + } + if ercp.RoutingWeight != nil { + objectMap["routingWeight"] = ercp.RoutingWeight + } + if ercp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity + } + if ercp.ExpressRouteGatewayBypass != nil { + objectMap["expressRouteGatewayBypass"] = ercp.ExpressRouteGatewayBypass + } + if ercp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = ercp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + +// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ExpressRouteConnectionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result. +func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.CreateOrUpdateResponder(erc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result. +func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCrossConnection expressRouteCrossConnection resource. +type ExpressRouteCrossConnection struct { + autorest.Response `json:"-"` + // ExpressRouteCrossConnectionProperties - Properties of the express route cross connection. + *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 ExpressRouteCrossConnection. +func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercc.ExpressRouteCrossConnectionProperties != nil { + objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties + } + if ercc.ID != nil { + objectMap["id"] = ercc.ID + } + if ercc.Location != nil { + objectMap["location"] = ercc.Location + } + if ercc.Tags != nil { + objectMap["tags"] = ercc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. +func (ercc *ExpressRouteCrossConnection) 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 expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties + err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) + if err != nil { + return err + } + ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ercc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ercc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ercc.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. +type ExpressRouteCrossConnectionListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRouteCrossConnection resources. + Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult. +func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercclr.Value != nil { + objectMap["value"] = ercclr.Value + } + return json.Marshal(objectMap) +} + +// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of +// ExpressRouteCrossConnection values. +type ExpressRouteCrossConnectionListResultIterator struct { + i int + page ExpressRouteCrossConnectionListResultPage +} + +// 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 *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.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 *ExpressRouteCrossConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCrossConnectionListResultIterator) 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 ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { + 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 ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { + if !iter.page.NotDone() { + return ExpressRouteCrossConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type. +func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator { + return ExpressRouteCrossConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { + return ercclr.Value == nil || len(*ercclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool { + return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0 +} + +// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ercclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercclr.NextLink))) +} + +// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. +type ExpressRouteCrossConnectionListResultPage struct { + fn func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) + ercclr ExpressRouteCrossConnectionListResult +} + +// 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 *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteCrossConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { + return !page.ercclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { + return page.ercclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { + if page.ercclr.IsEmpty() { + return nil + } + return *page.ercclr.Value +} + +// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type. +func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage { + return ExpressRouteCrossConnectionListResultPage{ + fn: getNextPage, + ercclr: cur, + } +} + +// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. +type ExpressRouteCrossConnectionPeering struct { + autorest.Response `json:"-"` + // ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering. + *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. +func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { + objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties + } + if erccp.Name != nil { + objectMap["name"] = erccp.Name + } + if erccp.ID != nil { + objectMap["id"] = erccp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. +func (erccp *ExpressRouteCrossConnectionPeering) 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 expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties + err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) + if err != nil { + return err + } + erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erccp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erccp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erccp.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings +// that belong to an ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionPeeringList struct { + autorest.Response `json:"-"` + // Value - The peerings in an express route cross connection. + Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList. +func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccpl.Value != nil { + objectMap["value"] = erccpl.Value + } + return json.Marshal(objectMap) +} + +// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of +// ExpressRouteCrossConnectionPeering values. +type ExpressRouteCrossConnectionPeeringListIterator struct { + i int + page ExpressRouteCrossConnectionPeeringListPage +} + +// 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 *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.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 *ExpressRouteCrossConnectionPeeringListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCrossConnectionPeeringListIterator) 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 ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { + 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 ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { + if !iter.page.NotDone() { + return ExpressRouteCrossConnectionPeering{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type. +func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator { + return ExpressRouteCrossConnectionPeeringListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { + return erccpl.Value == nil || len(*erccpl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool { + return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0 +} + +// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) { + if !erccpl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erccpl.NextLink))) +} + +// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. +type ExpressRouteCrossConnectionPeeringListPage struct { + fn func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) + erccpl ExpressRouteCrossConnectionPeeringList +} + +// 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 *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.erccpl) + if err != nil { + return err + } + page.erccpl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteCrossConnectionPeeringListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { + return !page.erccpl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { + return page.erccpl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { + if page.erccpl.IsEmpty() { + return nil + } + return *page.erccpl.Value +} + +// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type. +func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage { + return ExpressRouteCrossConnectionPeeringListPage{ + fn: getNextPage, + erccpl: cur, + } +} + +// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering. +type ExpressRouteCrossConnectionPeeringProperties struct { + // PeeringType - The peering type. Possible values include: 'ExpressRoutePeeringTypeAzurePublicPeering', 'ExpressRoutePeeringTypeAzurePrivatePeering', 'ExpressRoutePeeringTypeMicrosoftPeering' + PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` + // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' + State ExpressRoutePeeringState `json:"state,omitempty"` + // AzureASN - READ-ONLY; The Azure ASN. + AzureASN *int32 `json:"azureASN,omitempty"` + // PeerASN - The peer ASN. + PeerASN *int64 `json:"peerASN,omitempty"` + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // PrimaryAzurePort - READ-ONLY; The primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - READ-ONLY; The secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // SharedKey - The shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // VlanID - The VLAN ID. + VlanID *int32 `json:"vlanId,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // LastModifiedBy - READ-ONLY; Who was the last to modify the peering. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // Ipv6PeeringConfig - The IPv6 peering configuration. + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties. +func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccpp.PeeringType != "" { + objectMap["peeringType"] = erccpp.PeeringType + } + if erccpp.State != "" { + objectMap["state"] = erccpp.State + } + if erccpp.PeerASN != nil { + objectMap["peerASN"] = erccpp.PeerASN + } + if erccpp.PrimaryPeerAddressPrefix != nil { + objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix + } + if erccpp.SecondaryPeerAddressPrefix != nil { + objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix + } + if erccpp.SharedKey != nil { + objectMap["sharedKey"] = erccpp.SharedKey + } + if erccpp.VlanID != nil { + objectMap["vlanId"] = erccpp.VlanID + } + if erccpp.MicrosoftPeeringConfig != nil { + objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig + } + if erccpp.GatewayManagerEtag != nil { + objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag + } + if erccpp.Ipv6PeeringConfig != nil { + objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig + } + return json.Marshal(objectMap) +} + +// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result. +func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erccp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent { + erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result. +func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionProperties struct { + // PrimaryAzurePort - READ-ONLY; The name of the primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - READ-ONLY; The name of the secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // STag - READ-ONLY; The identifier of the circuit traffic. + STag *int32 `json:"sTag,omitempty"` + // PeeringLocation - READ-ONLY; The peering location of the ExpressRoute circuit. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - READ-ONLY; The circuit bandwidth In Mbps. + BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` + // ExpressRouteCircuit - The ExpressRouteCircuit. + ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` + // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning' + ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` + // ServiceProviderNotes - Additional read only notes set by the connectivity provider. + ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties. +func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccp.ExpressRouteCircuit != nil { + objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit + } + if erccp.ServiceProviderProvisioningState != "" { + objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState + } + if erccp.ServiceProviderNotes != nil { + objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes + } + if erccp.Peerings != nil { + objectMap["peerings"] = erccp.Peerings + } + return json.Marshal(objectMap) +} + +// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCrossConnectionRoutesTableSummary struct { + // Neighbor - IP address of Neighbor router. + Neighbor *string `json:"neighbor,omitempty"` + // Asn - Autonomous system number. + Asn *int32 `json:"asn,omitempty"` + // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + UpDown *string `json:"upDown,omitempty"` + // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` +} + +// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result. +func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCrossConnectionsListArpTableFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result. +func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercatlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { + ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionsListRoutesTableFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result. +func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ercrtlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { + ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result. +func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erccrtslr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent { + erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with +// the Express Route Cross Connections. +type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { + autorest.Response `json:"-"` + // Value - A list of the routes table. + Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult. +func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccrtslr.Value != nil { + objectMap["value"] = erccrtslr.Value + } + return json.Marshal(objectMap) +} + +// ExpressRouteGateway expressRoute gateway resource. +type ExpressRouteGateway struct { + autorest.Response `json:"-"` + // ExpressRouteGatewayProperties - Properties of the express route gateway. + *ExpressRouteGatewayProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 ExpressRouteGateway. +func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erg.ExpressRouteGatewayProperties != nil { + objectMap["properties"] = erg.ExpressRouteGatewayProperties + } + if erg.ID != nil { + objectMap["id"] = erg.ID + } + if erg.Location != nil { + objectMap["location"] = erg.Location + } + if erg.Tags != nil { + objectMap["tags"] = erg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct. +func (erg *ExpressRouteGateway) 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 expressRouteGatewayProperties ExpressRouteGatewayProperties + err = json.Unmarshal(*v, &expressRouteGatewayProperties) + if err != nil { + return err + } + erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erg.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteGatewayList list of ExpressRoute gateways. +type ExpressRouteGatewayList struct { + autorest.Response `json:"-"` + // Value - List of ExpressRoute gateways. + Value *[]ExpressRouteGateway `json:"value,omitempty"` +} + +// ExpressRouteGatewayProperties expressRoute gateway resource properties. +type ExpressRouteGatewayProperties struct { + // AutoScaleConfiguration - Configuration for auto scaling. + AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` + // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway. + ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed. + VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties. +func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ergp.AutoScaleConfiguration != nil { + objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration + } + if ergp.VirtualHub != nil { + objectMap["virtualHub"] = ergp.VirtualHub + } + return json.Marshal(objectMap) +} + +// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling. +type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { + // Bounds - Minimum and maximum number of scale units to deploy. + Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` +} + +// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to +// deploy. +type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { + // Min - Minimum number of scale units deployed for ExpressRoute gateway. + Min *int32 `json:"min,omitempty"` + // Max - Maximum number of scale units deployed for ExpressRoute gateway. + Max *int32 `json:"max,omitempty"` +} + +// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result. +func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent { + erg, err = client.CreateOrUpdateResponder(erg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result. +func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteGatewaysUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRouteGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRouteGatewaysUpdateTagsFuture.Result. +func (future *ExpressRouteGatewaysUpdateTagsFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent { + erg, err = client.UpdateTagsResponder(erg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysUpdateTagsFuture", "Result", erg.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteLink expressRouteLink child resource definition. +type ExpressRouteLink struct { + autorest.Response `json:"-"` + // ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties. + *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` + // Name - Name of child port resource that is unique among child port resources of the parent. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteLink. +func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erl.ExpressRouteLinkPropertiesFormat != nil { + objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat + } + if erl.Name != nil { + objectMap["name"] = erl.Name + } + if erl.ID != nil { + objectMap["id"] = erl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct. +func (erl *ExpressRouteLink) 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 expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat + err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat) + if err != nil { + return err + } + erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erl.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erl.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erl.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call. +type ExpressRouteLinkListResult struct { + autorest.Response `json:"-"` + // Value - The list of ExpressRouteLink sub-resources. + Value *[]ExpressRouteLink `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values. +type ExpressRouteLinkListResultIterator struct { + i int + page ExpressRouteLinkListResultPage +} + +// 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 *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.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 *ExpressRouteLinkListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteLinkListResultIterator) 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 ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult { + 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 ExpressRouteLinkListResultIterator) Value() ExpressRouteLink { + if !iter.page.NotDone() { + return ExpressRouteLink{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteLinkListResultIterator type. +func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator { + return ExpressRouteLinkListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erllr ExpressRouteLinkListResult) IsEmpty() bool { + return erllr.Value == nil || len(*erllr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (erllr ExpressRouteLinkListResult) hasNextLink() bool { + return erllr.NextLink != nil && len(*erllr.NextLink) != 0 +} + +// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) { + if !erllr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erllr.NextLink))) +} + +// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values. +type ExpressRouteLinkListResultPage struct { + fn func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error) + erllr ExpressRouteLinkListResult +} + +// 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 *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.erllr) + if err != nil { + return err + } + page.erllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteLinkListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteLinkListResultPage) NotDone() bool { + return !page.erllr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult { + return page.erllr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink { + if page.erllr.IsEmpty() { + return nil + } + return *page.erllr.Value +} + +// Creates a new instance of the ExpressRouteLinkListResultPage type. +func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { + return ExpressRouteLinkListResultPage{ + fn: getNextPage, + erllr: cur, + } +} + +// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration. +type ExpressRouteLinkMacSecConfig struct { + // CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key. + CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"` + // CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key. + CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"` + // Cipher - Mac security cipher. Possible values include: 'ExpressRouteLinkMacSecCipherGcmAes256', 'ExpressRouteLinkMacSecCipherGcmAes128', 'ExpressRouteLinkMacSecCipherGcmAesXpn128', 'ExpressRouteLinkMacSecCipherGcmAesXpn256' + Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"` + // SciState - Sci mode enabled/disabled. Possible values include: 'ExpressRouteLinkMacSecSciStateDisabled', 'ExpressRouteLinkMacSecSciStateEnabled' + SciState ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"` +} + +// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources. +type ExpressRouteLinkPropertiesFormat struct { + // RouterName - READ-ONLY; Name of Azure router associated with physical port. + RouterName *string `json:"routerName,omitempty"` + // InterfaceName - READ-ONLY; Name of Azure router interface. + InterfaceName *string `json:"interfaceName,omitempty"` + // PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port. + PatchPanelID *string `json:"patchPanelId,omitempty"` + // RackID - READ-ONLY; Mapping of physical patch panel to rack. + RackID *string `json:"rackId,omitempty"` + // ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'ExpressRouteLinkConnectorTypeLC', 'ExpressRouteLinkConnectorTypeSC' + ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` + // AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled' + AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // MacSecConfig - MacSec configuration. + MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat. +func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erlpf.AdminState != "" { + objectMap["adminState"] = erlpf.AdminState + } + if erlpf.MacSecConfig != nil { + objectMap["macSecConfig"] = erlpf.MacSecConfig + } + return json.Marshal(objectMap) +} + +// ExpressRoutePort expressRoutePort resource definition. +type ExpressRoutePort struct { + autorest.Response `json:"-"` + // ExpressRoutePortPropertiesFormat - ExpressRoutePort properties. + *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Identity - The identity of ExpressRoutePort, if configured. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // ID - 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 ExpressRoutePort. +func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erp.ExpressRoutePortPropertiesFormat != nil { + objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat + } + if erp.Identity != nil { + objectMap["identity"] = erp.Identity + } + if erp.ID != nil { + objectMap["id"] = erp.ID + } + if erp.Location != nil { + objectMap["location"] = erp.Location + } + if erp.Tags != nil { + objectMap["tags"] = erp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct. +func (erp *ExpressRoutePort) 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 expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat + err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat) + if err != nil { + return err + } + erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erp.Etag = &etag + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + erp.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erp.Tags = tags + } + } + } + + return nil +} + +// ExpressRoutePortListResult response for ListExpressRoutePorts API service call. +type ExpressRoutePortListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRoutePort resources. + Value *[]ExpressRoutePort `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values. +type ExpressRoutePortListResultIterator struct { + i int + page ExpressRoutePortListResultPage +} + +// 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 *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.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 *ExpressRoutePortListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRoutePortListResultIterator) 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 ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult { + 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 ExpressRoutePortListResultIterator) Value() ExpressRoutePort { + if !iter.page.NotDone() { + return ExpressRoutePort{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRoutePortListResultIterator type. +func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator { + return ExpressRoutePortListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erplr ExpressRoutePortListResult) IsEmpty() bool { + return erplr.Value == nil || len(*erplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (erplr ExpressRoutePortListResult) hasNextLink() bool { + return erplr.NextLink != nil && len(*erplr.NextLink) != 0 +} + +// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) { + if !erplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erplr.NextLink))) +} + +// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values. +type ExpressRoutePortListResultPage struct { + fn func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error) + erplr ExpressRoutePortListResult +} + +// 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 *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.erplr) + if err != nil { + return err + } + page.erplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRoutePortListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRoutePortListResultPage) NotDone() bool { + return !page.erplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult { + return page.erplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort { + if page.erplr.IsEmpty() { + return nil + } + return *page.erplr.Value +} + +// Creates a new instance of the ExpressRoutePortListResultPage type. +func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { + return ExpressRoutePortListResultPage{ + fn: getNextPage, + erplr: cur, + } +} + +// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources. +type ExpressRoutePortPropertiesFormat struct { + // PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInGbps - Bandwidth of procured ports in Gbps. + BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"` + // ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths. + ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"` + // Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s). + Mtu *string `json:"mtu,omitempty"` + // Encapsulation - Encapsulation method on physical ports. Possible values include: 'ExpressRoutePortsEncapsulationDot1Q', 'ExpressRoutePortsEncapsulationQinQ' + Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` + // EtherType - READ-ONLY; Ether type of the physical port. + EtherType *string `json:"etherType,omitempty"` + // AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization. + AllocationDate *string `json:"allocationDate,omitempty"` + // Links - The set of physical links of the ExpressRoutePort resource. + Links *[]ExpressRouteLink `json:"links,omitempty"` + // Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. + Circuits *[]SubResource `json:"circuits,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat. +func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erppf.PeeringLocation != nil { + objectMap["peeringLocation"] = erppf.PeeringLocation + } + if erppf.BandwidthInGbps != nil { + objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps + } + if erppf.Encapsulation != "" { + objectMap["encapsulation"] = erppf.Encapsulation + } + if erppf.Links != nil { + objectMap["links"] = erppf.Links + } + return json.Marshal(objectMap) +} + +// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRoutePortsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRoutePortsClient) (ExpressRoutePort, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result. +func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { + erp, err = client.CreateOrUpdateResponder(erp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExpressRoutePortsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRoutePortsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRoutePortsDeleteFuture.Result. +func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource. +type ExpressRoutePortsLocation struct { + autorest.Response `json:"-"` + // ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties. + *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` + // ID - 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 ExpressRoutePortsLocation. +func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erpl.ExpressRoutePortsLocationPropertiesFormat != nil { + objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat + } + if erpl.ID != nil { + objectMap["id"] = erpl.ID + } + if erpl.Location != nil { + objectMap["location"] = erpl.Location + } + if erpl.Tags != nil { + objectMap["tags"] = erpl.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct. +func (erpl *ExpressRoutePortsLocation) 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 expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat + err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat) + if err != nil { + return err + } + erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erpl.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erpl.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erpl.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erpl.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erpl.Tags = tags + } + } + } + + return nil +} + +// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths. +type ExpressRoutePortsLocationBandwidths struct { + // OfferName - READ-ONLY; Bandwidth descriptive name. + OfferName *string `json:"offerName,omitempty"` + // ValueInGbps - READ-ONLY; Bandwidth value in Gbps. + ValueInGbps *int32 `json:"valueInGbps,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths. +func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call. +type ExpressRoutePortsLocationListResult struct { + autorest.Response `json:"-"` + // Value - The list of all ExpressRoutePort peering locations. + Value *[]ExpressRoutePortsLocation `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of +// ExpressRoutePortsLocation values. +type ExpressRoutePortsLocationListResultIterator struct { + i int + page ExpressRoutePortsLocationListResultPage +} + +// 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 *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.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 *ExpressRoutePortsLocationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRoutePortsLocationListResultIterator) 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 ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult { + 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 ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation { + if !iter.page.NotDone() { + return ExpressRoutePortsLocation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type. +func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator { + return ExpressRoutePortsLocationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool { + return erpllr.Value == nil || len(*erpllr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool { + return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0 +} + +// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !erpllr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erpllr.NextLink))) +} + +// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values. +type ExpressRoutePortsLocationListResultPage struct { + fn func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error) + erpllr ExpressRoutePortsLocationListResult +} + +// 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 *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.erpllr) + if err != nil { + return err + } + page.erpllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRoutePortsLocationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRoutePortsLocationListResultPage) NotDone() bool { + return !page.erpllr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult { + return page.erpllr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation { + if page.erpllr.IsEmpty() { + return nil + } + return *page.erpllr.Value +} + +// Creates a new instance of the ExpressRoutePortsLocationListResultPage type. +func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage { + return ExpressRoutePortsLocationListResultPage{ + fn: getNextPage, + erpllr: cur, + } +} + +// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location +// resources. +type ExpressRoutePortsLocationPropertiesFormat struct { + // Address - READ-ONLY; Address of peering location. + Address *string `json:"address,omitempty"` + // Contact - READ-ONLY; Contact details of peering locations. + Contact *string `json:"contact,omitempty"` + // AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths. + AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat. +func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erplpf.AvailableBandwidths != nil { + objectMap["availableBandwidths"] = erplpf.AvailableBandwidths + } + return json.Marshal(objectMap) +} + +// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. +type ExpressRouteServiceProvider struct { + // ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider. + *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` + // ID - 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 ExpressRouteServiceProvider. +func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { + objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat + } + if ersp.ID != nil { + objectMap["id"] = ersp.ID + } + if ersp.Location != nil { + objectMap["location"] = ersp.Location + } + if ersp.Tags != nil { + objectMap["tags"] = ersp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. +func (ersp *ExpressRouteServiceProvider) 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 expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat + err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) + if err != nil { + return err + } + ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ersp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ersp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ersp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ersp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ersp.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider +// resources. +type ExpressRouteServiceProviderBandwidthsOffered struct { + // OfferName - The OfferName. + OfferName *string `json:"offerName,omitempty"` + // ValueInMbps - The ValueInMbps. + ValueInMbps *int32 `json:"valueInMbps,omitempty"` +} + +// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. +type ExpressRouteServiceProviderListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRouteResourceProvider resources. + Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of +// ExpressRouteServiceProvider values. +type ExpressRouteServiceProviderListResultIterator struct { + i int + page ExpressRouteServiceProviderListResultPage +} + +// 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 *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.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 *ExpressRouteServiceProviderListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteServiceProviderListResultIterator) 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 ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { + 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 ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { + if !iter.page.NotDone() { + return ExpressRouteServiceProvider{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. +func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { + return ExpressRouteServiceProviderListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { + return ersplr.Value == nil || len(*ersplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool { + return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0 +} + +// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ersplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ersplr.NextLink))) +} + +// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. +type ExpressRouteServiceProviderListResultPage struct { + fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) + ersplr ExpressRouteServiceProviderListResult +} + +// 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 *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ersplr) + if err != nil { + return err + } + page.ersplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExpressRouteServiceProviderListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { + return !page.ersplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { + return page.ersplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { + if page.ersplr.IsEmpty() { + return nil + } + return *page.ersplr.Value +} + +// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. +func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { + return ExpressRouteServiceProviderListResultPage{ + fn: getNextPage, + ersplr: cur, + } +} + +// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. +type ExpressRouteServiceProviderPropertiesFormat struct { + // PeeringLocations - A list of peering locations. + PeeringLocations *[]string `json:"peeringLocations,omitempty"` + // BandwidthsOffered - A list of bandwidths offered. + BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat. +func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ersppf.PeeringLocations != nil { + objectMap["peeringLocations"] = ersppf.PeeringLocations + } + if ersppf.BandwidthsOffered != nil { + objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered + } + return json.Marshal(objectMap) +} + +// ExtendedLocation extendedLocation complex type. +type ExtendedLocation struct { + // Name - The name of the extended location. + Name *string `json:"name,omitempty"` + // Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone' + Type ExtendedLocationTypes `json:"type,omitempty"` +} + +// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type FirewallPoliciesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(FirewallPoliciesClient) (FirewallPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result. +func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + fp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent { + fp, err = client.CreateOrUpdateResponder(fp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request") + } + } + return +} + +// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type FirewallPoliciesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(FirewallPoliciesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for FirewallPoliciesDeleteFuture.Result. +func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// FirewallPolicy firewallPolicy Resource. +type FirewallPolicy struct { + autorest.Response `json:"-"` + // FirewallPolicyPropertiesFormat - Properties of the firewall policy. + *FirewallPolicyPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Identity - The identity of the firewall policy. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // ID - 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 FirewallPolicy. +func (fp FirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fp.FirewallPolicyPropertiesFormat != nil { + objectMap["properties"] = fp.FirewallPolicyPropertiesFormat + } + if fp.Identity != nil { + objectMap["identity"] = fp.Identity + } + if fp.ID != nil { + objectMap["id"] = fp.ID + } + if fp.Location != nil { + objectMap["location"] = fp.Location + } + if fp.Tags != nil { + objectMap["tags"] = fp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct. +func (fp *FirewallPolicy) 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 firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat + err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat) + if err != nil { + return err + } + fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + fp.Etag = &etag + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + fp.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + fp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + fp.Tags = tags + } + } + } + + return nil +} + +// FirewallPolicyCertificateAuthority trusted Root certificates properties for tls. +type FirewallPolicyCertificateAuthority struct { + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` + // Name - Name of the CA certificate. + Name *string `json:"name,omitempty"` +} + +// FirewallPolicyFilterRuleCollection firewall Policy Filter Rule Collection. +type FirewallPolicyFilterRuleCollection struct { + // Action - The action type of a Filter rule collection. + Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"` + // Rules - List of rules included in a rule collection. + Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"` + // Name - The name of the rule collection. + Name *string `json:"name,omitempty"` + // Priority - Priority of the Firewall Policy Rule Collection resource. + Priority *int32 `json:"priority,omitempty"` + // RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection' + RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyFilterRuleCollection. +func (fpfrc FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { + fpfrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyFilterRuleCollection + objectMap := make(map[string]interface{}) + if fpfrc.Action != nil { + objectMap["action"] = fpfrc.Action + } + if fpfrc.Rules != nil { + objectMap["rules"] = fpfrc.Rules + } + if fpfrc.Name != nil { + objectMap["name"] = fpfrc.Name + } + if fpfrc.Priority != nil { + objectMap["priority"] = fpfrc.Priority + } + if fpfrc.RuleCollectionType != "" { + objectMap["ruleCollectionType"] = fpfrc.RuleCollectionType + } + return json.Marshal(objectMap) +} + +// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection. +func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) { + return nil, false +} + +// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection. +func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) { + return &fpfrc, true +} + +// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection. +func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection. +func (fpfrc FirewallPolicyFilterRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) { + return &fpfrc, true +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRuleCollection struct. +func (fpfrc *FirewallPolicyFilterRuleCollection) 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 "action": + if v != nil { + var action FirewallPolicyFilterRuleCollectionAction + err = json.Unmarshal(*v, &action) + if err != nil { + return err + } + fpfrc.Action = &action + } + case "rules": + if v != nil { + rules, err := unmarshalBasicFirewallPolicyRuleArray(*v) + if err != nil { + return err + } + fpfrc.Rules = &rules + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fpfrc.Name = &name + } + case "priority": + if v != nil { + var priority int32 + err = json.Unmarshal(*v, &priority) + if err != nil { + return err + } + fpfrc.Priority = &priority + } + case "ruleCollectionType": + if v != nil { + var ruleCollectionType RuleCollectionType + err = json.Unmarshal(*v, &ruleCollectionType) + if err != nil { + return err + } + fpfrc.RuleCollectionType = ruleCollectionType + } + } + } + + return nil +} + +// FirewallPolicyFilterRuleCollectionAction properties of the FirewallPolicyFilterRuleCollectionAction. +type FirewallPolicyFilterRuleCollectionAction struct { + // Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleCollectionActionTypeAllow', 'FirewallPolicyFilterRuleCollectionActionTypeDeny' + Type FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"` +} + +// FirewallPolicyInsights firewall Policy Insights. +type FirewallPolicyInsights struct { + // IsEnabled - A flag to indicate if the insights are enabled on the policy. + IsEnabled *bool `json:"isEnabled,omitempty"` + // RetentionDays - Number of days the insights should be enabled on the policy. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // LogAnalyticsResources - Workspaces needed to configure the Firewall Policy Insights. + LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"` +} + +// FirewallPolicyIntrusionDetection configuration for intrusion detection mode and rules. +type FirewallPolicyIntrusionDetection struct { + // Mode - Intrusion detection general state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny' + Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` + // Configuration - Intrusion detection configuration properties. + Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"` +} + +// FirewallPolicyIntrusionDetectionBypassTrafficSpecifications intrusion detection bypass traffic +// specification. +type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct { + // Name - Name of the bypass traffic rule. + Name *string `json:"name,omitempty"` + // Description - Description of the bypass traffic rule. + Description *string `json:"description,omitempty"` + // Protocol - The rule bypass protocol. Possible values include: 'FirewallPolicyIntrusionDetectionProtocolTCP', 'FirewallPolicyIntrusionDetectionProtocolUDP', 'FirewallPolicyIntrusionDetectionProtocolICMP', 'FirewallPolicyIntrusionDetectionProtocolANY' + Protocol FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"` + // SourceAddresses - List of source IP addresses or ranges for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses or ranges for this rule. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // DestinationPorts - List of destination ports or ranges. + DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` + // DestinationIPGroups - List of destination IpGroups for this rule. + DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` +} + +// FirewallPolicyIntrusionDetectionConfiguration the operation for configuring intrusion detection. +type FirewallPolicyIntrusionDetectionConfiguration struct { + // SignatureOverrides - List of specific signatures states. + SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"` + // BypassTrafficSettings - List of rules for traffic to bypass. + BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"` +} + +// FirewallPolicyIntrusionDetectionSignatureSpecification intrusion detection signatures specification +// states. +type FirewallPolicyIntrusionDetectionSignatureSpecification struct { + // ID - Signature id. + ID *string `json:"id,omitempty"` + // Mode - The signature state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny' + Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` +} + +// FirewallPolicyListResult response for ListFirewallPolicies API service call. +type FirewallPolicyListResult struct { + autorest.Response `json:"-"` + // Value - List of Firewall Policies in a resource group. + Value *[]FirewallPolicy `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values. +type FirewallPolicyListResultIterator struct { + i int + page FirewallPolicyListResultPage +} + +// 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 *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.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 *FirewallPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter FirewallPolicyListResultIterator) 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 FirewallPolicyListResultIterator) Response() FirewallPolicyListResult { + 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 FirewallPolicyListResultIterator) Value() FirewallPolicy { + if !iter.page.NotDone() { + return FirewallPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the FirewallPolicyListResultIterator type. +func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator { + return FirewallPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (fplr FirewallPolicyListResult) IsEmpty() bool { + return fplr.Value == nil || len(*fplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (fplr FirewallPolicyListResult) hasNextLink() bool { + return fplr.NextLink != nil && len(*fplr.NextLink) != 0 +} + +// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !fplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(fplr.NextLink))) +} + +// FirewallPolicyListResultPage contains a page of FirewallPolicy values. +type FirewallPolicyListResultPage struct { + fn func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error) + fplr FirewallPolicyListResult +} + +// 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 *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.fplr) + if err != nil { + return err + } + page.fplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *FirewallPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page FirewallPolicyListResultPage) NotDone() bool { + return !page.fplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult { + return page.fplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page FirewallPolicyListResultPage) Values() []FirewallPolicy { + if page.fplr.IsEmpty() { + return nil + } + return *page.fplr.Value +} + +// Creates a new instance of the FirewallPolicyListResultPage type. +func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage { + return FirewallPolicyListResultPage{ + fn: getNextPage, + fplr: cur, + } +} + +// FirewallPolicyLogAnalyticsResources log Analytics Resources for Firewall Policy Insights. +type FirewallPolicyLogAnalyticsResources struct { + // Workspaces - List of workspaces for Firewall Policy Insights. + Workspaces *[]FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"` + // DefaultWorkspaceID - The default workspace Id for Firewall Policy Insights. + DefaultWorkspaceID *SubResource `json:"defaultWorkspaceId,omitempty"` +} + +// FirewallPolicyLogAnalyticsWorkspace log Analytics Workspace for Firewall Policy Insights. +type FirewallPolicyLogAnalyticsWorkspace struct { + // Region - Region to configure the Workspace. + Region *string `json:"region,omitempty"` + // WorkspaceID - The workspace Id for Firewall Policy Insights. + WorkspaceID *SubResource `json:"workspaceId,omitempty"` +} + +// FirewallPolicyNatRuleCollection firewall Policy NAT Rule Collection. +type FirewallPolicyNatRuleCollection struct { + // Action - The action type of a Nat rule collection. + Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"` + // Rules - List of rules included in a rule collection. + Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"` + // Name - The name of the rule collection. + Name *string `json:"name,omitempty"` + // Priority - Priority of the Firewall Policy Rule Collection resource. + Priority *int32 `json:"priority,omitempty"` + // RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection' + RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyNatRuleCollection. +func (fpnrc FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { + fpnrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyNatRuleCollection + objectMap := make(map[string]interface{}) + if fpnrc.Action != nil { + objectMap["action"] = fpnrc.Action + } + if fpnrc.Rules != nil { + objectMap["rules"] = fpnrc.Rules + } + if fpnrc.Name != nil { + objectMap["name"] = fpnrc.Name + } + if fpnrc.Priority != nil { + objectMap["priority"] = fpnrc.Priority + } + if fpnrc.RuleCollectionType != "" { + objectMap["ruleCollectionType"] = fpnrc.RuleCollectionType + } + return json.Marshal(objectMap) +} + +// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection. +func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) { + return &fpnrc, true +} + +// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection. +func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) { + return nil, false +} + +// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection. +func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection. +func (fpnrc FirewallPolicyNatRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) { + return &fpnrc, true +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRuleCollection struct. +func (fpnrc *FirewallPolicyNatRuleCollection) 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 "action": + if v != nil { + var action FirewallPolicyNatRuleCollectionAction + err = json.Unmarshal(*v, &action) + if err != nil { + return err + } + fpnrc.Action = &action + } + case "rules": + if v != nil { + rules, err := unmarshalBasicFirewallPolicyRuleArray(*v) + if err != nil { + return err + } + fpnrc.Rules = &rules + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fpnrc.Name = &name + } + case "priority": + if v != nil { + var priority int32 + err = json.Unmarshal(*v, &priority) + if err != nil { + return err + } + fpnrc.Priority = &priority + } + case "ruleCollectionType": + if v != nil { + var ruleCollectionType RuleCollectionType + err = json.Unmarshal(*v, &ruleCollectionType) + if err != nil { + return err + } + fpnrc.RuleCollectionType = ruleCollectionType + } + } + } + + return nil +} + +// FirewallPolicyNatRuleCollectionAction properties of the FirewallPolicyNatRuleCollectionAction. +type FirewallPolicyNatRuleCollectionAction struct { + // Type - The type of action. Possible values include: 'FirewallPolicyNatRuleCollectionActionTypeDNAT' + Type FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"` +} + +// FirewallPolicyPropertiesFormat firewall Policy definition. +type FirewallPolicyPropertiesFormat struct { + // RuleCollectionGroups - READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups. + RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // BasePolicy - The parent firewall policy from which rules are inherited. + BasePolicy *SubResource `json:"basePolicy,omitempty"` + // Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with. + Firewalls *[]SubResource `json:"firewalls,omitempty"` + // ChildPolicies - READ-ONLY; List of references to Child Firewall Policies. + ChildPolicies *[]SubResource `json:"childPolicies,omitempty"` + // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff' + ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` + // ThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy. + ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"` + // Insights - Insights on Firewall Policy. + Insights *FirewallPolicyInsights `json:"insights,omitempty"` + // Snat - The private IP addresses/IP ranges to which traffic will not be SNAT. + Snat *FirewallPolicySNAT `json:"snat,omitempty"` + // SQL - SQL Settings definition. + SQL *FirewallPolicySQL `json:"sql,omitempty"` + // DNSSettings - DNS Proxy Settings definition. + DNSSettings *DNSSettings `json:"dnsSettings,omitempty"` + // ExplicitProxySettings - Explicit Proxy Settings definition. + ExplicitProxySettings *ExplicitProxySettings `json:"explicitProxySettings,omitempty"` + // IntrusionDetection - The configuration for Intrusion detection. + IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"` + // TransportSecurity - TLS Configuration definition. + TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"` + // Sku - The Firewall Policy SKU. + Sku *FirewallPolicySku `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat. +func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fppf.BasePolicy != nil { + objectMap["basePolicy"] = fppf.BasePolicy + } + if fppf.ThreatIntelMode != "" { + objectMap["threatIntelMode"] = fppf.ThreatIntelMode + } + if fppf.ThreatIntelWhitelist != nil { + objectMap["threatIntelWhitelist"] = fppf.ThreatIntelWhitelist + } + if fppf.Insights != nil { + objectMap["insights"] = fppf.Insights + } + if fppf.Snat != nil { + objectMap["snat"] = fppf.Snat + } + if fppf.SQL != nil { + objectMap["sql"] = fppf.SQL + } + if fppf.DNSSettings != nil { + objectMap["dnsSettings"] = fppf.DNSSettings + } + if fppf.ExplicitProxySettings != nil { + objectMap["explicitProxySettings"] = fppf.ExplicitProxySettings + } + if fppf.IntrusionDetection != nil { + objectMap["intrusionDetection"] = fppf.IntrusionDetection + } + if fppf.TransportSecurity != nil { + objectMap["transportSecurity"] = fppf.TransportSecurity + } + if fppf.Sku != nil { + objectMap["sku"] = fppf.Sku + } + return json.Marshal(objectMap) +} + +// BasicFirewallPolicyRule properties of a rule. +type BasicFirewallPolicyRule interface { + AsApplicationRule() (*ApplicationRule, bool) + AsNatRule() (*NatRule, bool) + AsRule() (*Rule, bool) + AsFirewallPolicyRule() (*FirewallPolicyRule, bool) +} + +// FirewallPolicyRule properties of a rule. +type FirewallPolicyRule struct { + // Name - Name of the rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule' + RuleType RuleType `json:"ruleType,omitempty"` +} + +func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ruleType"] { + case string(RuleTypeApplicationRule): + var ar ApplicationRule + err := json.Unmarshal(body, &ar) + return ar, err + case string(RuleTypeNatRule): + var nr NatRule + err := json.Unmarshal(body, &nr) + return nr, err + case string(RuleTypeNetworkRule): + var r Rule + err := json.Unmarshal(body, &r) + return r, err + default: + var fpr FirewallPolicyRule + err := json.Unmarshal(body, &fpr) + return fpr, err + } +} +func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fprArray := make([]BasicFirewallPolicyRule, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage) + if err != nil { + return nil, err + } + fprArray[index] = fpr + } + return fprArray, nil +} + +// MarshalJSON is the custom marshaler for FirewallPolicyRule. +func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) { + fpr.RuleType = RuleTypeFirewallPolicyRule + objectMap := make(map[string]interface{}) + if fpr.Name != nil { + objectMap["name"] = fpr.Name + } + if fpr.Description != nil { + objectMap["description"] = fpr.Description + } + if fpr.RuleType != "" { + objectMap["ruleType"] = fpr.RuleType + } + return json.Marshal(objectMap) +} + +// AsApplicationRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsApplicationRule() (*ApplicationRule, bool) { + return nil, false +} + +// AsNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsNatRule() (*NatRule, bool) { + return nil, false +} + +// AsRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsRule() (*Rule, bool) { + return nil, false +} + +// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { + return &fpr, true +} + +// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { + return &fpr, true +} + +// FirewallPolicyRuleApplicationProtocol properties of the application rule protocol. +type FirewallPolicyRuleApplicationProtocol struct { + // ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleApplicationProtocolTypeHTTP', 'FirewallPolicyRuleApplicationProtocolTypeHTTPS' + ProtocolType FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"` + // Port - Port number for the protocol, cannot be greater than 64000. + Port *int32 `json:"port,omitempty"` +} + +// BasicFirewallPolicyRuleCollection properties of the rule collection. +type BasicFirewallPolicyRuleCollection interface { + AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) + AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) + AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) +} + +// FirewallPolicyRuleCollection properties of the rule collection. +type FirewallPolicyRuleCollection struct { + // Name - The name of the rule collection. + Name *string `json:"name,omitempty"` + // Priority - Priority of the Firewall Policy Rule Collection resource. + Priority *int32 `json:"priority,omitempty"` + // RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection' + RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"` +} + +func unmarshalBasicFirewallPolicyRuleCollection(body []byte) (BasicFirewallPolicyRuleCollection, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ruleCollectionType"] { + case string(RuleCollectionTypeFirewallPolicyNatRuleCollection): + var fpnrc FirewallPolicyNatRuleCollection + err := json.Unmarshal(body, &fpnrc) + return fpnrc, err + case string(RuleCollectionTypeFirewallPolicyFilterRuleCollection): + var fpfrc FirewallPolicyFilterRuleCollection + err := json.Unmarshal(body, &fpfrc) + return fpfrc, err + default: + var fprc FirewallPolicyRuleCollection + err := json.Unmarshal(body, &fprc) + return fprc, err + } +} +func unmarshalBasicFirewallPolicyRuleCollectionArray(body []byte) ([]BasicFirewallPolicyRuleCollection, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fprcArray := make([]BasicFirewallPolicyRuleCollection, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fprc, err := unmarshalBasicFirewallPolicyRuleCollection(*rawMessage) + if err != nil { + return nil, err + } + fprcArray[index] = fprc + } + return fprcArray, nil +} + +// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollection. +func (fprc FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) { + fprc.RuleCollectionType = RuleCollectionTypeFirewallPolicyRuleCollection + objectMap := make(map[string]interface{}) + if fprc.Name != nil { + objectMap["name"] = fprc.Name + } + if fprc.Priority != nil { + objectMap["priority"] = fprc.Priority + } + if fprc.RuleCollectionType != "" { + objectMap["ruleCollectionType"] = fprc.RuleCollectionType + } + return json.Marshal(objectMap) +} + +// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection. +func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) { + return nil, false +} + +// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection. +func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) { + return nil, false +} + +// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection. +func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) { + return &fprc, true +} + +// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection. +func (fprc FirewallPolicyRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) { + return &fprc, true +} + +// FirewallPolicyRuleCollectionGroup rule Collection Group resource. +type FirewallPolicyRuleCollectionGroup struct { + autorest.Response `json:"-"` + // FirewallPolicyRuleCollectionGroupProperties - The properties of the firewall policy rule collection group. + *FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Rule Group type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroup. +func (fprcg FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fprcg.FirewallPolicyRuleCollectionGroupProperties != nil { + objectMap["properties"] = fprcg.FirewallPolicyRuleCollectionGroupProperties + } + if fprcg.Name != nil { + objectMap["name"] = fprcg.Name + } + if fprcg.ID != nil { + objectMap["id"] = fprcg.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroup struct. +func (fprcg *FirewallPolicyRuleCollectionGroup) 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 firewallPolicyRuleCollectionGroupProperties FirewallPolicyRuleCollectionGroupProperties + err = json.Unmarshal(*v, &firewallPolicyRuleCollectionGroupProperties) + if err != nil { + return err + } + fprcg.FirewallPolicyRuleCollectionGroupProperties = &firewallPolicyRuleCollectionGroupProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fprcg.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + fprcg.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fprcg.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fprcg.ID = &ID + } + } + } + + return nil +} + +// FirewallPolicyRuleCollectionGroupListResult response for ListFirewallPolicyRuleCollectionGroups API +// service call. +type FirewallPolicyRuleCollectionGroupListResult struct { + autorest.Response `json:"-"` + // Value - List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. + Value *[]FirewallPolicyRuleCollectionGroup `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// FirewallPolicyRuleCollectionGroupListResultIterator provides access to a complete listing of +// FirewallPolicyRuleCollectionGroup values. +type FirewallPolicyRuleCollectionGroupListResultIterator struct { + i int + page FirewallPolicyRuleCollectionGroupListResultPage +} + +// 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 *FirewallPolicyRuleCollectionGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultIterator.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 *FirewallPolicyRuleCollectionGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter FirewallPolicyRuleCollectionGroupListResultIterator) 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 FirewallPolicyRuleCollectionGroupListResultIterator) Response() FirewallPolicyRuleCollectionGroupListResult { + 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 FirewallPolicyRuleCollectionGroupListResultIterator) Value() FirewallPolicyRuleCollectionGroup { + if !iter.page.NotDone() { + return FirewallPolicyRuleCollectionGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultIterator type. +func NewFirewallPolicyRuleCollectionGroupListResultIterator(page FirewallPolicyRuleCollectionGroupListResultPage) FirewallPolicyRuleCollectionGroupListResultIterator { + return FirewallPolicyRuleCollectionGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (fprcglr FirewallPolicyRuleCollectionGroupListResult) IsEmpty() bool { + return fprcglr.Value == nil || len(*fprcglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (fprcglr FirewallPolicyRuleCollectionGroupListResult) hasNextLink() bool { + return fprcglr.NextLink != nil && len(*fprcglr.NextLink) != 0 +} + +// firewallPolicyRuleCollectionGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (fprcglr FirewallPolicyRuleCollectionGroupListResult) firewallPolicyRuleCollectionGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !fprcglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(fprcglr.NextLink))) +} + +// FirewallPolicyRuleCollectionGroupListResultPage contains a page of FirewallPolicyRuleCollectionGroup +// values. +type FirewallPolicyRuleCollectionGroupListResultPage struct { + fn func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error) + fprcglr FirewallPolicyRuleCollectionGroupListResult +} + +// 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 *FirewallPolicyRuleCollectionGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.fprcglr) + if err != nil { + return err + } + page.fprcglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *FirewallPolicyRuleCollectionGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page FirewallPolicyRuleCollectionGroupListResultPage) NotDone() bool { + return !page.fprcglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page FirewallPolicyRuleCollectionGroupListResultPage) Response() FirewallPolicyRuleCollectionGroupListResult { + return page.fprcglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page FirewallPolicyRuleCollectionGroupListResultPage) Values() []FirewallPolicyRuleCollectionGroup { + if page.fprcglr.IsEmpty() { + return nil + } + return *page.fprcglr.Value +} + +// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultPage type. +func NewFirewallPolicyRuleCollectionGroupListResultPage(cur FirewallPolicyRuleCollectionGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage { + return FirewallPolicyRuleCollectionGroupListResultPage{ + fn: getNextPage, + fprcglr: cur, + } +} + +// FirewallPolicyRuleCollectionGroupProperties properties of the rule collection group. +type FirewallPolicyRuleCollectionGroupProperties struct { + // Priority - Priority of the Firewall Policy Rule Collection Group resource. + Priority *int32 `json:"priority,omitempty"` + // RuleCollections - Group of Firewall Policy rule collections. + RuleCollections *[]BasicFirewallPolicyRuleCollection `json:"ruleCollections,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule collection group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroupProperties. +func (fprcgp FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fprcgp.Priority != nil { + objectMap["priority"] = fprcgp.Priority + } + if fprcgp.RuleCollections != nil { + objectMap["ruleCollections"] = fprcgp.RuleCollections + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroupProperties struct. +func (fprcgp *FirewallPolicyRuleCollectionGroupProperties) 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 "priority": + if v != nil { + var priority int32 + err = json.Unmarshal(*v, &priority) + if err != nil { + return err + } + fprcgp.Priority = &priority + } + case "ruleCollections": + if v != nil { + ruleCollections, err := unmarshalBasicFirewallPolicyRuleCollectionArray(*v) + if err != nil { + return err + } + fprcgp.RuleCollections = &ruleCollections + } + case "provisioningState": + if v != nil { + var provisioningState ProvisioningState + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + fprcgp.ProvisioningState = provisioningState + } + } + } + + return nil +} + +// FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(FirewallPolicyRuleCollectionGroupsClient) (FirewallPolicyRuleCollectionGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture.Result. +func (future *FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleCollectionGroupsClient) (fprcg FirewallPolicyRuleCollectionGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + fprcg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fprcg.Response.Response, err = future.GetResult(sender); err == nil && fprcg.Response.Response.StatusCode != http.StatusNoContent { + fprcg, err = client.CreateOrUpdateResponder(fprcg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture", "Result", fprcg.Response.Response, "Failure responding to request") + } + } + return +} + +// FirewallPolicyRuleCollectionGroupsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type FirewallPolicyRuleCollectionGroupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(FirewallPolicyRuleCollectionGroupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for FirewallPolicyRuleCollectionGroupsDeleteFuture.Result. +func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) result(client FirewallPolicyRuleCollectionGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleCollectionGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// FirewallPolicySku SKU of Firewall policy. +type FirewallPolicySku struct { + // Tier - Tier of Firewall Policy. Possible values include: 'FirewallPolicySkuTierStandard', 'FirewallPolicySkuTierPremium' + Tier FirewallPolicySkuTier `json:"tier,omitempty"` +} + +// FirewallPolicySNAT the private IP addresses/IP ranges to which traffic will not be SNAT. +type FirewallPolicySNAT struct { + // PrivateRanges - List of private IP addresses/IP address ranges to not be SNAT. + PrivateRanges *[]string `json:"privateRanges,omitempty"` +} + +// FirewallPolicySQL SQL Settings in Firewall Policy. +type FirewallPolicySQL struct { + // AllowSQLRedirect - A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. + AllowSQLRedirect *bool `json:"allowSqlRedirect,omitempty"` +} + +// FirewallPolicyThreatIntelWhitelist threatIntel Whitelist for Firewall Policy. +type FirewallPolicyThreatIntelWhitelist struct { + // IPAddresses - List of IP addresses for the ThreatIntel Whitelist. + IPAddresses *[]string `json:"ipAddresses,omitempty"` + // Fqdns - List of FQDNs for the ThreatIntel Whitelist. + Fqdns *[]string `json:"fqdns,omitempty"` +} + +// FirewallPolicyTransportSecurity configuration needed to perform TLS termination & initiation. +type FirewallPolicyTransportSecurity struct { + // CertificateAuthority - The CA used for intermediate CA generation. + CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"` +} + +// FlowLog a flow log resource. +type FlowLog struct { + autorest.Response `json:"-"` + // FlowLogPropertiesFormat - Properties of the flow log. + *FlowLogPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 FlowLog. +func (fl FlowLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fl.FlowLogPropertiesFormat != nil { + objectMap["properties"] = fl.FlowLogPropertiesFormat + } + if fl.ID != nil { + objectMap["id"] = fl.ID + } + if fl.Location != nil { + objectMap["location"] = fl.Location + } + if fl.Tags != nil { + objectMap["tags"] = fl.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FlowLog struct. +func (fl *FlowLog) 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 flowLogPropertiesFormat FlowLogPropertiesFormat + err = json.Unmarshal(*v, &flowLogPropertiesFormat) + if err != nil { + return err + } + fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + fl.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fl.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fl.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fl.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + fl.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + fl.Tags = tags + } + } + } + + return nil +} + +// FlowLogFormatParameters parameters that define the flow log format. +type FlowLogFormatParameters struct { + // Type - The file type of flow log. Possible values include: 'FlowLogFormatTypeJSON' + Type FlowLogFormatType `json:"type,omitempty"` + // Version - The version (revision) of the flow log. + Version *int32 `json:"version,omitempty"` +} + +// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) . +type FlowLogInformation struct { + autorest.Response `json:"-"` + // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) . + TargetResourceID *string `json:"targetResourceId,omitempty"` + // FlowLogProperties - Properties of the flow log. + *FlowLogProperties `json:"properties,omitempty"` + // FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. + FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` +} + +// MarshalJSON is the custom marshaler for FlowLogInformation. +func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fli.TargetResourceID != nil { + objectMap["targetResourceId"] = fli.TargetResourceID + } + if fli.FlowLogProperties != nil { + objectMap["properties"] = fli.FlowLogProperties + } + if fli.FlowAnalyticsConfiguration != nil { + objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. +func (fli *FlowLogInformation) 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 "targetResourceId": + if v != nil { + var targetResourceID string + err = json.Unmarshal(*v, &targetResourceID) + if err != nil { + return err + } + fli.TargetResourceID = &targetResourceID + } + case "properties": + if v != nil { + var flowLogProperties FlowLogProperties + err = json.Unmarshal(*v, &flowLogProperties) + if err != nil { + return err + } + fli.FlowLogProperties = &flowLogProperties + } + case "flowAnalyticsConfiguration": + if v != nil { + var flowAnalyticsConfiguration TrafficAnalyticsProperties + err = json.Unmarshal(*v, &flowAnalyticsConfiguration) + if err != nil { + return err + } + fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration + } + } + } + + return nil +} + +// FlowLogListResult list of flow logs. +type FlowLogListResult struct { + autorest.Response `json:"-"` + // Value - Information about flow log resource. + Value *[]FlowLog `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for FlowLogListResult. +func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fllr.Value != nil { + objectMap["value"] = fllr.Value + } + return json.Marshal(objectMap) +} + +// FlowLogListResultIterator provides access to a complete listing of FlowLog values. +type FlowLogListResultIterator struct { + i int + page FlowLogListResultPage +} + +// 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 *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.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 *FlowLogListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter FlowLogListResultIterator) 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 FlowLogListResultIterator) Response() FlowLogListResult { + 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 FlowLogListResultIterator) Value() FlowLog { + if !iter.page.NotDone() { + return FlowLog{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the FlowLogListResultIterator type. +func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator { + return FlowLogListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (fllr FlowLogListResult) IsEmpty() bool { + return fllr.Value == nil || len(*fllr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (fllr FlowLogListResult) hasNextLink() bool { + return fllr.NextLink != nil && len(*fllr.NextLink) != 0 +} + +// flowLogListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) { + if !fllr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(fllr.NextLink))) +} + +// FlowLogListResultPage contains a page of FlowLog values. +type FlowLogListResultPage struct { + fn func(context.Context, FlowLogListResult) (FlowLogListResult, error) + fllr FlowLogListResult +} + +// 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 *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.fllr) + if err != nil { + return err + } + page.fllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *FlowLogListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page FlowLogListResultPage) NotDone() bool { + return !page.fllr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page FlowLogListResultPage) Response() FlowLogListResult { + return page.fllr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page FlowLogListResultPage) Values() []FlowLog { + if page.fllr.IsEmpty() { + return nil + } + return *page.fllr.Value +} + +// Creates a new instance of the FlowLogListResultPage type. +func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage { + return FlowLogListResultPage{ + fn: getNextPage, + fllr: cur, + } +} + +// FlowLogProperties parameters that define the configuration of flow log. +type FlowLogProperties struct { + // StorageID - ID of the storage account which is used to store the flow log. + StorageID *string `json:"storageId,omitempty"` + // Enabled - Flag to enable/disable flow logging. + Enabled *bool `json:"enabled,omitempty"` + // RetentionPolicy - Parameters that define the retention policy for flow log. + RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` + // Format - Parameters that define the flow log format. + Format *FlowLogFormatParameters `json:"format,omitempty"` +} + +// FlowLogPropertiesFormat parameters that define the configuration of flow log. +type FlowLogPropertiesFormat struct { + // TargetResourceID - ID of network security group to which flow log will be applied. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied. + TargetResourceGUID *string `json:"targetResourceGuid,omitempty"` + // StorageID - ID of the storage account which is used to store the flow log. + StorageID *string `json:"storageId,omitempty"` + // Enabled - Flag to enable/disable flow logging. + Enabled *bool `json:"enabled,omitempty"` + // RetentionPolicy - Parameters that define the retention policy for flow log. + RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` + // Format - Parameters that define the flow log format. + Format *FlowLogFormatParameters `json:"format,omitempty"` + // FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. + FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat. +func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if flpf.TargetResourceID != nil { + objectMap["targetResourceId"] = flpf.TargetResourceID + } + if flpf.StorageID != nil { + objectMap["storageId"] = flpf.StorageID + } + if flpf.Enabled != nil { + objectMap["enabled"] = flpf.Enabled + } + if flpf.RetentionPolicy != nil { + objectMap["retentionPolicy"] = flpf.RetentionPolicy + } + if flpf.Format != nil { + objectMap["format"] = flpf.Format + } + if flpf.FlowAnalyticsConfiguration != nil { + objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration + } + return json.Marshal(objectMap) +} + +// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type FlowLogsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(FlowLogsClient) (FlowLog, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *FlowLogsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for FlowLogsCreateOrUpdateFuture.Result. +func (future *FlowLogsCreateOrUpdateFuture) result(client FlowLogsClient) (fl FlowLog, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + fl.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.FlowLogsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fl.Response.Response, err = future.GetResult(sender); err == nil && fl.Response.Response.StatusCode != http.StatusNoContent { + fl, err = client.CreateOrUpdateResponder(fl.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", fl.Response.Response, "Failure responding to request") + } + } + return +} + +// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type FlowLogsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(FlowLogsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *FlowLogsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for FlowLogsDeleteFuture.Result. +func (future *FlowLogsDeleteFuture) result(client FlowLogsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FlowLogsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.FlowLogsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics +// (optional) status. +type FlowLogStatusParameters struct { + // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status. + TargetResourceID *string `json:"targetResourceId,omitempty"` +} + +// FrontendIPConfiguration frontend IP address of the load balancer. +type FrontendIPConfiguration struct { + autorest.Response `json:"-"` + // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. + *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for FrontendIPConfiguration. +func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fic.FrontendIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat + } + if fic.Name != nil { + objectMap["name"] = fic.Name + } + if fic.Zones != nil { + objectMap["zones"] = fic.Zones + } + if fic.ID != nil { + objectMap["id"] = fic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. +func (fic *FrontendIPConfiguration) 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 frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) + if err != nil { + return err + } + fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + fic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fic.Type = &typeVar + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + fic.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fic.ID = &ID + } + } + } + + return nil +} + +// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. +type FrontendIPConfigurationPropertiesFormat struct { + // InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP. + InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` + // InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP. + InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` + // OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP. + OutboundRules *[]SubResource `json:"outboundRules,omitempty"` + // LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // Subnet - The reference to the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference to the Public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // PublicIPPrefix - The reference to the Public IP Prefix resource. + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + // GatewayLoadBalancer - The reference to gateway load balancer frontend IP. + GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat. +func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ficpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = ficpf.PrivateIPAddress + } + if ficpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod + } + if ficpf.PrivateIPAddressVersion != "" { + objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion + } + if ficpf.Subnet != nil { + objectMap["subnet"] = ficpf.Subnet + } + if ficpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = ficpf.PublicIPAddress + } + if ficpf.PublicIPPrefix != nil { + objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix + } + if ficpf.GatewayLoadBalancer != nil { + objectMap["gatewayLoadBalancer"] = ficpf.GatewayLoadBalancer + } + return json.Marshal(objectMap) +} + +// GatewayLoadBalancerTunnelInterface gateway load balancer tunnel interface of a load balancer backend +// address pool. +type GatewayLoadBalancerTunnelInterface struct { + // Port - Port of gateway load balancer tunnel interface. + Port *int32 `json:"port,omitempty"` + // Identifier - Identifier of gateway load balancer tunnel interface. + Identifier *int32 `json:"identifier,omitempty"` + // Protocol - Protocol of gateway load balancer tunnel interface. Possible values include: 'GatewayLoadBalancerTunnelProtocolNone', 'GatewayLoadBalancerTunnelProtocolNative', 'GatewayLoadBalancerTunnelProtocolVXLAN' + Protocol GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` + // Type - Traffic type of gateway load balancer tunnel interface. Possible values include: 'GatewayLoadBalancerTunnelInterfaceTypeNone', 'GatewayLoadBalancerTunnelInterfaceTypeInternal', 'GatewayLoadBalancerTunnelInterfaceTypeExternal' + Type GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` +} + +// GatewayRoute gateway routing details. +type GatewayRoute struct { + // LocalAddress - READ-ONLY; The gateway's local address. + LocalAddress *string `json:"localAddress,omitempty"` + // NetworkProperty - READ-ONLY; The route's network prefix. + NetworkProperty *string `json:"network,omitempty"` + // NextHop - READ-ONLY; The route's next hop. + NextHop *string `json:"nextHop,omitempty"` + // SourcePeer - READ-ONLY; The peer this route was learned from. + SourcePeer *string `json:"sourcePeer,omitempty"` + // Origin - READ-ONLY; The source this route was learned from. + Origin *string `json:"origin,omitempty"` + // AsPath - READ-ONLY; The route's AS path sequence. + AsPath *string `json:"asPath,omitempty"` + // Weight - READ-ONLY; The route's weight. + Weight *int32 `json:"weight,omitempty"` +} + +// MarshalJSON is the custom marshaler for GatewayRoute. +func (gr GatewayRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// GatewayRouteListResult list of virtual network gateway routes. +type GatewayRouteListResult struct { + autorest.Response `json:"-"` + // Value - List of gateway routes. + Value *[]GatewayRoute `json:"value,omitempty"` +} + +// GenerateExpressRoutePortsLOARequest the customer name to be printed on a letter of authorization. +type GenerateExpressRoutePortsLOARequest struct { + // CustomerName - The customer name. + CustomerName *string `json:"customerName,omitempty"` +} + +// GenerateExpressRoutePortsLOAResult response for GenerateExpressRoutePortsLOA API service call. +type GenerateExpressRoutePortsLOAResult struct { + autorest.Response `json:"-"` + // EncodedContent - The content as a base64 encoded string. + EncodedContent *string `json:"encodedContent,omitempty"` +} + +// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BaseClient) (VpnProfileResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result. +func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) result(client BaseClient) (vpr VpnProfileResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vpr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent { + vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request") + } + } + return +} + +// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GetActiveSessionsAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BaseClient) (BastionActiveSessionListResultPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GetActiveSessionsAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GetActiveSessionsAllFuture.Result. +func (future *GetActiveSessionsAllFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + baslrp.baslr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsAllFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent { + baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request") + } + } + return +} + +// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GetActiveSessionsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BaseClient) (BastionActiveSessionListResultPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *GetActiveSessionsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for GetActiveSessionsFuture.Result. +func (future *GetActiveSessionsFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + baslrp.baslr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent { + baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request") + } + } + return +} + +// GetVpnSitesConfigurationRequest list of Vpn-Sites. +type GetVpnSitesConfigurationRequest struct { + // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded. + VpnSites *[]string `json:"vpnSites,omitempty"` + // OutputBlobSasURL - The sas-url to download the configurations for vpn-sites. + OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` +} + +// HopLink hop link. +type HopLink struct { + // NextHopID - READ-ONLY; The ID of the next hop. + NextHopID *string `json:"nextHopId,omitempty"` + // LinkType - READ-ONLY; Link type. + LinkType *string `json:"linkType,omitempty"` + // HopLinkProperties - Hop link properties. + *HopLinkProperties `json:"properties,omitempty"` + // Issues - READ-ONLY; List of issues. + Issues *[]ConnectivityIssue `json:"issues,omitempty"` + // Context - READ-ONLY; Provides additional context on links. + Context map[string]*string `json:"context"` + // ResourceID - READ-ONLY; Resource ID. + ResourceID *string `json:"resourceId,omitempty"` +} + +// MarshalJSON is the custom marshaler for HopLink. +func (hl HopLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hl.HopLinkProperties != nil { + objectMap["properties"] = hl.HopLinkProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HopLink struct. +func (hl *HopLink) 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 "nextHopId": + if v != nil { + var nextHopID string + err = json.Unmarshal(*v, &nextHopID) + if err != nil { + return err + } + hl.NextHopID = &nextHopID + } + case "linkType": + if v != nil { + var linkType string + err = json.Unmarshal(*v, &linkType) + if err != nil { + return err + } + hl.LinkType = &linkType + } + case "properties": + if v != nil { + var hopLinkProperties HopLinkProperties + err = json.Unmarshal(*v, &hopLinkProperties) + if err != nil { + return err + } + hl.HopLinkProperties = &hopLinkProperties + } + case "issues": + if v != nil { + var issues []ConnectivityIssue + err = json.Unmarshal(*v, &issues) + if err != nil { + return err + } + hl.Issues = &issues + } + case "context": + if v != nil { + var context map[string]*string + err = json.Unmarshal(*v, &context) + if err != nil { + return err + } + hl.Context = context + } + case "resourceId": + if v != nil { + var resourceID string + err = json.Unmarshal(*v, &resourceID) + if err != nil { + return err + } + hl.ResourceID = &resourceID + } + } + } + + return nil +} + +// HopLinkProperties hop link properties. +type HopLinkProperties struct { + // RoundTripTimeMin - READ-ONLY; Minimum roundtrip time in milliseconds. + RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"` + // RoundTripTimeAvg - READ-ONLY; Average roundtrip time in milliseconds. + RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"` + // RoundTripTimeMax - READ-ONLY; Maximum roundtrip time in milliseconds. + RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"` +} + +// MarshalJSON is the custom marshaler for HopLinkProperties. +func (hlp HopLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// HTTPConfiguration HTTP configuration of the connectivity check. +type HTTPConfiguration struct { + // Method - HTTP method. Possible values include: 'HTTPMethodGet' + Method HTTPMethod `json:"method,omitempty"` + // Headers - List of HTTP headers. + Headers *[]HTTPHeader `json:"headers,omitempty"` + // ValidStatusCodes - Valid status codes. + ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` +} + +// HTTPHeader the HTTP header. +type HTTPHeader struct { + // Name - The name in HTTP header. + Name *string `json:"name,omitempty"` + // Value - The value in HTTP header. + Value *string `json:"value,omitempty"` +} + +// HubIPAddresses IP addresses associated with azure firewall. +type HubIPAddresses struct { + // PublicIPs - Public IP addresses associated with azure firewall. + PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"` + // PrivateIPAddress - Private IP Address associated with azure firewall. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` +} + +// HubIPConfiguration ipConfigurations. +type HubIPConfiguration struct { + autorest.Response `json:"-"` + // HubIPConfigurationPropertiesFormat - The properties of the Virtual Hub IPConfigurations. + *HubIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the Ip Configuration. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Ipconfiguration type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for HubIPConfiguration. +func (hic HubIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hic.HubIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = hic.HubIPConfigurationPropertiesFormat + } + if hic.Name != nil { + objectMap["name"] = hic.Name + } + if hic.ID != nil { + objectMap["id"] = hic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HubIPConfiguration struct. +func (hic *HubIPConfiguration) 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 hubIPConfigurationPropertiesFormat HubIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &hubIPConfigurationPropertiesFormat) + if err != nil { + return err + } + hic.HubIPConfigurationPropertiesFormat = &hubIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + hic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hic.ID = &ID + } + } + } + + return nil +} + +// HubIPConfigurationPropertiesFormat properties of IP configuration. +type HubIPConfigurationPropertiesFormat struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference to the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference to the public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for HubIPConfigurationPropertiesFormat. +func (hicpf HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hicpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = hicpf.PrivateIPAddress + } + if hicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = hicpf.PrivateIPAllocationMethod + } + if hicpf.Subnet != nil { + objectMap["subnet"] = hicpf.Subnet + } + if hicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = hicpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + +// HubPublicIPAddresses public IP addresses associated with azure firewall. +type HubPublicIPAddresses struct { + // Addresses - The list of Public IP addresses associated with azure firewall or IP addresses to be retained. + Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"` + // Count - The number of Public IP addresses associated with azure firewall. + Count *int32 `json:"count,omitempty"` +} + +// HubRoute routeTable route. +type HubRoute struct { + // Name - The name of the Route that is unique within a RouteTable. This name can be used to access this route. + Name *string `json:"name,omitempty"` + // DestinationType - The type of destinations (eg: CIDR, ResourceId, Service). + DestinationType *string `json:"destinationType,omitempty"` + // Destinations - List of all destinations. + Destinations *[]string `json:"destinations,omitempty"` + // NextHopType - The type of next hop (eg: ResourceId). + NextHopType *string `json:"nextHopType,omitempty"` + // NextHop - NextHop resource ID. + NextHop *string `json:"nextHop,omitempty"` +} + +// HubRouteTable routeTable resource in a virtual hub. +type HubRouteTable struct { + autorest.Response `json:"-"` + // HubRouteTableProperties - Properties of the RouteTable resource. + *HubRouteTableProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for HubRouteTable. +func (hrt HubRouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hrt.HubRouteTableProperties != nil { + objectMap["properties"] = hrt.HubRouteTableProperties + } + if hrt.Name != nil { + objectMap["name"] = hrt.Name + } + if hrt.ID != nil { + objectMap["id"] = hrt.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HubRouteTable struct. +func (hrt *HubRouteTable) 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 hubRouteTableProperties HubRouteTableProperties + err = json.Unmarshal(*v, &hubRouteTableProperties) + if err != nil { + return err + } + hrt.HubRouteTableProperties = &hubRouteTableProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hrt.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + hrt.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hrt.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hrt.ID = &ID + } + } + } + + return nil +} + +// HubRouteTableProperties parameters for RouteTable. +type HubRouteTableProperties struct { + // Routes - List of all routes. + Routes *[]HubRoute `json:"routes,omitempty"` + // Labels - List of labels associated with this route table. + Labels *[]string `json:"labels,omitempty"` + // AssociatedConnections - READ-ONLY; List of all connections associated with this route table. + AssociatedConnections *[]string `json:"associatedConnections,omitempty"` + // PropagatingConnections - READ-ONLY; List of all connections that advertise to this route table. + PropagatingConnections *[]string `json:"propagatingConnections,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the RouteTable resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for HubRouteTableProperties. +func (hrtp HubRouteTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hrtp.Routes != nil { + objectMap["routes"] = hrtp.Routes + } + if hrtp.Labels != nil { + objectMap["labels"] = hrtp.Labels + } + return json.Marshal(objectMap) +} + +// HubRouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type HubRouteTablesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(HubRouteTablesClient) (HubRouteTable, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *HubRouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for HubRouteTablesCreateOrUpdateFuture.Result. +func (future *HubRouteTablesCreateOrUpdateFuture) result(client HubRouteTablesClient) (hrt HubRouteTable, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + hrt.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.HubRouteTablesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if hrt.Response.Response, err = future.GetResult(sender); err == nil && hrt.Response.Response.StatusCode != http.StatusNoContent { + hrt, err = client.CreateOrUpdateResponder(hrt.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesCreateOrUpdateFuture", "Result", hrt.Response.Response, "Failure responding to request") + } + } + return +} + +// HubRouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type HubRouteTablesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(HubRouteTablesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *HubRouteTablesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for HubRouteTablesDeleteFuture.Result. +func (future *HubRouteTablesDeleteFuture) result(client HubRouteTablesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubRouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.HubRouteTablesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource. +type HubVirtualNetworkConnection struct { + autorest.Response `json:"-"` + // HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection. + *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection. +func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hvnc.HubVirtualNetworkConnectionProperties != nil { + objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties + } + if hvnc.Name != nil { + objectMap["name"] = hvnc.Name + } + if hvnc.ID != nil { + objectMap["id"] = hvnc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct. +func (hvnc *HubVirtualNetworkConnection) 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 hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties + err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties) + if err != nil { + return err + } + hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hvnc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + hvnc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hvnc.ID = &ID + } + } + } + + return nil +} + +// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection. +type HubVirtualNetworkConnectionProperties struct { + // RemoteVirtualNetwork - Reference to the remote virtual network. + RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` + // AllowHubToRemoteVnetTransit - Deprecated: VirtualHub to RemoteVnet transit to enabled or not. + AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` + // AllowRemoteVnetToUseHubVnetGateways - Deprecated: Allow RemoteVnet to use Virtual Hub's gateways. + AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` + // EnableInternetSecurity - Enable internet security. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties. +func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hvncp.RemoteVirtualNetwork != nil { + objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork + } + if hvncp.AllowHubToRemoteVnetTransit != nil { + objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit + } + if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil { + objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways + } + if hvncp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity + } + if hvncp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = hvncp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + +// HubVirtualNetworkConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type HubVirtualNetworkConnectionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(HubVirtualNetworkConnectionsClient) (HubVirtualNetworkConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *HubVirtualNetworkConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for HubVirtualNetworkConnectionsCreateOrUpdateFuture.Result. +func (future *HubVirtualNetworkConnectionsCreateOrUpdateFuture) result(client HubVirtualNetworkConnectionsClient) (hvnc HubVirtualNetworkConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + hvnc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.HubVirtualNetworkConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if hvnc.Response.Response, err = future.GetResult(sender); err == nil && hvnc.Response.Response.StatusCode != http.StatusNoContent { + hvnc, err = client.CreateOrUpdateResponder(hvnc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsCreateOrUpdateFuture", "Result", hvnc.Response.Response, "Failure responding to request") + } + } + return +} + +// HubVirtualNetworkConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type HubVirtualNetworkConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(HubVirtualNetworkConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *HubVirtualNetworkConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for HubVirtualNetworkConnectionsDeleteFuture.Result. +func (future *HubVirtualNetworkConnectionsDeleteFuture) result(client HubVirtualNetworkConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.HubVirtualNetworkConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// InboundNatPool inbound NAT pool of the load balancer. +type InboundNatPool struct { + // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. + *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatPool. +func (inp InboundNatPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inp.InboundNatPoolPropertiesFormat != nil { + objectMap["properties"] = inp.InboundNatPoolPropertiesFormat + } + if inp.Name != nil { + objectMap["name"] = inp.Name + } + if inp.ID != nil { + objectMap["id"] = inp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. +func (inp *InboundNatPool) 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 inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat + err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) + if err != nil { + return err + } + inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + inp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + inp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + inp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + inp.ID = &ID + } + } + } + + return nil +} + +// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. +type InboundNatPoolPropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. + FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` + // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. + FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` + // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat. +func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inppf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration + } + if inppf.Protocol != "" { + objectMap["protocol"] = inppf.Protocol + } + if inppf.FrontendPortRangeStart != nil { + objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart + } + if inppf.FrontendPortRangeEnd != nil { + objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd + } + if inppf.BackendPort != nil { + objectMap["backendPort"] = inppf.BackendPort + } + if inppf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes + } + if inppf.EnableFloatingIP != nil { + objectMap["enableFloatingIP"] = inppf.EnableFloatingIP + } + if inppf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = inppf.EnableTCPReset + } + return json.Marshal(objectMap) +} + +// InboundNatRule inbound NAT rule of the load balancer. +type InboundNatRule struct { + autorest.Response `json:"-"` + // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. + *InboundNatRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatRule. +func (inr InboundNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inr.InboundNatRulePropertiesFormat != nil { + objectMap["properties"] = inr.InboundNatRulePropertiesFormat + } + if inr.Name != nil { + objectMap["name"] = inr.Name + } + if inr.ID != nil { + objectMap["id"] = inr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. +func (inr *InboundNatRule) 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 inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat + err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) + if err != nil { + return err + } + inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + inr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + inr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + inr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + inr.ID = &ID + } + } + } + + return nil +} + +// InboundNatRuleListResult response for ListInboundNatRule API service call. +type InboundNatRuleListResult struct { + autorest.Response `json:"-"` + // Value - A list of inbound nat rules in a load balancer. + Value *[]InboundNatRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatRuleListResult. +func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inrlr.Value != nil { + objectMap["value"] = inrlr.Value + } + return json.Marshal(objectMap) +} + +// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. +type InboundNatRuleListResultIterator struct { + i int + page InboundNatRuleListResultPage +} + +// 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 *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.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 *InboundNatRuleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InboundNatRuleListResultIterator) 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 InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { + 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 InboundNatRuleListResultIterator) Value() InboundNatRule { + if !iter.page.NotDone() { + return InboundNatRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the InboundNatRuleListResultIterator type. +func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator { + return InboundNatRuleListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (inrlr InboundNatRuleListResult) IsEmpty() bool { + return inrlr.Value == nil || len(*inrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (inrlr InboundNatRuleListResult) hasNextLink() bool { + return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0 +} + +// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !inrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(inrlr.NextLink))) +} + +// InboundNatRuleListResultPage contains a page of InboundNatRule values. +type InboundNatRuleListResultPage struct { + fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error) + inrlr InboundNatRuleListResult +} + +// 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 *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.inrlr) + if err != nil { + return err + } + page.inrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *InboundNatRuleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page InboundNatRuleListResultPage) NotDone() bool { + return !page.inrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { + return page.inrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page InboundNatRuleListResultPage) Values() []InboundNatRule { + if page.inrlr.IsEmpty() { + return nil + } + return *page.inrlr.Value +} + +// Creates a new instance of the InboundNatRuleListResultPage type. +func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { + return InboundNatRuleListResultPage{ + fn: getNextPage, + inrlr: cur, + } +} + +// InboundNatRulePropertiesFormat properties of the inbound NAT rule. +type InboundNatRulePropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. + BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` + // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // FrontendPortRangeStart - The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. + FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` + // FrontendPortRangeEnd - The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. + FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` + // BackendAddressPool - A reference to backendAddressPool resource. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat. +func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inrpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration + } + if inrpf.Protocol != "" { + objectMap["protocol"] = inrpf.Protocol + } + if inrpf.FrontendPort != nil { + objectMap["frontendPort"] = inrpf.FrontendPort + } + if inrpf.BackendPort != nil { + objectMap["backendPort"] = inrpf.BackendPort + } + if inrpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes + } + if inrpf.EnableFloatingIP != nil { + objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP + } + if inrpf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = inrpf.EnableTCPReset + } + if inrpf.FrontendPortRangeStart != nil { + objectMap["frontendPortRangeStart"] = inrpf.FrontendPortRangeStart + } + if inrpf.FrontendPortRangeEnd != nil { + objectMap["frontendPortRangeEnd"] = inrpf.FrontendPortRangeEnd + } + if inrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = inrpf.BackendAddressPool + } + return json.Marshal(objectMap) +} + +// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InboundNatRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InboundNatRulesClient) (InboundNatRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result. +func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + inr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { + inr, err = client.CreateOrUpdateResponder(inr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") + } + } + return +} + +// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type InboundNatRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InboundNatRulesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InboundNatRulesDeleteFuture.Result. +func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// InboundSecurityRule NVA Inbound Security Rule resource. +type InboundSecurityRule struct { + autorest.Response `json:"-"` + // InboundSecurityRuleProperties - The properties of the Inbound Security Rules. + *InboundSecurityRuleProperties `json:"properties,omitempty"` + // Name - Name of security rule collection. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; NVA inbound security rule type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundSecurityRule. +func (isr InboundSecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if isr.InboundSecurityRuleProperties != nil { + objectMap["properties"] = isr.InboundSecurityRuleProperties + } + if isr.Name != nil { + objectMap["name"] = isr.Name + } + if isr.ID != nil { + objectMap["id"] = isr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InboundSecurityRule struct. +func (isr *InboundSecurityRule) 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 inboundSecurityRuleProperties InboundSecurityRuleProperties + err = json.Unmarshal(*v, &inboundSecurityRuleProperties) + if err != nil { + return err + } + isr.InboundSecurityRuleProperties = &inboundSecurityRuleProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + isr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + isr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + isr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + isr.ID = &ID + } + } + } + + return nil +} + +// InboundSecurityRuleCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InboundSecurityRuleCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InboundSecurityRuleClient) (InboundSecurityRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InboundSecurityRuleCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InboundSecurityRuleCreateOrUpdateFuture.Result. +func (future *InboundSecurityRuleCreateOrUpdateFuture) result(client InboundSecurityRuleClient) (isr InboundSecurityRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + isr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InboundSecurityRuleCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if isr.Response.Response, err = future.GetResult(sender); err == nil && isr.Response.Response.StatusCode != http.StatusNoContent { + isr, err = client.CreateOrUpdateResponder(isr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleCreateOrUpdateFuture", "Result", isr.Response.Response, "Failure responding to request") + } + } + return +} + +// InboundSecurityRuleProperties properties of the Inbound Security Rules resource. +type InboundSecurityRuleProperties struct { + // Rules - List of allowed rules. + Rules *[]InboundSecurityRules `json:"rules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundSecurityRuleProperties. +func (isrp InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if isrp.Rules != nil { + objectMap["rules"] = isrp.Rules + } + return json.Marshal(objectMap) +} + +// InboundSecurityRules properties of the Inbound Security Rules resource. +type InboundSecurityRules struct { + // Protocol - Protocol. This should be either TCP or UDP. Possible values include: 'InboundSecurityRulesProtocolTCP', 'InboundSecurityRulesProtocolUDP' + Protocol InboundSecurityRulesProtocol `json:"protocol,omitempty"` + // SourceAddressPrefix - The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed. + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + // DestinationPortRange - NVA port ranges to be opened up. One needs to provide specific ports. + DestinationPortRange *int32 `json:"destinationPortRange,omitempty"` +} + +// IntentPolicy network Intent Policy resource. +type IntentPolicy struct { + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 IntentPolicy. +func (IP IntentPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if IP.ID != nil { + objectMap["id"] = IP.ID + } + if IP.Location != nil { + objectMap["location"] = IP.Location + } + if IP.Tags != nil { + objectMap["tags"] = IP.Tags + } + return json.Marshal(objectMap) +} + +// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. +type IntentPolicyConfiguration struct { + // NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription. + NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"` + // SourceNetworkIntentPolicy - Source network intent policy. + SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"` +} + +// Interface a network interface in a resource group. +type Interface struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the network interface. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // InterfacePropertiesFormat - Properties of the network interface. + *InterfacePropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 Interface. +func (i Interface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.ExtendedLocation != nil { + objectMap["extendedLocation"] = i.ExtendedLocation + } + if i.InterfacePropertiesFormat != nil { + objectMap["properties"] = i.InterfacePropertiesFormat + } + if i.ID != nil { + objectMap["id"] = i.ID + } + if i.Location != nil { + objectMap["location"] = i.Location + } + if i.Tags != nil { + objectMap["tags"] = i.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Interface struct. +func (i *Interface) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + i.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var interfacePropertiesFormat InterfacePropertiesFormat + err = json.Unmarshal(*v, &interfacePropertiesFormat) + if err != nil { + return err + } + i.InterfacePropertiesFormat = &interfacePropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + i.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + i.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + i.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + i.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + i.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + i.Tags = tags + } + } + } + + return nil +} + +// InterfaceAssociation network interface and its custom security rules. +type InterfaceAssociation struct { + // ID - READ-ONLY; Network interface ID. + ID *string `json:"id,omitempty"` + // SecurityRules - Collection of custom security rules. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceAssociation. +func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ia.SecurityRules != nil { + objectMap["securityRules"] = ia.SecurityRules + } + return json.Marshal(objectMap) +} + +// InterfaceDNSSettings DNS settings of a network interface. +type InterfaceDNSSettings struct { + // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. + DNSServers *[]string `json:"dnsServers,omitempty"` + // AppliedDNSServers - READ-ONLY; If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. + AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` + // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. + InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` + // InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network. + InternalFqdn *string `json:"internalFqdn,omitempty"` + // InternalDomainNameSuffix - READ-ONLY; Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. + InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceDNSSettings. +func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ids.DNSServers != nil { + objectMap["dnsServers"] = ids.DNSServers + } + if ids.InternalDNSNameLabel != nil { + objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel + } + return json.Marshal(objectMap) +} + +// InterfaceIPConfiguration iPConfiguration in a network interface. +type InterfaceIPConfiguration struct { + autorest.Response `json:"-"` + // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. + *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. +func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iic.InterfaceIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat + } + if iic.Name != nil { + objectMap["name"] = iic.Name + } + if iic.Type != nil { + objectMap["type"] = iic.Type + } + if iic.ID != nil { + objectMap["id"] = iic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. +func (iic *InterfaceIPConfiguration) 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 interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) + if err != nil { + return err + } + iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + iic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + iic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + iic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + iic.ID = &ID + } + } + } + + return nil +} + +// InterfaceIPConfigurationListResult response for list ip configurations API service call. +type InterfaceIPConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - A list of ip configurations. + Value *[]InterfaceIPConfiguration `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult. +func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iiclr.Value != nil { + objectMap["value"] = iiclr.Value + } + return json.Marshal(objectMap) +} + +// InterfaceIPConfigurationListResultIterator provides access to a complete listing of +// InterfaceIPConfiguration values. +type InterfaceIPConfigurationListResultIterator struct { + i int + page InterfaceIPConfigurationListResultPage +} + +// 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 *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.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 *InterfaceIPConfigurationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InterfaceIPConfigurationListResultIterator) 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 InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { + 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 InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { + if !iter.page.NotDone() { + return InterfaceIPConfiguration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the InterfaceIPConfigurationListResultIterator type. +func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator { + return InterfaceIPConfigurationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { + return iiclr.Value == nil || len(*iiclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool { + return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0 +} + +// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !iiclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(iiclr.NextLink))) +} + +// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. +type InterfaceIPConfigurationListResultPage struct { + fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) + iiclr InterfaceIPConfigurationListResult +} + +// 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 *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.iiclr) + if err != nil { + return err + } + page.iiclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *InterfaceIPConfigurationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page InterfaceIPConfigurationListResultPage) NotDone() bool { + return !page.iiclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { + return page.iiclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { + if page.iiclr.IsEmpty() { + return nil + } + return *page.iiclr.Value +} + +// Creates a new instance of the InterfaceIPConfigurationListResultPage type. +func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { + return InterfaceIPConfigurationListResultPage{ + fn: getNextPage, + iiclr: cur, + } +} + +// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network +// interface. +type InterfaceIPConfigurationPrivateLinkConnectionProperties struct { + // GroupID - READ-ONLY; The group ID for current private link connection. + GroupID *string `json:"groupId,omitempty"` + // RequiredMemberName - READ-ONLY; The required member name for current private link connection. + RequiredMemberName *string `json:"requiredMemberName,omitempty"` + // Fqdns - READ-ONLY; List of FQDNs for current private link connection. + Fqdns *[]string `json:"fqdns,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPrivateLinkConnectionProperties. +func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. +type InterfaceIPConfigurationPropertiesFormat struct { + // GatewayLoadBalancer - The reference to gateway load balancer frontend IP. + GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` + // VirtualNetworkTaps - The reference to Virtual Network Taps. + VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` + // ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource. + ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` + // LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource. + LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` + // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. + LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` + // PrivateIPAddress - Private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // Subnet - Subnet bound to the IP configuration. + Subnet *Subnet `json:"subnet,omitempty"` + // Primary - Whether this is a primary customer address on the network interface. + Primary *bool `json:"primary,omitempty"` + // PublicIPAddress - Public IP address bound to the IP configuration. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface. + PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat. +func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iicpf.GatewayLoadBalancer != nil { + objectMap["gatewayLoadBalancer"] = iicpf.GatewayLoadBalancer + } + if iicpf.VirtualNetworkTaps != nil { + objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps + } + if iicpf.ApplicationGatewayBackendAddressPools != nil { + objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools + } + if iicpf.LoadBalancerBackendAddressPools != nil { + objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools + } + if iicpf.LoadBalancerInboundNatRules != nil { + objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules + } + if iicpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = iicpf.PrivateIPAddress + } + if iicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod + } + if iicpf.PrivateIPAddressVersion != "" { + objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion + } + if iicpf.Subnet != nil { + objectMap["subnet"] = iicpf.Subnet + } + if iicpf.Primary != nil { + objectMap["primary"] = iicpf.Primary + } + if iicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = iicpf.PublicIPAddress + } + if iicpf.ApplicationSecurityGroups != nil { + objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups + } + return json.Marshal(objectMap) +} + +// InterfaceListResult response for the ListNetworkInterface API service call. +type InterfaceListResult struct { + autorest.Response `json:"-"` + // Value - A list of network interfaces in a resource group. + Value *[]Interface `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceListResult. +func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ilr.Value != nil { + objectMap["value"] = ilr.Value + } + return json.Marshal(objectMap) +} + +// InterfaceListResultIterator provides access to a complete listing of Interface values. +type InterfaceListResultIterator struct { + i int + page InterfaceListResultPage +} + +// 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 *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.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 *InterfaceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InterfaceListResultIterator) 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 InterfaceListResultIterator) Response() InterfaceListResult { + 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 InterfaceListResultIterator) Value() Interface { + if !iter.page.NotDone() { + return Interface{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the InterfaceListResultIterator type. +func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { + return InterfaceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ilr InterfaceListResult) IsEmpty() bool { + return ilr.Value == nil || len(*ilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ilr InterfaceListResult) hasNextLink() bool { + return ilr.NextLink != nil && len(*ilr.NextLink) != 0 +} + +// interfaceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ilr.NextLink))) +} + +// InterfaceListResultPage contains a page of Interface values. +type InterfaceListResultPage struct { + fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) + ilr InterfaceListResult +} + +// 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 *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ilr) + if err != nil { + return err + } + page.ilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *InterfaceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page InterfaceListResultPage) NotDone() bool { + return !page.ilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page InterfaceListResultPage) Response() InterfaceListResult { + return page.ilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page InterfaceListResultPage) Values() []Interface { + if page.ilr.IsEmpty() { + return nil + } + return *page.ilr.Value +} + +// Creates a new instance of the InterfaceListResultPage type. +func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { + return InterfaceListResultPage{ + fn: getNextPage, + ilr: cur, + } +} + +// InterfaceLoadBalancerListResult response for list ip configurations API service call. +type InterfaceLoadBalancerListResult struct { + autorest.Response `json:"-"` + // Value - A list of load balancers. + Value *[]LoadBalancer `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult. +func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ilblr.Value != nil { + objectMap["value"] = ilblr.Value + } + return json.Marshal(objectMap) +} + +// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. +type InterfaceLoadBalancerListResultIterator struct { + i int + page InterfaceLoadBalancerListResultPage +} + +// 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 *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.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 *InterfaceLoadBalancerListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InterfaceLoadBalancerListResultIterator) 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 InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { + 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 InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { + if !iter.page.NotDone() { + return LoadBalancer{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the InterfaceLoadBalancerListResultIterator type. +func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator { + return InterfaceLoadBalancerListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { + return ilblr.Value == nil || len(*ilblr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool { + return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0 +} + +// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ilblr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ilblr.NextLink))) +} + +// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. +type InterfaceLoadBalancerListResultPage struct { + fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) + ilblr InterfaceLoadBalancerListResult +} + +// 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 *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ilblr) + if err != nil { + return err + } + page.ilblr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *InterfaceLoadBalancerListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page InterfaceLoadBalancerListResultPage) NotDone() bool { + return !page.ilblr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { + return page.ilblr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { + if page.ilblr.IsEmpty() { + return nil + } + return *page.ilblr.Value +} + +// Creates a new instance of the InterfaceLoadBalancerListResultPage type. +func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { + return InterfaceLoadBalancerListResultPage{ + fn: getNextPage, + ilblr: cur, + } +} + +// InterfacePropertiesFormat networkInterface properties. +type InterfacePropertiesFormat struct { + // VirtualMachine - READ-ONLY; The reference to a virtual machine. + VirtualMachine *SubResource `json:"virtualMachine,omitempty"` + // NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` + // PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // IPConfigurations - A list of IPConfigurations of the network interface. + IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + // TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface. + TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"` + // DNSSettings - The DNS settings in network interface. + DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` + // MacAddress - READ-ONLY; The MAC address of the network interface. + MacAddress *string `json:"macAddress,omitempty"` + // Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine. + Primary *bool `json:"primary,omitempty"` + // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + // HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources. + HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` + // DscpConfiguration - READ-ONLY; A reference to the dscp configuration to which the network interface is linked. + DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // WorkloadType - WorkloadType of the NetworkInterface for BareMetal resources + WorkloadType *string `json:"workloadType,omitempty"` + // NicType - Type of Network Interface resource. Possible values include: 'InterfaceNicTypeStandard', 'InterfaceNicTypeElastic' + NicType InterfaceNicType `json:"nicType,omitempty"` + // PrivateLinkService - Privatelinkservice of the network interface resource. + PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` + // MigrationPhase - Migration phase of Network Interface resource. Possible values include: 'InterfaceMigrationPhaseNone', 'InterfaceMigrationPhasePrepare', 'InterfaceMigrationPhaseCommit', 'InterfaceMigrationPhaseAbort', 'InterfaceMigrationPhaseCommitted' + MigrationPhase InterfaceMigrationPhase `json:"migrationPhase,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfacePropertiesFormat. +func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ipf.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup + } + if ipf.IPConfigurations != nil { + objectMap["ipConfigurations"] = ipf.IPConfigurations + } + if ipf.DNSSettings != nil { + objectMap["dnsSettings"] = ipf.DNSSettings + } + if ipf.EnableAcceleratedNetworking != nil { + objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking + } + if ipf.EnableIPForwarding != nil { + objectMap["enableIPForwarding"] = ipf.EnableIPForwarding + } + if ipf.WorkloadType != nil { + objectMap["workloadType"] = ipf.WorkloadType + } + if ipf.NicType != "" { + objectMap["nicType"] = ipf.NicType + } + if ipf.PrivateLinkService != nil { + objectMap["privateLinkService"] = ipf.PrivateLinkService + } + if ipf.MigrationPhase != "" { + objectMap["migrationPhase"] = ipf.MigrationPhase + } + return json.Marshal(objectMap) +} + +// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InterfacesClient) (Interface, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InterfacesCreateOrUpdateFuture.Result. +func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + i.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.CreateOrUpdateResponder(i.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") + } + } + return +} + +// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type InterfacesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InterfacesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InterfacesDeleteFuture.Result. +func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesGetEffectiveRouteTableFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InterfacesClient) (EffectiveRouteListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result. +func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { + erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") + } + } + return +} + +// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result. +func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ensglr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { + ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") + } + } + return +} + +// InterfaceTapConfiguration tap configuration in a Network Interface. +type InterfaceTapConfiguration struct { + autorest.Response `json:"-"` + // InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration. + *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceTapConfiguration. +func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if itc.InterfaceTapConfigurationPropertiesFormat != nil { + objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat + } + if itc.Name != nil { + objectMap["name"] = itc.Name + } + if itc.ID != nil { + objectMap["id"] = itc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct. +func (itc *InterfaceTapConfiguration) 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 interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat + err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat) + if err != nil { + return err + } + itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + itc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + itc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + itc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + itc.ID = &ID + } + } + } + + return nil +} + +// InterfaceTapConfigurationListResult response for list tap configurations API service call. +type InterfaceTapConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - A list of tap configurations. + Value *[]InterfaceTapConfiguration `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult. +func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if itclr.Value != nil { + objectMap["value"] = itclr.Value + } + return json.Marshal(objectMap) +} + +// InterfaceTapConfigurationListResultIterator provides access to a complete listing of +// InterfaceTapConfiguration values. +type InterfaceTapConfigurationListResultIterator struct { + i int + page InterfaceTapConfigurationListResultPage +} + +// 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 *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.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 *InterfaceTapConfigurationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InterfaceTapConfigurationListResultIterator) 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 InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult { + 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 InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration { + if !iter.page.NotDone() { + return InterfaceTapConfiguration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the InterfaceTapConfigurationListResultIterator type. +func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator { + return InterfaceTapConfigurationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool { + return itclr.Value == nil || len(*itclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool { + return itclr.NextLink != nil && len(*itclr.NextLink) != 0 +} + +// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !itclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(itclr.NextLink))) +} + +// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values. +type InterfaceTapConfigurationListResultPage struct { + fn func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error) + itclr InterfaceTapConfigurationListResult +} + +// 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 *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.itclr) + if err != nil { + return err + } + page.itclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *InterfaceTapConfigurationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page InterfaceTapConfigurationListResultPage) NotDone() bool { + return !page.itclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult { + return page.itclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration { + if page.itclr.IsEmpty() { + return nil + } + return *page.itclr.Value +} + +// Creates a new instance of the InterfaceTapConfigurationListResultPage type. +func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage { + return InterfaceTapConfigurationListResultPage{ + fn: getNextPage, + itclr: cur, + } +} + +// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration. +type InterfaceTapConfigurationPropertiesFormat struct { + // VirtualNetworkTap - The reference to the Virtual Network Tap resource. + VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat. +func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if itcpf.VirtualNetworkTap != nil { + objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap + } + return json.Marshal(objectMap) +} + +// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type InterfaceTapConfigurationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result. +func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + itc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent { + itc, err = client.CreateOrUpdateResponder(itc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request") + } + } + return +} + +// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfaceTapConfigurationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(InterfaceTapConfigurationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result. +func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call. +type IPAddressAvailabilityResult struct { + autorest.Response `json:"-"` + // Available - Private IP address availability. + Available *bool `json:"available,omitempty"` + // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. + AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` + // IsPlatformReserved - Private IP address platform reserved. + IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"` +} + +// IPAllocation ipAllocation resource. +type IPAllocation struct { + autorest.Response `json:"-"` + // IPAllocationPropertiesFormat - Properties of the IpAllocation. + *IPAllocationPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 IPAllocation. +func (ia IPAllocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ia.IPAllocationPropertiesFormat != nil { + objectMap["properties"] = ia.IPAllocationPropertiesFormat + } + if ia.ID != nil { + objectMap["id"] = ia.ID + } + if ia.Location != nil { + objectMap["location"] = ia.Location + } + if ia.Tags != nil { + objectMap["tags"] = ia.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IPAllocation struct. +func (ia *IPAllocation) 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 IPAllocationPropertiesFormat IPAllocationPropertiesFormat + err = json.Unmarshal(*v, &IPAllocationPropertiesFormat) + if err != nil { + return err + } + ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ia.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ia.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ia.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ia.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ia.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ia.Tags = tags + } + } + } + + return nil +} + +// IPAllocationListResult response for the ListIpAllocations API service call. +type IPAllocationListResult struct { + autorest.Response `json:"-"` + // Value - A list of IpAllocation resources. + Value *[]IPAllocation `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values. +type IPAllocationListResultIterator struct { + i int + page IPAllocationListResultPage +} + +// 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 *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.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 *IPAllocationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IPAllocationListResultIterator) 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 IPAllocationListResultIterator) Response() IPAllocationListResult { + 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 IPAllocationListResultIterator) Value() IPAllocation { + if !iter.page.NotDone() { + return IPAllocation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IPAllocationListResultIterator type. +func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator { + return IPAllocationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ialr IPAllocationListResult) IsEmpty() bool { + return ialr.Value == nil || len(*ialr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ialr IPAllocationListResult) hasNextLink() bool { + return ialr.NextLink != nil && len(*ialr.NextLink) != 0 +} + +// iPAllocationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ialr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ialr.NextLink))) +} + +// IPAllocationListResultPage contains a page of IPAllocation values. +type IPAllocationListResultPage struct { + fn func(context.Context, IPAllocationListResult) (IPAllocationListResult, error) + ialr IPAllocationListResult +} + +// 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 *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ialr) + if err != nil { + return err + } + page.ialr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *IPAllocationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IPAllocationListResultPage) NotDone() bool { + return !page.ialr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IPAllocationListResultPage) Response() IPAllocationListResult { + return page.ialr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IPAllocationListResultPage) Values() []IPAllocation { + if page.ialr.IsEmpty() { + return nil + } + return *page.ialr.Value +} + +// Creates a new instance of the IPAllocationListResultPage type. +func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage { + return IPAllocationListResultPage{ + fn: getNextPage, + ialr: cur, + } +} + +// IPAllocationPropertiesFormat properties of the IpAllocation. +type IPAllocationPropertiesFormat struct { + // Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource. + Subnet *SubResource `json:"subnet,omitempty"` + // VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource. + VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` + // Type - The type for the IpAllocation. Possible values include: 'IPAllocationTypeUndefined', 'IPAllocationTypeHypernet' + Type IPAllocationType `json:"type,omitempty"` + // Prefix - The address prefix for the IpAllocation. + Prefix *string `json:"prefix,omitempty"` + // PrefixLength - The address prefix length for the IpAllocation. + PrefixLength *int32 `json:"prefixLength,omitempty"` + // PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PrefixType IPVersion `json:"prefixType,omitempty"` + // IpamAllocationID - The IPAM allocation ID. + IpamAllocationID *string `json:"ipamAllocationId,omitempty"` + // AllocationTags - IpAllocation tags. + AllocationTags map[string]*string `json:"allocationTags"` +} + +// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat. +func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iapf.Type != "" { + objectMap["type"] = iapf.Type + } + if iapf.Prefix != nil { + objectMap["prefix"] = iapf.Prefix + } + if iapf.PrefixLength != nil { + objectMap["prefixLength"] = iapf.PrefixLength + } + if iapf.PrefixType != "" { + objectMap["prefixType"] = iapf.PrefixType + } + if iapf.IpamAllocationID != nil { + objectMap["ipamAllocationId"] = iapf.IpamAllocationID + } + if iapf.AllocationTags != nil { + objectMap["allocationTags"] = iapf.AllocationTags + } + return json.Marshal(objectMap) +} + +// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type IPAllocationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPAllocationsClient) (IPAllocation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPAllocationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPAllocationsCreateOrUpdateFuture.Result. +func (future *IPAllocationsCreateOrUpdateFuture) result(client IPAllocationsClient) (ia IPAllocation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ia.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.IPAllocationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ia.Response.Response, err = future.GetResult(sender); err == nil && ia.Response.Response.StatusCode != http.StatusNoContent { + ia, err = client.CreateOrUpdateResponder(ia.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", ia.Response.Response, "Failure responding to request") + } + } + return +} + +// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPAllocationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPAllocationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPAllocationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPAllocationsDeleteFuture.Result. +func (future *IPAllocationsDeleteFuture) result(client IPAllocationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPAllocationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.IPAllocationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// IPConfiguration IP configuration. +type IPConfiguration struct { + // IPConfigurationPropertiesFormat - Properties of the IP configuration. + *IPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPConfiguration. +func (ic IPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ic.IPConfigurationPropertiesFormat != nil { + objectMap["properties"] = ic.IPConfigurationPropertiesFormat + } + if ic.Name != nil { + objectMap["name"] = ic.Name + } + if ic.ID != nil { + objectMap["id"] = ic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. +func (ic *IPConfiguration) 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 IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) + if err != nil { + return err + } + ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ic.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ic.ID = &ID + } + } + } + + return nil +} + +// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress. +type IPConfigurationBgpPeeringAddress struct { + // IpconfigurationID - The ID of IP configuration which belongs to gateway. + IpconfigurationID *string `json:"ipconfigurationId,omitempty"` + // DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration. + DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` + // CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration. + CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` + // TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration. + TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress. +func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icbpa.IpconfigurationID != nil { + objectMap["ipconfigurationId"] = icbpa.IpconfigurationID + } + if icbpa.CustomBgpIPAddresses != nil { + objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses + } + return json.Marshal(objectMap) +} + +// IPConfigurationProfile IP configuration profile child resource. +type IPConfigurationProfile struct { + // IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile. + *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPConfigurationProfile. +func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icp.IPConfigurationProfilePropertiesFormat != nil { + objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat + } + if icp.Name != nil { + objectMap["name"] = icp.Name + } + if icp.ID != nil { + objectMap["id"] = icp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct. +func (icp *IPConfigurationProfile) 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 IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat + err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat) + if err != nil { + return err + } + icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + icp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + icp.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + icp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + icp.ID = &ID + } + } + } + + return nil +} + +// IPConfigurationProfilePropertiesFormat IP configuration profile properties. +type IPConfigurationProfilePropertiesFormat struct { + // Subnet - The reference to the subnet resource to create a container network interface ip configuration. + Subnet *Subnet `json:"subnet,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat. +func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icppf.Subnet != nil { + objectMap["subnet"] = icppf.Subnet + } + return json.Marshal(objectMap) +} + +// IPConfigurationPropertiesFormat properties of IP configuration. +type IPConfigurationPropertiesFormat struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference to the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference to the public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat. +func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = icpf.PrivateIPAddress + } + if icpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod + } + if icpf.Subnet != nil { + objectMap["subnet"] = icpf.Subnet + } + if icpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = icpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + +// IPGroup the IpGroups resource information. +type IPGroup struct { + autorest.Response `json:"-"` + // IPGroupPropertiesFormat - Properties of the IpGroups. + *IPGroupPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 IPGroup. +func (ig IPGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ig.IPGroupPropertiesFormat != nil { + objectMap["properties"] = ig.IPGroupPropertiesFormat + } + if ig.ID != nil { + objectMap["id"] = ig.ID + } + if ig.Location != nil { + objectMap["location"] = ig.Location + } + if ig.Tags != nil { + objectMap["tags"] = ig.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IPGroup struct. +func (ig *IPGroup) 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 IPGroupPropertiesFormat IPGroupPropertiesFormat + err = json.Unmarshal(*v, &IPGroupPropertiesFormat) + if err != nil { + return err + } + ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ig.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ig.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ig.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ig.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ig.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ig.Tags = tags + } + } + } + + return nil +} + +// IPGroupListResult response for the ListIpGroups API service call. +type IPGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of IpGroups information resources. + Value *[]IPGroup `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// IPGroupListResultIterator provides access to a complete listing of IPGroup values. +type IPGroupListResultIterator struct { + i int + page IPGroupListResultPage +} + +// 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 *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.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 *IPGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IPGroupListResultIterator) 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 IPGroupListResultIterator) Response() IPGroupListResult { + 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 IPGroupListResultIterator) Value() IPGroup { + if !iter.page.NotDone() { + return IPGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IPGroupListResultIterator type. +func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator { + return IPGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (iglr IPGroupListResult) IsEmpty() bool { + return iglr.Value == nil || len(*iglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (iglr IPGroupListResult) hasNextLink() bool { + return iglr.NextLink != nil && len(*iglr.NextLink) != 0 +} + +// iPGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !iglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(iglr.NextLink))) +} + +// IPGroupListResultPage contains a page of IPGroup values. +type IPGroupListResultPage struct { + fn func(context.Context, IPGroupListResult) (IPGroupListResult, error) + iglr IPGroupListResult +} + +// 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 *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.iglr) + if err != nil { + return err + } + page.iglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *IPGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IPGroupListResultPage) NotDone() bool { + return !page.iglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IPGroupListResultPage) Response() IPGroupListResult { + return page.iglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IPGroupListResultPage) Values() []IPGroup { + if page.iglr.IsEmpty() { + return nil + } + return *page.iglr.Value +} + +// Creates a new instance of the IPGroupListResultPage type. +func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage { + return IPGroupListResultPage{ + fn: getNextPage, + iglr: cur, + } +} + +// IPGroupPropertiesFormat the IpGroups property information. +type IPGroupPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource. + IPAddresses *[]string `json:"ipAddresses,omitempty"` + // Firewalls - READ-ONLY; List of references to Firewall resources that this IpGroups is associated with. + Firewalls *[]SubResource `json:"firewalls,omitempty"` + // FirewallPolicies - READ-ONLY; List of references to Firewall Policies resources that this IpGroups is associated with. + FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat. +func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if igpf.IPAddresses != nil { + objectMap["ipAddresses"] = igpf.IPAddresses + } + return json.Marshal(objectMap) +} + +// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPGroupsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPGroupsClient) (IPGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPGroupsCreateOrUpdateFuture.Result. +func (future *IPGroupsCreateOrUpdateFuture) result(client IPGroupsClient) (ig IPGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ig.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent { + ig, err = client.CreateOrUpdateResponder(ig.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request") + } + } + return +} + +// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPGroupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPGroupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPGroupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPGroupsDeleteFuture.Result. +func (future *IPGroupsDeleteFuture) result(client IPGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection. +type IpsecPolicy struct { + // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` + // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` + // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' + IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` + // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' + IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` + // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'IkeEncryptionDES', 'IkeEncryptionDES3', 'IkeEncryptionAES128', 'IkeEncryptionAES192', 'IkeEncryptionAES256', 'IkeEncryptionGCMAES256', 'IkeEncryptionGCMAES128' + IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` + // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' + IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` + // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24' + DhGroup DhGroup `json:"dhGroup,omitempty"` + // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +} + +// IPTag contains the IpTag associated with the object. +type IPTag struct { + // IPTagType - The IP tag type. Example: FirstPartyUsage. + IPTagType *string `json:"ipTagType,omitempty"` + // Tag - The value of the IP tag associated with the public IP. Example: SQL. + Tag *string `json:"tag,omitempty"` +} + +// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach. +type Ipv6CircuitConnectionConfig struct { + // AddressPrefix - /125 IP address space to carve out customer addresses for global reach. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig. +func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i6ccc.AddressPrefix != nil { + objectMap["addressPrefix"] = i6ccc.AddressPrefix + } + return json.Marshal(objectMap) +} + +// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. +type Ipv6ExpressRouteCircuitPeeringConfig struct { + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // RouteFilter - The reference to the RouteFilter resource. + RouteFilter *SubResource `json:"routeFilter,omitempty"` + // State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' + State ExpressRouteCircuitPeeringState `json:"state,omitempty"` +} + +// ListHubRouteTablesResult list of RouteTables and a URL nextLink to get the next set of results. +type ListHubRouteTablesResult struct { + autorest.Response `json:"-"` + // Value - List of RouteTables. + Value *[]HubRouteTable `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListHubRouteTablesResultIterator provides access to a complete listing of HubRouteTable values. +type ListHubRouteTablesResultIterator struct { + i int + page ListHubRouteTablesResultPage +} + +// 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 *ListHubRouteTablesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultIterator.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 *ListHubRouteTablesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListHubRouteTablesResultIterator) 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 ListHubRouteTablesResultIterator) Response() ListHubRouteTablesResult { + 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 ListHubRouteTablesResultIterator) Value() HubRouteTable { + if !iter.page.NotDone() { + return HubRouteTable{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListHubRouteTablesResultIterator type. +func NewListHubRouteTablesResultIterator(page ListHubRouteTablesResultPage) ListHubRouteTablesResultIterator { + return ListHubRouteTablesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lhrtr ListHubRouteTablesResult) IsEmpty() bool { + return lhrtr.Value == nil || len(*lhrtr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lhrtr ListHubRouteTablesResult) hasNextLink() bool { + return lhrtr.NextLink != nil && len(*lhrtr.NextLink) != 0 +} + +// listHubRouteTablesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lhrtr ListHubRouteTablesResult) listHubRouteTablesResultPreparer(ctx context.Context) (*http.Request, error) { + if !lhrtr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lhrtr.NextLink))) +} + +// ListHubRouteTablesResultPage contains a page of HubRouteTable values. +type ListHubRouteTablesResultPage struct { + fn func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error) + lhrtr ListHubRouteTablesResult +} + +// 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 *ListHubRouteTablesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lhrtr) + if err != nil { + return err + } + page.lhrtr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListHubRouteTablesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListHubRouteTablesResultPage) NotDone() bool { + return !page.lhrtr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListHubRouteTablesResultPage) Response() ListHubRouteTablesResult { + return page.lhrtr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListHubRouteTablesResultPage) Values() []HubRouteTable { + if page.lhrtr.IsEmpty() { + return nil + } + return *page.lhrtr.Value +} + +// Creates a new instance of the ListHubRouteTablesResultPage type. +func NewListHubRouteTablesResultPage(cur ListHubRouteTablesResult, getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage { + return ListHubRouteTablesResultPage{ + fn: getNextPage, + lhrtr: cur, + } +} + +// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get +// the next set of results. +type ListHubVirtualNetworkConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of HubVirtualNetworkConnections. + Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of +// HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultIterator struct { + i int + page ListHubVirtualNetworkConnectionsResultPage +} + +// 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 *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.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 *ListHubVirtualNetworkConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListHubVirtualNetworkConnectionsResultIterator) 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 ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult { + 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 ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection { + if !iter.page.NotDone() { + return HubVirtualNetworkConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type. +func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator { + return ListHubVirtualNetworkConnectionsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool { + return lhvncr.Value == nil || len(*lhvncr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool { + return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0 +} + +// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lhvncr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lhvncr.NextLink))) +} + +// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultPage struct { + fn func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error) + lhvncr ListHubVirtualNetworkConnectionsResult +} + +// 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 *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lhvncr) + if err != nil { + return err + } + page.lhvncr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListHubVirtualNetworkConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool { + return !page.lhvncr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult { + return page.lhvncr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection { + if page.lhvncr.IsEmpty() { + return nil + } + return *page.lhvncr.Value +} + +// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type. +func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage { + return ListHubVirtualNetworkConnectionsResultPage{ + fn: getNextPage, + lhvncr: cur, + } +} + +// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of +// P2SVpnGateways and a URL nextLink to get the next set of results. +type ListP2SVpnGatewaysResult struct { + autorest.Response `json:"-"` + // Value - List of P2SVpnGateways. + Value *[]P2SVpnGateway `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values. +type ListP2SVpnGatewaysResultIterator struct { + i int + page ListP2SVpnGatewaysResultPage +} + +// 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 *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.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 *ListP2SVpnGatewaysResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListP2SVpnGatewaysResultIterator) 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 ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult { + 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 ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway { + if !iter.page.NotDone() { + return P2SVpnGateway{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListP2SVpnGatewaysResultIterator type. +func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator { + return ListP2SVpnGatewaysResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool { + return lpvgr.Value == nil || len(*lpvgr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool { + return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0 +} + +// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { + if !lpvgr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lpvgr.NextLink))) +} + +// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values. +type ListP2SVpnGatewaysResultPage struct { + fn func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error) + lpvgr ListP2SVpnGatewaysResult +} + +// 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 *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lpvgr) + if err != nil { + return err + } + page.lpvgr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListP2SVpnGatewaysResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListP2SVpnGatewaysResultPage) NotDone() bool { + return !page.lpvgr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult { + return page.lpvgr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway { + if page.lpvgr.IsEmpty() { + return nil + } + return *page.lpvgr.Value +} + +// Creates a new instance of the ListP2SVpnGatewaysResultPage type. +func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { + return ListP2SVpnGatewaysResultPage{ + fn: getNextPage, + lpvgr: cur, + } +} + +// ListString ... +type ListString struct { + autorest.Response `json:"-"` + Value *[]string `json:"value,omitempty"` +} + +// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list. +type ListVirtualHubBgpConnectionResults struct { + autorest.Response `json:"-"` + // Value - The list of VirtualHubBgpConnections. + Value *[]BgpConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection +// values. +type ListVirtualHubBgpConnectionResultsIterator struct { + i int + page ListVirtualHubBgpConnectionResultsPage +} + +// 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 *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.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 *ListVirtualHubBgpConnectionResultsIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualHubBgpConnectionResultsIterator) 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 ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults { + 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 ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection { + if !iter.page.NotDone() { + return BgpConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type. +func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator { + return ListVirtualHubBgpConnectionResultsIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool { + return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool { + return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0 +} + +// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) { + if !lvhbcr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvhbcr.NextLink))) +} + +// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values. +type ListVirtualHubBgpConnectionResultsPage struct { + fn func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error) + lvhbcr ListVirtualHubBgpConnectionResults +} + +// 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 *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvhbcr) + if err != nil { + return err + } + page.lvhbcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVirtualHubBgpConnectionResultsPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool { + return !page.lvhbcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults { + return page.lvhbcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection { + if page.lvhbcr.IsEmpty() { + return nil + } + return *page.lvhbcr.Value +} + +// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type. +func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage { + return ListVirtualHubBgpConnectionResultsPage{ + fn: getNextPage, + lvhbcr: cur, + } +} + +// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list. +type ListVirtualHubIPConfigurationResults struct { + autorest.Response `json:"-"` + // Value - The list of VirtualHubIpConfigurations. + Value *[]HubIPConfiguration `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration +// values. +type ListVirtualHubIPConfigurationResultsIterator struct { + i int + page ListVirtualHubIPConfigurationResultsPage +} + +// 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 *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.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 *ListVirtualHubIPConfigurationResultsIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualHubIPConfigurationResultsIterator) 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 ListVirtualHubIPConfigurationResultsIterator) Response() ListVirtualHubIPConfigurationResults { + 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 ListVirtualHubIPConfigurationResultsIterator) Value() HubIPConfiguration { + if !iter.page.NotDone() { + return HubIPConfiguration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualHubIPConfigurationResultsIterator type. +func NewListVirtualHubIPConfigurationResultsIterator(page ListVirtualHubIPConfigurationResultsPage) ListVirtualHubIPConfigurationResultsIterator { + return ListVirtualHubIPConfigurationResultsIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvhicr ListVirtualHubIPConfigurationResults) IsEmpty() bool { + return lvhicr.Value == nil || len(*lvhicr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvhicr ListVirtualHubIPConfigurationResults) hasNextLink() bool { + return lvhicr.NextLink != nil && len(*lvhicr.NextLink) != 0 +} + +// listVirtualHubIPConfigurationResultsPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvhicr ListVirtualHubIPConfigurationResults) listVirtualHubIPConfigurationResultsPreparer(ctx context.Context) (*http.Request, error) { + if !lvhicr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvhicr.NextLink))) +} + +// ListVirtualHubIPConfigurationResultsPage contains a page of HubIPConfiguration values. +type ListVirtualHubIPConfigurationResultsPage struct { + fn func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error) + lvhicr ListVirtualHubIPConfigurationResults +} + +// 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 *ListVirtualHubIPConfigurationResultsPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvhicr) + if err != nil { + return err + } + page.lvhicr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVirtualHubIPConfigurationResultsPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualHubIPConfigurationResultsPage) NotDone() bool { + return !page.lvhicr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualHubIPConfigurationResultsPage) Response() ListVirtualHubIPConfigurationResults { + return page.lvhicr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualHubIPConfigurationResultsPage) Values() []HubIPConfiguration { + if page.lvhicr.IsEmpty() { + return nil + } + return *page.lvhicr.Value +} + +// Creates a new instance of the ListVirtualHubIPConfigurationResultsPage type. +func NewListVirtualHubIPConfigurationResultsPage(cur ListVirtualHubIPConfigurationResults, getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage { + return ListVirtualHubIPConfigurationResultsPage{ + fn: getNextPage, + lvhicr: cur, + } +} + +// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set +// of results. +type ListVirtualHubRouteTableV2sResult struct { + autorest.Response `json:"-"` + // Value - List of VirtualHubRouteTableV2s. + Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of +// VirtualHubRouteTableV2 values. +type ListVirtualHubRouteTableV2sResultIterator struct { + i int + page ListVirtualHubRouteTableV2sResultPage +} + +// 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 *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.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 *ListVirtualHubRouteTableV2sResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualHubRouteTableV2sResultIterator) 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 ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult { + 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 ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 { + if !iter.page.NotDone() { + return VirtualHubRouteTableV2{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type. +func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator { + return ListVirtualHubRouteTableV2sResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool { + return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool { + return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0 +} + +// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvhrtvr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvhrtvr.NextLink))) +} + +// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values. +type ListVirtualHubRouteTableV2sResultPage struct { + fn func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error) + lvhrtvr ListVirtualHubRouteTableV2sResult +} + +// 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 *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvhrtvr) + if err != nil { + return err + } + page.lvhrtvr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVirtualHubRouteTableV2sResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool { + return !page.lvhrtvr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult { + return page.lvhrtvr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 { + if page.lvhrtvr.IsEmpty() { + return nil + } + return *page.lvhrtvr.Value +} + +// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type. +func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage { + return ListVirtualHubRouteTableV2sResultPage{ + fn: getNextPage, + lvhrtvr: cur, + } +} + +// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a +// URL nextLink to get the next set of results. +type ListVirtualHubsResult struct { + autorest.Response `json:"-"` + // Value - List of VirtualHubs. + Value *[]VirtualHub `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values. +type ListVirtualHubsResultIterator struct { + i int + page ListVirtualHubsResultPage +} + +// 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 *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.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 *ListVirtualHubsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualHubsResultIterator) 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 ListVirtualHubsResultIterator) Response() ListVirtualHubsResult { + 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 ListVirtualHubsResultIterator) Value() VirtualHub { + if !iter.page.NotDone() { + return VirtualHub{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualHubsResultIterator type. +func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator { + return ListVirtualHubsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvhr ListVirtualHubsResult) IsEmpty() bool { + return lvhr.Value == nil || len(*lvhr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvhr ListVirtualHubsResult) hasNextLink() bool { + return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0 +} + +// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvhr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvhr.NextLink))) +} + +// ListVirtualHubsResultPage contains a page of VirtualHub values. +type ListVirtualHubsResultPage struct { + fn func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error) + lvhr ListVirtualHubsResult +} + +// 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 *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvhr) + if err != nil { + return err + } + page.lvhr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVirtualHubsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualHubsResultPage) NotDone() bool { + return !page.lvhr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult { + return page.lvhr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualHubsResultPage) Values() []VirtualHub { + if page.lvhr.IsEmpty() { + return nil + } + return *page.lvhr.Value +} + +// Creates a new instance of the ListVirtualHubsResultPage type. +func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage { + return ListVirtualHubsResultPage{ + fn: getNextPage, + lvhr: cur, + } +} + +// ListVirtualNetworkGatewayNatRulesResult result of the request to list all nat rules to a virtual network +// gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. +type ListVirtualNetworkGatewayNatRulesResult struct { + autorest.Response `json:"-"` + // Value - List of Nat Rules. + Value *[]VirtualNetworkGatewayNatRule `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualNetworkGatewayNatRulesResultIterator provides access to a complete listing of +// VirtualNetworkGatewayNatRule values. +type ListVirtualNetworkGatewayNatRulesResultIterator struct { + i int + page ListVirtualNetworkGatewayNatRulesResultPage +} + +// 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 *ListVirtualNetworkGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualNetworkGatewayNatRulesResultIterator.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 *ListVirtualNetworkGatewayNatRulesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualNetworkGatewayNatRulesResultIterator) 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 ListVirtualNetworkGatewayNatRulesResultIterator) Response() ListVirtualNetworkGatewayNatRulesResult { + 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 ListVirtualNetworkGatewayNatRulesResultIterator) Value() VirtualNetworkGatewayNatRule { + if !iter.page.NotDone() { + return VirtualNetworkGatewayNatRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualNetworkGatewayNatRulesResultIterator type. +func NewListVirtualNetworkGatewayNatRulesResultIterator(page ListVirtualNetworkGatewayNatRulesResultPage) ListVirtualNetworkGatewayNatRulesResultIterator { + return ListVirtualNetworkGatewayNatRulesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) IsEmpty() bool { + return lvngnrr.Value == nil || len(*lvngnrr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) hasNextLink() bool { + return lvngnrr.NextLink != nil && len(*lvngnrr.NextLink) != 0 +} + +// listVirtualNetworkGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) listVirtualNetworkGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvngnrr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvngnrr.NextLink))) +} + +// ListVirtualNetworkGatewayNatRulesResultPage contains a page of VirtualNetworkGatewayNatRule values. +type ListVirtualNetworkGatewayNatRulesResultPage struct { + fn func(context.Context, ListVirtualNetworkGatewayNatRulesResult) (ListVirtualNetworkGatewayNatRulesResult, error) + lvngnrr ListVirtualNetworkGatewayNatRulesResult +} + +// 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 *ListVirtualNetworkGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualNetworkGatewayNatRulesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvngnrr) + if err != nil { + return err + } + page.lvngnrr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVirtualNetworkGatewayNatRulesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualNetworkGatewayNatRulesResultPage) NotDone() bool { + return !page.lvngnrr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualNetworkGatewayNatRulesResultPage) Response() ListVirtualNetworkGatewayNatRulesResult { + return page.lvngnrr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualNetworkGatewayNatRulesResultPage) Values() []VirtualNetworkGatewayNatRule { + if page.lvngnrr.IsEmpty() { + return nil + } + return *page.lvngnrr.Value +} + +// Creates a new instance of the ListVirtualNetworkGatewayNatRulesResultPage type. +func NewListVirtualNetworkGatewayNatRulesResultPage(cur ListVirtualNetworkGatewayNatRulesResult, getNextPage func(context.Context, ListVirtualNetworkGatewayNatRulesResult) (ListVirtualNetworkGatewayNatRulesResult, error)) ListVirtualNetworkGatewayNatRulesResultPage { + return ListVirtualNetworkGatewayNatRulesResultPage{ + fn: getNextPage, + lvngnrr: cur, + } +} + +// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a +// URL nextLink to get the next set of results. +type ListVirtualWANsResult struct { + autorest.Response `json:"-"` + // Value - List of VirtualWANs. + Value *[]VirtualWAN `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values. +type ListVirtualWANsResultIterator struct { + i int + page ListVirtualWANsResultPage +} + +// 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 *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.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 *ListVirtualWANsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualWANsResultIterator) 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 ListVirtualWANsResultIterator) Response() ListVirtualWANsResult { + 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 ListVirtualWANsResultIterator) Value() VirtualWAN { + if !iter.page.NotDone() { + return VirtualWAN{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualWANsResultIterator type. +func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator { + return ListVirtualWANsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvwnr ListVirtualWANsResult) IsEmpty() bool { + return lvwnr.Value == nil || len(*lvwnr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvwnr ListVirtualWANsResult) hasNextLink() bool { + return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0 +} + +// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvwnr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvwnr.NextLink))) +} + +// ListVirtualWANsResultPage contains a page of VirtualWAN values. +type ListVirtualWANsResultPage struct { + fn func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error) + lvwnr ListVirtualWANsResult +} + +// 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 *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvwnr) + if err != nil { + return err + } + page.lvwnr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVirtualWANsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualWANsResultPage) NotDone() bool { + return !page.lvwnr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult { + return page.lvwnr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualWANsResultPage) Values() []VirtualWAN { + if page.lvwnr.IsEmpty() { + return nil + } + return *page.lvwnr.Value +} + +// Creates a new instance of the ListVirtualWANsResultPage type. +func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage { + return ListVirtualWANsResultPage{ + fn: getNextPage, + lvwnr: cur, + } +} + +// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. +// It contains a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVpnConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of Vpn Connections. + Value *[]VpnConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values. +type ListVpnConnectionsResultIterator struct { + i int + page ListVpnConnectionsResultPage +} + +// 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 *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.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 *ListVpnConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnConnectionsResultIterator) 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 ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult { + 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 ListVpnConnectionsResultIterator) Value() VpnConnection { + if !iter.page.NotDone() { + return VpnConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnConnectionsResultIterator type. +func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator { + return ListVpnConnectionsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvcr ListVpnConnectionsResult) IsEmpty() bool { + return lvcr.Value == nil || len(*lvcr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvcr ListVpnConnectionsResult) hasNextLink() bool { + return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0 +} + +// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvcr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvcr.NextLink))) +} + +// ListVpnConnectionsResultPage contains a page of VpnConnection values. +type ListVpnConnectionsResultPage struct { + fn func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error) + lvcr ListVpnConnectionsResult +} + +// 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 *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvcr) + if err != nil { + return err + } + page.lvcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnConnectionsResultPage) NotDone() bool { + return !page.lvcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult { + return page.lvcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnConnectionsResultPage) Values() []VpnConnection { + if page.lvcr.IsEmpty() { + return nil + } + return *page.lvcr.Value +} + +// Creates a new instance of the ListVpnConnectionsResultPage type. +func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage { + return ListVpnConnectionsResultPage{ + fn: getNextPage, + lvcr: cur, + } +} + +// ListVpnGatewayNatRulesResult result of the request to list all nat rules to a virtual wan vpn gateway. +// It contains a list of Nat rules and a URL nextLink to get the next set of results. +type ListVpnGatewayNatRulesResult struct { + autorest.Response `json:"-"` + // Value - List of Nat Rules. + Value *[]VpnGatewayNatRule `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnGatewayNatRulesResultIterator provides access to a complete listing of VpnGatewayNatRule values. +type ListVpnGatewayNatRulesResultIterator struct { + i int + page ListVpnGatewayNatRulesResultPage +} + +// 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 *ListVpnGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultIterator.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 *ListVpnGatewayNatRulesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnGatewayNatRulesResultIterator) 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 ListVpnGatewayNatRulesResultIterator) Response() ListVpnGatewayNatRulesResult { + 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 ListVpnGatewayNatRulesResultIterator) Value() VpnGatewayNatRule { + if !iter.page.NotDone() { + return VpnGatewayNatRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnGatewayNatRulesResultIterator type. +func NewListVpnGatewayNatRulesResultIterator(page ListVpnGatewayNatRulesResultPage) ListVpnGatewayNatRulesResultIterator { + return ListVpnGatewayNatRulesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvgnrr ListVpnGatewayNatRulesResult) IsEmpty() bool { + return lvgnrr.Value == nil || len(*lvgnrr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvgnrr ListVpnGatewayNatRulesResult) hasNextLink() bool { + return lvgnrr.NextLink != nil && len(*lvgnrr.NextLink) != 0 +} + +// listVpnGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvgnrr ListVpnGatewayNatRulesResult) listVpnGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvgnrr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvgnrr.NextLink))) +} + +// ListVpnGatewayNatRulesResultPage contains a page of VpnGatewayNatRule values. +type ListVpnGatewayNatRulesResultPage struct { + fn func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error) + lvgnrr ListVpnGatewayNatRulesResult +} + +// 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 *ListVpnGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvgnrr) + if err != nil { + return err + } + page.lvgnrr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnGatewayNatRulesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnGatewayNatRulesResultPage) NotDone() bool { + return !page.lvgnrr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnGatewayNatRulesResultPage) Response() ListVpnGatewayNatRulesResult { + return page.lvgnrr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnGatewayNatRulesResultPage) Values() []VpnGatewayNatRule { + if page.lvgnrr.IsEmpty() { + return nil + } + return *page.lvgnrr.Value +} + +// Creates a new instance of the ListVpnGatewayNatRulesResultPage type. +func NewListVpnGatewayNatRulesResultPage(cur ListVpnGatewayNatRulesResult, getNextPage func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)) ListVpnGatewayNatRulesResultPage { + return ListVpnGatewayNatRulesResultPage{ + fn: getNextPage, + lvgnrr: cur, + } +} + +// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a +// URL nextLink to get the next set of results. +type ListVpnGatewaysResult struct { + autorest.Response `json:"-"` + // Value - List of VpnGateways. + Value *[]VpnGateway `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values. +type ListVpnGatewaysResultIterator struct { + i int + page ListVpnGatewaysResultPage +} + +// 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 *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.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 *ListVpnGatewaysResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnGatewaysResultIterator) 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 ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult { + 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 ListVpnGatewaysResultIterator) Value() VpnGateway { + if !iter.page.NotDone() { + return VpnGateway{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnGatewaysResultIterator type. +func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator { + return ListVpnGatewaysResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvgr ListVpnGatewaysResult) IsEmpty() bool { + return lvgr.Value == nil || len(*lvgr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvgr ListVpnGatewaysResult) hasNextLink() bool { + return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0 +} + +// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvgr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvgr.NextLink))) +} + +// ListVpnGatewaysResultPage contains a page of VpnGateway values. +type ListVpnGatewaysResultPage struct { + fn func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error) + lvgr ListVpnGatewaysResult +} + +// 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 *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvgr) + if err != nil { + return err + } + page.lvgr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnGatewaysResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnGatewaysResultPage) NotDone() bool { + return !page.lvgr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult { + return page.lvgr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnGatewaysResultPage) Values() []VpnGateway { + if page.lvgr.IsEmpty() { + return nil + } + return *page.lvgr.Value +} + +// Creates a new instance of the ListVpnGatewaysResultPage type. +func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { + return ListVpnGatewaysResultPage{ + fn: getNextPage, + lvgr: cur, + } +} + +// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains +// a list of VpnServerConfigurations and a URL nextLink to get the next set of results. +type ListVpnServerConfigurationsResult struct { + autorest.Response `json:"-"` + // Value - List of VpnServerConfigurations. + Value *[]VpnServerConfiguration `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnServerConfigurationsResultIterator provides access to a complete listing of +// VpnServerConfiguration values. +type ListVpnServerConfigurationsResultIterator struct { + i int + page ListVpnServerConfigurationsResultPage +} + +// 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 *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.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 *ListVpnServerConfigurationsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnServerConfigurationsResultIterator) 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 ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult { + 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 ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration { + if !iter.page.NotDone() { + return VpnServerConfiguration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnServerConfigurationsResultIterator type. +func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator { + return ListVpnServerConfigurationsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool { + return lvscr.Value == nil || len(*lvscr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool { + return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0 +} + +// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvscr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvscr.NextLink))) +} + +// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values. +type ListVpnServerConfigurationsResultPage struct { + fn func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error) + lvscr ListVpnServerConfigurationsResult +} + +// 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 *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvscr) + if err != nil { + return err + } + page.lvscr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnServerConfigurationsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnServerConfigurationsResultPage) NotDone() bool { + return !page.lvscr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult { + return page.lvscr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration { + if page.lvscr.IsEmpty() { + return nil + } + return *page.lvscr.Value +} + +// Creates a new instance of the ListVpnServerConfigurationsResultPage type. +func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage { + return ListVpnServerConfigurationsResultPage{ + fn: getNextPage, + lvscr: cur, + } +} + +// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn +// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVpnSiteLinkConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of VpnSiteLinkConnections. + Value *[]VpnSiteLinkConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection +// values. +type ListVpnSiteLinkConnectionsResultIterator struct { + i int + page ListVpnSiteLinkConnectionsResultPage +} + +// 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 *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.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 *ListVpnSiteLinkConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnSiteLinkConnectionsResultIterator) 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 ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult { + 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 ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection { + if !iter.page.NotDone() { + return VpnSiteLinkConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type. +func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator { + return ListVpnSiteLinkConnectionsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool { + return lvslcr.Value == nil || len(*lvslcr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool { + return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0 +} + +// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvslcr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvslcr.NextLink))) +} + +// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values. +type ListVpnSiteLinkConnectionsResultPage struct { + fn func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error) + lvslcr ListVpnSiteLinkConnectionsResult +} + +// 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 *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvslcr) + if err != nil { + return err + } + page.lvslcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnSiteLinkConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool { + return !page.lvslcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult { + return page.lvslcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection { + if page.lvslcr.IsEmpty() { + return nil + } + return *page.lvslcr.Value +} + +// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type. +func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { + return ListVpnSiteLinkConnectionsResultPage{ + fn: getNextPage, + lvslcr: cur, + } +} + +// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks +// and a URL nextLink to get the next set of results. +type ListVpnSiteLinksResult struct { + autorest.Response `json:"-"` + // Value - List of VpnSitesLinks. + Value *[]VpnSiteLink `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values. +type ListVpnSiteLinksResultIterator struct { + i int + page ListVpnSiteLinksResultPage +} + +// 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 *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.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 *ListVpnSiteLinksResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnSiteLinksResultIterator) 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 ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult { + 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 ListVpnSiteLinksResultIterator) Value() VpnSiteLink { + if !iter.page.NotDone() { + return VpnSiteLink{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnSiteLinksResultIterator type. +func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator { + return ListVpnSiteLinksResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvslr ListVpnSiteLinksResult) IsEmpty() bool { + return lvslr.Value == nil || len(*lvslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvslr ListVpnSiteLinksResult) hasNextLink() bool { + return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0 +} + +// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvslr.NextLink))) +} + +// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values. +type ListVpnSiteLinksResultPage struct { + fn func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error) + lvslr ListVpnSiteLinksResult +} + +// 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 *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvslr) + if err != nil { + return err + } + page.lvslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnSiteLinksResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSiteLinksResultPage) NotDone() bool { + return !page.lvslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult { + return page.lvslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink { + if page.lvslr.IsEmpty() { + return nil + } + return *page.lvslr.Value +} + +// Creates a new instance of the ListVpnSiteLinksResultPage type. +func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage { + return ListVpnSiteLinksResultPage{ + fn: getNextPage, + lvslr: cur, + } +} + +// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL +// nextLink to get the next set of results. +type ListVpnSitesResult struct { + autorest.Response `json:"-"` + // Value - List of VpnSites. + Value *[]VpnSite `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values. +type ListVpnSitesResultIterator struct { + i int + page ListVpnSitesResultPage +} + +// 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 *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.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 *ListVpnSitesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnSitesResultIterator) 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 ListVpnSitesResultIterator) Response() ListVpnSitesResult { + 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 ListVpnSitesResultIterator) Value() VpnSite { + if !iter.page.NotDone() { + return VpnSite{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnSitesResultIterator type. +func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator { + return ListVpnSitesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvsr ListVpnSitesResult) IsEmpty() bool { + return lvsr.Value == nil || len(*lvsr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvsr ListVpnSitesResult) hasNextLink() bool { + return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0 +} + +// listVpnSitesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvsr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvsr.NextLink))) +} + +// ListVpnSitesResultPage contains a page of VpnSite values. +type ListVpnSitesResultPage struct { + fn func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error) + lvsr ListVpnSitesResult +} + +// 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 *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvsr) + if err != nil { + return err + } + page.lvsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListVpnSitesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSitesResultPage) NotDone() bool { + return !page.lvsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnSitesResultPage) Response() ListVpnSitesResult { + return page.lvsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSitesResultPage) Values() []VpnSite { + if page.lvsr.IsEmpty() { + return nil + } + return *page.lvsr.Value +} + +// Creates a new instance of the ListVpnSitesResultPage type. +func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { + return ListVpnSitesResultPage{ + fn: getNextPage, + lvsr: cur, + } +} + +// LoadBalancer loadBalancer resource. +type LoadBalancer struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the load balancer. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // Sku - The load balancer SKU. + Sku *LoadBalancerSku `json:"sku,omitempty"` + // LoadBalancerPropertiesFormat - Properties of load balancer. + *LoadBalancerPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 LoadBalancer. +func (lb LoadBalancer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lb.ExtendedLocation != nil { + objectMap["extendedLocation"] = lb.ExtendedLocation + } + if lb.Sku != nil { + objectMap["sku"] = lb.Sku + } + if lb.LoadBalancerPropertiesFormat != nil { + objectMap["properties"] = lb.LoadBalancerPropertiesFormat + } + if lb.ID != nil { + objectMap["id"] = lb.ID + } + if lb.Location != nil { + objectMap["location"] = lb.Location + } + if lb.Tags != nil { + objectMap["tags"] = lb.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. +func (lb *LoadBalancer) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + lb.ExtendedLocation = &extendedLocation + } + case "sku": + if v != nil { + var sku LoadBalancerSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + lb.Sku = &sku + } + case "properties": + if v != nil { + var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat + err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) + if err != nil { + return err + } + lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lb.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lb.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lb.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lb.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + lb.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + lb.Tags = tags + } + } + } + + return nil +} + +// LoadBalancerBackendAddress load balancer backend addresses. +type LoadBalancerBackendAddress struct { + // LoadBalancerBackendAddressPropertiesFormat - Properties of load balancer backend address pool. + *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the backend address. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerBackendAddress. +func (lbba LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbba.LoadBalancerBackendAddressPropertiesFormat != nil { + objectMap["properties"] = lbba.LoadBalancerBackendAddressPropertiesFormat + } + if lbba.Name != nil { + objectMap["name"] = lbba.Name + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancerBackendAddress struct. +func (lbba *LoadBalancerBackendAddress) 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 loadBalancerBackendAddressPropertiesFormat LoadBalancerBackendAddressPropertiesFormat + err = json.Unmarshal(*v, &loadBalancerBackendAddressPropertiesFormat) + if err != nil { + return err + } + lbba.LoadBalancerBackendAddressPropertiesFormat = &loadBalancerBackendAddressPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lbba.Name = &name + } + } + } + + return nil +} + +// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. +type LoadBalancerBackendAddressPoolListResult struct { + autorest.Response `json:"-"` + // Value - A list of backend address pools in a load balancer. + Value *[]BackendAddressPool `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbbaplr.Value != nil { + objectMap["value"] = lbbaplr.Value + } + return json.Marshal(objectMap) +} + +// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of +// BackendAddressPool values. +type LoadBalancerBackendAddressPoolListResultIterator struct { + i int + page LoadBalancerBackendAddressPoolListResultPage +} + +// 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 *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.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 *LoadBalancerBackendAddressPoolListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerBackendAddressPoolListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { + 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 LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { + if !iter.page.NotDone() { + return BackendAddressPool{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type. +func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator { + return LoadBalancerBackendAddressPoolListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { + return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool { + return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0 +} + +// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lbbaplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lbbaplr.NextLink))) +} + +// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. +type LoadBalancerBackendAddressPoolListResultPage struct { + fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) + lbbaplr LoadBalancerBackendAddressPoolListResult +} + +// 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 *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lbbaplr) + if err != nil { + return err + } + page.lbbaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LoadBalancerBackendAddressPoolListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { + return !page.lbbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { + return page.lbbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { + if page.lbbaplr.IsEmpty() { + return nil + } + return *page.lbbaplr.Value +} + +// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type. +func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { + return LoadBalancerBackendAddressPoolListResultPage{ + fn: getNextPage, + lbbaplr: cur, + } +} + +// LoadBalancerBackendAddressPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type LoadBalancerBackendAddressPoolsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancerBackendAddressPoolsClient) (BackendAddressPool, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancerBackendAddressPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancerBackendAddressPoolsCreateOrUpdateFuture.Result. +func (future *LoadBalancerBackendAddressPoolsCreateOrUpdateFuture) result(client LoadBalancerBackendAddressPoolsClient) (bap BackendAddressPool, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bap.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bap.Response.Response, err = future.GetResult(sender); err == nil && bap.Response.Response.StatusCode != http.StatusNoContent { + bap, err = client.CreateOrUpdateResponder(bap.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture", "Result", bap.Response.Response, "Failure responding to request") + } + } + return +} + +// LoadBalancerBackendAddressPoolsDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type LoadBalancerBackendAddressPoolsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancerBackendAddressPoolsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancerBackendAddressPoolsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancerBackendAddressPoolsDeleteFuture.Result. +func (future *LoadBalancerBackendAddressPoolsDeleteFuture) result(client LoadBalancerBackendAddressPoolsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancerBackendAddressPoolsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// LoadBalancerBackendAddressPropertiesFormat properties of the load balancer backend addresses. +type LoadBalancerBackendAddressPropertiesFormat struct { + // VirtualNetwork - Reference to an existing virtual network. + VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` + // Subnet - Reference to an existing subnet. + Subnet *SubResource `json:"subnet,omitempty"` + // IPAddress - IP Address belonging to the referenced virtual network. + IPAddress *string `json:"ipAddress,omitempty"` + // NetworkInterfaceIPConfiguration - READ-ONLY; Reference to IP address defined in network interfaces. + NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` + // LoadBalancerFrontendIPConfiguration - Reference to the frontend ip address configuration defined in regional loadbalancer. + LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat. +func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbbapf.VirtualNetwork != nil { + objectMap["virtualNetwork"] = lbbapf.VirtualNetwork + } + if lbbapf.Subnet != nil { + objectMap["subnet"] = lbbapf.Subnet + } + if lbbapf.IPAddress != nil { + objectMap["ipAddress"] = lbbapf.IPAddress + } + if lbbapf.LoadBalancerFrontendIPConfiguration != nil { + objectMap["loadBalancerFrontendIPConfiguration"] = lbbapf.LoadBalancerFrontendIPConfiguration + } + return json.Marshal(objectMap) +} + +// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. +type LoadBalancerFrontendIPConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - A list of frontend IP configurations in a load balancer. + Value *[]FrontendIPConfiguration `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult. +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbficlr.Value != nil { + objectMap["value"] = lbficlr.Value + } + return json.Marshal(objectMap) +} + +// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of +// FrontendIPConfiguration values. +type LoadBalancerFrontendIPConfigurationListResultIterator struct { + i int + page LoadBalancerFrontendIPConfigurationListResultPage +} + +// 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 *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.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 *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) 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 LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { + 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 LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { + if !iter.page.NotDone() { + return FrontendIPConfiguration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type. +func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator { + return LoadBalancerFrontendIPConfigurationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { + return lbficlr.Value == nil || len(*lbficlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool { + return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0 +} + +// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lbficlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lbficlr.NextLink))) +} + +// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. +type LoadBalancerFrontendIPConfigurationListResultPage struct { + fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) + lbficlr LoadBalancerFrontendIPConfigurationListResult +} + +// 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 *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lbficlr) + if err != nil { + return err + } + page.lbficlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { + return !page.lbficlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { + return page.lbficlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { + if page.lbficlr.IsEmpty() { + return nil + } + return *page.lbficlr.Value +} + +// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type. +func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { + return LoadBalancerFrontendIPConfigurationListResultPage{ + fn: getNextPage, + lbficlr: cur, + } +} + +// LoadBalancerListResult response for ListLoadBalancers API service call. +type LoadBalancerListResult struct { + autorest.Response `json:"-"` + // Value - A list of load balancers in a resource group. + Value *[]LoadBalancer `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerListResult. +func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lblr.Value != nil { + objectMap["value"] = lblr.Value + } + return json.Marshal(objectMap) +} + +// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. +type LoadBalancerListResultIterator struct { + i int + page LoadBalancerListResultPage +} + +// 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 *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.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 *LoadBalancerListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerListResultIterator) 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 LoadBalancerListResultIterator) Response() LoadBalancerListResult { + 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 LoadBalancerListResultIterator) Value() LoadBalancer { + if !iter.page.NotDone() { + return LoadBalancer{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LoadBalancerListResultIterator type. +func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { + return LoadBalancerListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lblr LoadBalancerListResult) IsEmpty() bool { + return lblr.Value == nil || len(*lblr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lblr LoadBalancerListResult) hasNextLink() bool { + return lblr.NextLink != nil && len(*lblr.NextLink) != 0 +} + +// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lblr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lblr.NextLink))) +} + +// LoadBalancerListResultPage contains a page of LoadBalancer values. +type LoadBalancerListResultPage struct { + fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) + lblr LoadBalancerListResult +} + +// 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 *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lblr) + if err != nil { + return err + } + page.lblr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LoadBalancerListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerListResultPage) NotDone() bool { + return !page.lblr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { + return page.lblr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerListResultPage) Values() []LoadBalancer { + if page.lblr.IsEmpty() { + return nil + } + return *page.lblr.Value +} + +// Creates a new instance of the LoadBalancerListResultPage type. +func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { + return LoadBalancerListResultPage{ + fn: getNextPage, + lblr: cur, + } +} + +// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. +type LoadBalancerLoadBalancingRuleListResult struct { + autorest.Response `json:"-"` + // Value - A list of load balancing rules in a load balancer. + Value *[]LoadBalancingRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult. +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lblbrlr.Value != nil { + objectMap["value"] = lblbrlr.Value + } + return json.Marshal(objectMap) +} + +// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of +// LoadBalancingRule values. +type LoadBalancerLoadBalancingRuleListResultIterator struct { + i int + page LoadBalancerLoadBalancingRuleListResultPage +} + +// 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 *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.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 *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerLoadBalancingRuleListResultIterator) 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 LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { + 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 LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { + if !iter.page.NotDone() { + return LoadBalancingRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type. +func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator { + return LoadBalancerLoadBalancingRuleListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { + return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool { + return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0 +} + +// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lblbrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lblbrlr.NextLink))) +} + +// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. +type LoadBalancerLoadBalancingRuleListResultPage struct { + fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) + lblbrlr LoadBalancerLoadBalancingRuleListResult +} + +// 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 *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lblbrlr) + if err != nil { + return err + } + page.lblbrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LoadBalancerLoadBalancingRuleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { + return !page.lblbrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { + return page.lblbrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { + if page.lblbrlr.IsEmpty() { + return nil + } + return *page.lblbrlr.Value +} + +// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type. +func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { + return LoadBalancerLoadBalancingRuleListResultPage{ + fn: getNextPage, + lblbrlr: cur, + } +} + +// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call. +type LoadBalancerOutboundRuleListResult struct { + autorest.Response `json:"-"` + // Value - A list of outbound rules in a load balancer. + Value *[]OutboundRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult. +func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lborlr.Value != nil { + objectMap["value"] = lborlr.Value + } + return json.Marshal(objectMap) +} + +// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values. +type LoadBalancerOutboundRuleListResultIterator struct { + i int + page LoadBalancerOutboundRuleListResultPage +} + +// 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 *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.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 *LoadBalancerOutboundRuleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerOutboundRuleListResultIterator) 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 LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult { + 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 LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule { + if !iter.page.NotDone() { + return OutboundRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type. +func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator { + return LoadBalancerOutboundRuleListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool { + return lborlr.Value == nil || len(*lborlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool { + return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0 +} + +// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lborlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lborlr.NextLink))) +} + +// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values. +type LoadBalancerOutboundRuleListResultPage struct { + fn func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error) + lborlr LoadBalancerOutboundRuleListResult +} + +// 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 *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lborlr) + if err != nil { + return err + } + page.lborlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LoadBalancerOutboundRuleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool { + return !page.lborlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult { + return page.lborlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule { + if page.lborlr.IsEmpty() { + return nil + } + return *page.lborlr.Value +} + +// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type. +func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage { + return LoadBalancerOutboundRuleListResultPage{ + fn: getNextPage, + lborlr: cur, + } +} + +// LoadBalancerProbeListResult response for ListProbe API service call. +type LoadBalancerProbeListResult struct { + autorest.Response `json:"-"` + // Value - A list of probes in a load balancer. + Value *[]Probe `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult. +func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbplr.Value != nil { + objectMap["value"] = lbplr.Value + } + return json.Marshal(objectMap) +} + +// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. +type LoadBalancerProbeListResultIterator struct { + i int + page LoadBalancerProbeListResultPage +} + +// 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 *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.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 *LoadBalancerProbeListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerProbeListResultIterator) 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 LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { + 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 LoadBalancerProbeListResultIterator) Value() Probe { + if !iter.page.NotDone() { + return Probe{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LoadBalancerProbeListResultIterator type. +func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator { + return LoadBalancerProbeListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { + return lbplr.Value == nil || len(*lbplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lbplr LoadBalancerProbeListResult) hasNextLink() bool { + return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0 +} + +// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lbplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lbplr.NextLink))) +} + +// LoadBalancerProbeListResultPage contains a page of Probe values. +type LoadBalancerProbeListResultPage struct { + fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) + lbplr LoadBalancerProbeListResult +} + +// 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 *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lbplr) + if err != nil { + return err + } + page.lbplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LoadBalancerProbeListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerProbeListResultPage) NotDone() bool { + return !page.lbplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { + return page.lbplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerProbeListResultPage) Values() []Probe { + if page.lbplr.IsEmpty() { + return nil + } + return *page.lbplr.Value +} + +// Creates a new instance of the LoadBalancerProbeListResultPage type. +func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { + return LoadBalancerProbeListResultPage{ + fn: getNextPage, + lbplr: cur, + } +} + +// LoadBalancerPropertiesFormat properties of the load balancer. +type LoadBalancerPropertiesFormat struct { + // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer. + FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` + // BackendAddressPools - Collection of backend address pools used by a load balancer. + BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` + // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning. + LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` + // Probes - Collection of probe objects used in the load balancer. + Probes *[]Probe `json:"probes,omitempty"` + // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. + InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` + // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. + InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` + // OutboundRules - The outbound rules. + OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat. +func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbpf.FrontendIPConfigurations != nil { + objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations + } + if lbpf.BackendAddressPools != nil { + objectMap["backendAddressPools"] = lbpf.BackendAddressPools + } + if lbpf.LoadBalancingRules != nil { + objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules + } + if lbpf.Probes != nil { + objectMap["probes"] = lbpf.Probes + } + if lbpf.InboundNatRules != nil { + objectMap["inboundNatRules"] = lbpf.InboundNatRules + } + if lbpf.InboundNatPools != nil { + objectMap["inboundNatPools"] = lbpf.InboundNatPools + } + if lbpf.OutboundRules != nil { + objectMap["outboundRules"] = lbpf.OutboundRules + } + return json.Marshal(objectMap) +} + +// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LoadBalancersCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancersClient) (LoadBalancer, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result. +func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + lb.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { + lb, err = client.CreateOrUpdateResponder(lb.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") + } + } + return +} + +// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type LoadBalancersDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancersDeleteFuture.Result. +func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// LoadBalancerSku SKU of a load balancer. +type LoadBalancerSku struct { + // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard', 'LoadBalancerSkuNameGateway' + Name LoadBalancerSkuName `json:"name,omitempty"` + // Tier - Tier of a load balancer SKU. Possible values include: 'LoadBalancerSkuTierRegional', 'LoadBalancerSkuTierGlobal' + Tier LoadBalancerSkuTier `json:"tier,omitempty"` +} + +// LoadBalancersSwapPublicIPAddressesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LoadBalancersSwapPublicIPAddressesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancersSwapPublicIPAddressesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancersSwapPublicIPAddressesFuture.Result. +func (future *LoadBalancersSwapPublicIPAddressesFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersSwapPublicIPAddressesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersSwapPublicIPAddressesFuture") + return + } + ar.Response = future.Response() + return +} + +// LoadBalancerVipSwapRequest the request for a VIP swap. +type LoadBalancerVipSwapRequest struct { + // FrontendIPConfigurations - A list of frontend IP configuration resources that should swap VIPs. + FrontendIPConfigurations *[]LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` +} + +// LoadBalancerVipSwapRequestFrontendIPConfiguration VIP swap request's frontend IP configuration object. +type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { + // ID - The ID of frontend IP configuration resource. + ID *string `json:"id,omitempty"` + // LoadBalancerVipSwapRequestFrontendIPConfigurationProperties - The properties of VIP swap request's frontend IP configuration object. + *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerVipSwapRequestFrontendIPConfiguration. +func (lbvsrfic LoadBalancerVipSwapRequestFrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbvsrfic.ID != nil { + objectMap["id"] = lbvsrfic.ID + } + if lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties != nil { + objectMap["properties"] = lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancerVipSwapRequestFrontendIPConfiguration struct. +func (lbvsrfic *LoadBalancerVipSwapRequestFrontendIPConfiguration) 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 + } + lbvsrfic.ID = &ID + } + case "properties": + if v != nil { + var loadBalancerVipSwapRequestFrontendIPConfigurationProperties LoadBalancerVipSwapRequestFrontendIPConfigurationProperties + err = json.Unmarshal(*v, &loadBalancerVipSwapRequestFrontendIPConfigurationProperties) + if err != nil { + return err + } + lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties = &loadBalancerVipSwapRequestFrontendIPConfigurationProperties + } + } + } + + return nil +} + +// LoadBalancerVipSwapRequestFrontendIPConfigurationProperties the properties of VIP swap request's +// frontend IP configuration object. +type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { + // PublicIPAddress - A reference to public IP address resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` +} + +// LoadBalancingRule a load balancing rule for a load balancer. +type LoadBalancingRule struct { + autorest.Response `json:"-"` + // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. + *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancingRule. +func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbr.LoadBalancingRulePropertiesFormat != nil { + objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat + } + if lbr.Name != nil { + objectMap["name"] = lbr.Name + } + if lbr.ID != nil { + objectMap["id"] = lbr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. +func (lbr *LoadBalancingRule) 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 loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat + err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) + if err != nil { + return err + } + lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lbr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lbr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lbr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lbr.ID = &ID + } + } + } + + return nil +} + +// LoadBalancingRulePropertiesFormat properties of the load balancer. +type LoadBalancingRulePropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // BackendAddressPools - An array of references to pool of DIPs. + BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"` + // Probe - The reference to the load balancer probe used by the load balancing rule. + Probe *SubResource `json:"probe,omitempty"` + // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol' + LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` + // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. + DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat. +func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbrpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration + } + if lbrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = lbrpf.BackendAddressPool + } + if lbrpf.BackendAddressPools != nil { + objectMap["backendAddressPools"] = lbrpf.BackendAddressPools + } + if lbrpf.Probe != nil { + objectMap["probe"] = lbrpf.Probe + } + if lbrpf.Protocol != "" { + objectMap["protocol"] = lbrpf.Protocol + } + if lbrpf.LoadDistribution != "" { + objectMap["loadDistribution"] = lbrpf.LoadDistribution + } + if lbrpf.FrontendPort != nil { + objectMap["frontendPort"] = lbrpf.FrontendPort + } + if lbrpf.BackendPort != nil { + objectMap["backendPort"] = lbrpf.BackendPort + } + if lbrpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes + } + if lbrpf.EnableFloatingIP != nil { + objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP + } + if lbrpf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = lbrpf.EnableTCPReset + } + if lbrpf.DisableOutboundSnat != nil { + objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat + } + return json.Marshal(objectMap) +} + +// LocalNetworkGateway a common class for general resource information. +type LocalNetworkGateway struct { + autorest.Response `json:"-"` + // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. + *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 LocalNetworkGateway. +func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lng.LocalNetworkGatewayPropertiesFormat != nil { + objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat + } + if lng.ID != nil { + objectMap["id"] = lng.ID + } + if lng.Location != nil { + objectMap["location"] = lng.Location + } + if lng.Tags != nil { + objectMap["tags"] = lng.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. +func (lng *LocalNetworkGateway) 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 localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat + err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) + if err != nil { + return err + } + lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lng.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lng.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lng.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lng.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + lng.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + lng.Tags = tags + } + } + } + + return nil +} + +// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. +type LocalNetworkGatewayListResult struct { + autorest.Response `json:"-"` + // Value - A list of local network gateways that exists in a resource group. + Value *[]LocalNetworkGateway `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult. +func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lnglr.Value != nil { + objectMap["value"] = lnglr.Value + } + return json.Marshal(objectMap) +} + +// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway +// values. +type LocalNetworkGatewayListResultIterator struct { + i int + page LocalNetworkGatewayListResultPage +} + +// 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 *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.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 *LocalNetworkGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LocalNetworkGatewayListResultIterator) 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 LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { + 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 LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { + if !iter.page.NotDone() { + return LocalNetworkGateway{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LocalNetworkGatewayListResultIterator type. +func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { + return LocalNetworkGatewayListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { + return lnglr.Value == nil || len(*lnglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool { + return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0 +} + +// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { + if !lnglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lnglr.NextLink))) +} + +// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. +type LocalNetworkGatewayListResultPage struct { + fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) + lnglr LocalNetworkGatewayListResult +} + +// 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 *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lnglr) + if err != nil { + return err + } + page.lnglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LocalNetworkGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LocalNetworkGatewayListResultPage) NotDone() bool { + return !page.lnglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { + return page.lnglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { + if page.lnglr.IsEmpty() { + return nil + } + return *page.lnglr.Value +} + +// Creates a new instance of the LocalNetworkGatewayListResultPage type. +func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { + return LocalNetworkGatewayListResultPage{ + fn: getNextPage, + lnglr: cur, + } +} + +// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties. +type LocalNetworkGatewayPropertiesFormat struct { + // LocalNetworkAddressSpace - Local network site address space. + LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` + // GatewayIPAddress - IP address of local network gateway. + GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` + // Fqdn - FQDN of local network gateway. + Fqdn *string `json:"fqdn,omitempty"` + // BgpSettings - Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat. +func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lngpf.LocalNetworkAddressSpace != nil { + objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace + } + if lngpf.GatewayIPAddress != nil { + objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress + } + if lngpf.Fqdn != nil { + objectMap["fqdn"] = lngpf.Fqdn + } + if lngpf.BgpSettings != nil { + objectMap["bgpSettings"] = lngpf.BgpSettings + } + return json.Marshal(objectMap) +} + +// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result. +func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + lng.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { + lng, err = client.CreateOrUpdateResponder(lng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") + } + } + return +} + +// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LocalNetworkGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result. +func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// LogSpecification description of logging specification. +type LogSpecification struct { + // Name - The name of the specification. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the specification. + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - Duration of the blob. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// ManagedRuleGroupOverride defines a managed rule group override setting. +type ManagedRuleGroupOverride struct { + // RuleGroupName - The managed rule group to override. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled. + Rules *[]ManagedRuleOverride `json:"rules,omitempty"` +} + +// ManagedRuleOverride defines a managed rule group override setting. +type ManagedRuleOverride struct { + // RuleID - Identifier for the managed rule. + RuleID *string `json:"ruleId,omitempty"` + // State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled' + State ManagedRuleEnabledState `json:"state,omitempty"` +} + +// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check. +type ManagedRulesDefinition struct { + // Exclusions - The Exclusions that are applied on the policy. + Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"` + // ManagedRuleSets - The managed rule sets that are associated with the policy. + ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"` +} + +// ManagedRuleSet defines a managed rule set. +type ManagedRuleSet struct { + // RuleSetType - Defines the rule set type to use. + RuleSetType *string `json:"ruleSetType,omitempty"` + // RuleSetVersion - Defines the version of the rule set to use. + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` + // RuleGroupOverrides - Defines the rule group overrides to apply to the rule set. + RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` +} + +// ManagedServiceIdentity identity for the resource. +type ManagedServiceIdentity struct { + // PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ManagedServiceIdentity. +func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msi.Type != "" { + objectMap["type"] = msi.Type + } + if msi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// ManagedServiceIdentityUserAssignedIdentitiesValue ... +type ManagedServiceIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - READ-ONLY; The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue. +func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// MatchCondition define match conditions. +type MatchCondition struct { + // MatchVariables - List of match variables. + MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"` + // Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch' + Operator WebApplicationFirewallOperator `json:"operator,omitempty"` + // NegationConditon - Whether this is negate condition or not. + NegationConditon *bool `json:"negationConditon,omitempty"` + // MatchValues - Match value. + MatchValues *[]string `json:"matchValues,omitempty"` + // Transforms - List of transforms. + Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"` +} + +// MatchedRule matched rule. +type MatchedRule struct { + // RuleName - Name of the matched network security rule. + RuleName *string `json:"ruleName,omitempty"` + // Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + Action *string `json:"action,omitempty"` +} + +// MatchVariable define match variables. +type MatchVariable struct { + // VariableName - Match Variable. Possible values include: 'WebApplicationFirewallMatchVariableRemoteAddr', 'WebApplicationFirewallMatchVariableRequestMethod', 'WebApplicationFirewallMatchVariableQueryString', 'WebApplicationFirewallMatchVariablePostArgs', 'WebApplicationFirewallMatchVariableRequestURI', 'WebApplicationFirewallMatchVariableRequestHeaders', 'WebApplicationFirewallMatchVariableRequestBody', 'WebApplicationFirewallMatchVariableRequestCookies' + VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"` + // Selector - The selector of match variable. + Selector *string `json:"selector,omitempty"` +} + +// MetricSpecification description of metrics specification. +type MetricSpecification struct { + // Name - The name of the metric. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the metric. + DisplayName *string `json:"displayName,omitempty"` + // DisplayDescription - The description of the metric. + DisplayDescription *string `json:"displayDescription,omitempty"` + // Unit - Units the metric to be displayed in. + Unit *string `json:"unit,omitempty"` + // AggregationType - The aggregation type. + AggregationType *string `json:"aggregationType,omitempty"` + // Availabilities - List of availability. + Availabilities *[]Availability `json:"availabilities,omitempty"` + // EnableRegionalMdmAccount - Whether regional MDM account enabled. + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + // FillGapWithZero - Whether gaps would be filled with zeros. + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + // MetricFilterPattern - Pattern for the filter of the metric. + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` + // Dimensions - List of dimensions. + Dimensions *[]Dimension `json:"dimensions,omitempty"` + // IsInternal - Whether the metric is internal. + IsInternal *bool `json:"isInternal,omitempty"` + // SourceMdmAccount - The source MDM account. + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + // SourceMdmNamespace - The source MDM namespace. + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + // ResourceIDDimensionNameOverride - The resource Id dimension name override. + ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` +} + +// NatGateway nat Gateway resource. +type NatGateway struct { + autorest.Response `json:"-"` + // Sku - The nat gateway SKU. + Sku *NatGatewaySku `json:"sku,omitempty"` + // NatGatewayPropertiesFormat - Nat Gateway properties. + *NatGatewayPropertiesFormat `json:"properties,omitempty"` + // Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed. + Zones *[]string `json:"zones,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 NatGateway. +func (ng NatGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ng.Sku != nil { + objectMap["sku"] = ng.Sku + } + if ng.NatGatewayPropertiesFormat != nil { + objectMap["properties"] = ng.NatGatewayPropertiesFormat + } + if ng.Zones != nil { + objectMap["zones"] = ng.Zones + } + if ng.ID != nil { + objectMap["id"] = ng.ID + } + if ng.Location != nil { + objectMap["location"] = ng.Location + } + if ng.Tags != nil { + objectMap["tags"] = ng.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for NatGateway struct. +func (ng *NatGateway) 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 "sku": + if v != nil { + var sku NatGatewaySku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + ng.Sku = &sku + } + case "properties": + if v != nil { + var natGatewayPropertiesFormat NatGatewayPropertiesFormat + err = json.Unmarshal(*v, &natGatewayPropertiesFormat) + if err != nil { + return err + } + ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + ng.Zones = &zones + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ng.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ng.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ng.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ng.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ng.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ng.Tags = tags + } + } + } + + return nil +} + +// NatGatewayListResult response for ListNatGateways API service call. +type NatGatewayListResult struct { + autorest.Response `json:"-"` + // Value - A list of Nat Gateways that exists in a resource group. + Value *[]NatGateway `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// NatGatewayListResultIterator provides access to a complete listing of NatGateway values. +type NatGatewayListResultIterator struct { + i int + page NatGatewayListResultPage +} + +// 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 *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.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 *NatGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter NatGatewayListResultIterator) 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 NatGatewayListResultIterator) Response() NatGatewayListResult { + 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 NatGatewayListResultIterator) Value() NatGateway { + if !iter.page.NotDone() { + return NatGateway{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the NatGatewayListResultIterator type. +func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator { + return NatGatewayListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (nglr NatGatewayListResult) IsEmpty() bool { + return nglr.Value == nil || len(*nglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (nglr NatGatewayListResult) hasNextLink() bool { + return nglr.NextLink != nil && len(*nglr.NextLink) != 0 +} + +// natGatewayListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { + if !nglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(nglr.NextLink))) +} + +// NatGatewayListResultPage contains a page of NatGateway values. +type NatGatewayListResultPage struct { + fn func(context.Context, NatGatewayListResult) (NatGatewayListResult, error) + nglr NatGatewayListResult +} + +// 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 *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.nglr) + if err != nil { + return err + } + page.nglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *NatGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page NatGatewayListResultPage) NotDone() bool { + return !page.nglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page NatGatewayListResultPage) Response() NatGatewayListResult { + return page.nglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page NatGatewayListResultPage) Values() []NatGateway { + if page.nglr.IsEmpty() { + return nil + } + return *page.nglr.Value +} + +// Creates a new instance of the NatGatewayListResultPage type. +func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage { + return NatGatewayListResultPage{ + fn: getNextPage, + nglr: cur, + } +} + +// NatGatewayPropertiesFormat nat Gateway properties. +type NatGatewayPropertiesFormat struct { + // IdleTimeoutInMinutes - The idle timeout of the nat gateway. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource. + PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` + // PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource. + PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` + // Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource. + Subnets *[]SubResource `json:"subnets,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat. +func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ngpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes + } + if ngpf.PublicIPAddresses != nil { + objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses + } + if ngpf.PublicIPPrefixes != nil { + objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes + } + return json.Marshal(objectMap) +} + +// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type NatGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(NatGatewaysClient) (NatGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result. +func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ng.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent { + ng, err = client.CreateOrUpdateResponder(ng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request") + } + } + return +} + +// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type NatGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(NatGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for NatGatewaysDeleteFuture.Result. +func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// NatGatewaySku SKU of nat gateway. +type NatGatewaySku struct { + // Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard' + Name NatGatewaySkuName `json:"name,omitempty"` +} + +// NatRule rule of type nat. +type NatRule struct { + // IPProtocols - Array of FirewallPolicyRuleNetworkProtocols. + IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses or Service Tags. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // DestinationPorts - List of destination ports. + DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // TranslatedAddress - The translated address for this NAT rule. + TranslatedAddress *string `json:"translatedAddress,omitempty"` + // TranslatedPort - The translated port for this NAT rule. + TranslatedPort *string `json:"translatedPort,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` + // TranslatedFqdn - The translated FQDN for this NAT rule. + TranslatedFqdn *string `json:"translatedFqdn,omitempty"` + // Name - Name of the rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule' + RuleType RuleType `json:"ruleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for NatRule. +func (nr NatRule) MarshalJSON() ([]byte, error) { + nr.RuleType = RuleTypeNatRule + objectMap := make(map[string]interface{}) + if nr.IPProtocols != nil { + objectMap["ipProtocols"] = nr.IPProtocols + } + if nr.SourceAddresses != nil { + objectMap["sourceAddresses"] = nr.SourceAddresses + } + if nr.DestinationAddresses != nil { + objectMap["destinationAddresses"] = nr.DestinationAddresses + } + if nr.DestinationPorts != nil { + objectMap["destinationPorts"] = nr.DestinationPorts + } + if nr.TranslatedAddress != nil { + objectMap["translatedAddress"] = nr.TranslatedAddress + } + if nr.TranslatedPort != nil { + objectMap["translatedPort"] = nr.TranslatedPort + } + if nr.SourceIPGroups != nil { + objectMap["sourceIpGroups"] = nr.SourceIPGroups + } + if nr.TranslatedFqdn != nil { + objectMap["translatedFqdn"] = nr.TranslatedFqdn + } + if nr.Name != nil { + objectMap["name"] = nr.Name + } + if nr.Description != nil { + objectMap["description"] = nr.Description + } + if nr.RuleType != "" { + objectMap["ruleType"] = nr.RuleType + } + return json.Marshal(objectMap) +} + +// AsApplicationRule is the BasicFirewallPolicyRule implementation for NatRule. +func (nr NatRule) AsApplicationRule() (*ApplicationRule, bool) { + return nil, false +} + +// AsNatRule is the BasicFirewallPolicyRule implementation for NatRule. +func (nr NatRule) AsNatRule() (*NatRule, bool) { + return &nr, true +} + +// AsRule is the BasicFirewallPolicyRule implementation for NatRule. +func (nr NatRule) AsRule() (*Rule, bool) { + return nil, false +} + +// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule. +func (nr NatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule. +func (nr NatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { + return &nr, true +} + +// NatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type NatRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(NatRulesClient) (VpnGatewayNatRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *NatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for NatRulesCreateOrUpdateFuture.Result. +func (future *NatRulesCreateOrUpdateFuture) result(client NatRulesClient) (vgnr VpnGatewayNatRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vgnr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.NatRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vgnr.Response.Response, err = future.GetResult(sender); err == nil && vgnr.Response.Response.StatusCode != http.StatusNoContent { + vgnr, err = client.CreateOrUpdateResponder(vgnr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesCreateOrUpdateFuture", "Result", vgnr.Response.Response, "Failure responding to request") + } + } + return +} + +// NatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type NatRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(NatRulesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *NatRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for NatRulesDeleteFuture.Result. +func (future *NatRulesDeleteFuture) result(client NatRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.NatRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// NextHopParameters parameters that define the source and destination endpoint. +type NextHopParameters struct { + // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // SourceIPAddress - The source IP address. + SourceIPAddress *string `json:"sourceIPAddress,omitempty"` + // DestinationIPAddress - The destination IP address. + DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` + // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` +} + +// NextHopResult the information about next hop from the specified VM. +type NextHopResult struct { + autorest.Response `json:"-"` + // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' + NextHopType NextHopType `json:"nextHopType,omitempty"` + // NextHopIPAddress - Next hop IP Address. + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` + // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. + RouteTableID *string `json:"routeTableId,omitempty"` +} + +// O365BreakOutCategoryPolicies office365 breakout categories. +type O365BreakOutCategoryPolicies struct { + // Allow - Flag to control allow category. + Allow *bool `json:"allow,omitempty"` + // Optimize - Flag to control optimize category. + Optimize *bool `json:"optimize,omitempty"` + // Default - Flag to control default category. + Default *bool `json:"default,omitempty"` +} + +// O365PolicyProperties the Office365 breakout policy. +type O365PolicyProperties struct { + // BreakOutCategories - Office365 breakout categories. + BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` +} + +// Office365PolicyProperties network Virtual Appliance Sku Properties. +type Office365PolicyProperties struct { + // BreakOutCategories - Office 365 breakout categories. + BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` +} + +// Operation network REST API operation definition. +type Operation struct { + // Name - Operation name: {provider}/{resource}/{operation}. + Name *string `json:"name,omitempty"` + // Display - Display metadata associated with the operation. + Display *OperationDisplay `json:"display,omitempty"` + // Origin - Origin of the operation. + Origin *string `json:"origin,omitempty"` + // OperationPropertiesFormat - Operation properties format. + *OperationPropertiesFormat `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if o.Name != nil { + objectMap["name"] = o.Name + } + if o.Display != nil { + objectMap["display"] = o.Display + } + if o.Origin != nil { + objectMap["origin"] = o.Origin + } + if o.OperationPropertiesFormat != nil { + objectMap["properties"] = o.OperationPropertiesFormat + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Operation struct. +func (o *Operation) 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 + } + o.Name = &name + } + case "display": + if v != nil { + var display OperationDisplay + err = json.Unmarshal(*v, &display) + if err != nil { + return err + } + o.Display = &display + } + case "origin": + if v != nil { + var origin string + err = json.Unmarshal(*v, &origin) + if err != nil { + return err + } + o.Origin = &origin + } + case "properties": + if v != nil { + var operationPropertiesFormat OperationPropertiesFormat + err = json.Unmarshal(*v, &operationPropertiesFormat) + if err != nil { + return err + } + o.OperationPropertiesFormat = &operationPropertiesFormat + } + } + } + + return nil +} + +// OperationDisplay display metadata associated with the operation. +type OperationDisplay struct { + // Provider - Service provider: Microsoft Network. + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed. + Resource *string `json:"resource,omitempty"` + // Operation - Type of the operation: get, read, delete, etc. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation. + Description *string `json:"description,omitempty"` +} + +// OperationListResult result of the request to list Network 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 Network operations supported by the Network resource provider. + 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 +} + +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 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.hasNextLink() { + 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) + }() + } + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } +} + +// OperationPropertiesFormat description of operation properties format. +type OperationPropertiesFormat struct { + // ServiceSpecification - Specification of the service. + ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// OperationPropertiesFormatServiceSpecification specification of the service. +type OperationPropertiesFormatServiceSpecification struct { + // MetricSpecifications - Operation service specification. + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` + // LogSpecifications - Operation log specification. + LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` +} + +// OutboundRule outbound rule of the load balancer. +type OutboundRule struct { + autorest.Response `json:"-"` + // OutboundRulePropertiesFormat - Properties of load balancer outbound rule. + *OutboundRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for OutboundRule. +func (or OutboundRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if or.OutboundRulePropertiesFormat != nil { + objectMap["properties"] = or.OutboundRulePropertiesFormat + } + if or.Name != nil { + objectMap["name"] = or.Name + } + if or.ID != nil { + objectMap["id"] = or.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OutboundRule struct. +func (or *OutboundRule) 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 outboundRulePropertiesFormat OutboundRulePropertiesFormat + err = json.Unmarshal(*v, &outboundRulePropertiesFormat) + if err != nil { + return err + } + or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + or.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + or.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + or.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + or.ID = &ID + } + } + } + + return nil +} + +// OutboundRulePropertiesFormat outbound rule of the load balancer. +type OutboundRulePropertiesFormat struct { + // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. + AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` + // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. + FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` + // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll' + Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` +} + +// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat. +func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if orpf.AllocatedOutboundPorts != nil { + objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts + } + if orpf.FrontendIPConfigurations != nil { + objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations + } + if orpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = orpf.BackendAddressPool + } + if orpf.Protocol != "" { + objectMap["protocol"] = orpf.Protocol + } + if orpf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = orpf.EnableTCPReset + } + if orpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes + } + return json.Marshal(objectMap) +} + +// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check. +type OwaspCrsExclusionEntry struct { + // MatchVariable - The variable to be excluded. Possible values include: 'OwaspCrsExclusionEntryMatchVariableRequestHeaderNames', 'OwaspCrsExclusionEntryMatchVariableRequestCookieNames', 'OwaspCrsExclusionEntryMatchVariableRequestArgNames' + MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"` + // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. Possible values include: 'OwaspCrsExclusionEntrySelectorMatchOperatorEquals', 'OwaspCrsExclusionEntrySelectorMatchOperatorContains', 'OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny' + SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"` + // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + Selector *string `json:"selector,omitempty"` +} + +// P2SConnectionConfiguration p2SConnectionConfiguration Resource. +type P2SConnectionConfiguration struct { + // P2SConnectionConfigurationProperties - Properties of the P2S connection configuration. + *P2SConnectionConfigurationProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for P2SConnectionConfiguration. +func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcc.P2SConnectionConfigurationProperties != nil { + objectMap["properties"] = pcc.P2SConnectionConfigurationProperties + } + if pcc.Name != nil { + objectMap["name"] = pcc.Name + } + if pcc.ID != nil { + objectMap["id"] = pcc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct. +func (pcc *P2SConnectionConfiguration) 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 p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties + err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties) + if err != nil { + return err + } + pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pcc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcc.ID = &ID + } + } + } + + return nil +} + +// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration. +type P2SConnectionConfigurationProperties struct { + // VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient. + VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` + // RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` + // EnableInternetSecurity - Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties. +func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pccp.VpnClientAddressPool != nil { + objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool + } + if pccp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = pccp.RoutingConfiguration + } + if pccp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = pccp.EnableInternetSecurity + } + return json.Marshal(objectMap) +} + +// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url. +type P2SVpnConnectionHealth struct { + autorest.Response `json:"-"` + // SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written. + SasURL *string `json:"sasUrl,omitempty"` +} + +// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request. +type P2SVpnConnectionHealthRequest struct { + // VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. + VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"` + // OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail. + OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` +} + +// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected. +type P2SVpnConnectionRequest struct { + // VpnConnectionIds - List of p2s vpn connection Ids. + VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"` +} + +// P2SVpnGateway p2SVpnGateway Resource. +type P2SVpnGateway struct { + autorest.Response `json:"-"` + // P2SVpnGatewayProperties - Properties of the P2SVpnGateway. + *P2SVpnGatewayProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 P2SVpnGateway. +func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvg.P2SVpnGatewayProperties != nil { + objectMap["properties"] = pvg.P2SVpnGatewayProperties + } + if pvg.ID != nil { + objectMap["id"] = pvg.ID + } + if pvg.Location != nil { + objectMap["location"] = pvg.Location + } + if pvg.Tags != nil { + objectMap["tags"] = pvg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct. +func (pvg *P2SVpnGateway) 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 p2SVpnGatewayProperties P2SVpnGatewayProperties + err = json.Unmarshal(*v, &p2SVpnGatewayProperties) + if err != nil { + return err + } + pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pvg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pvg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pvg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pvg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pvg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pvg.Tags = tags + } + } + } + + return nil +} + +// P2SVpnGatewayProperties parameters for P2SVpnGateway. +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"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + 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 *SubResource `json:"vpnServerConfiguration,omitempty"` + // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. + VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` + // CustomDNSServers - List of all customer specified DNS servers IP addresses. + CustomDNSServers *[]string `json:"customDnsServers,omitempty"` + // IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway. + IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` +} + +// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties. +func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvgp.VirtualHub != nil { + objectMap["virtualHub"] = pvgp.VirtualHub + } + if pvgp.P2SConnectionConfigurations != nil { + objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations + } + if pvgp.VpnGatewayScaleUnit != nil { + objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit + } + if pvgp.VpnServerConfiguration != nil { + objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration + } + if pvgp.CustomDNSServers != nil { + objectMap["customDnsServers"] = pvgp.CustomDNSServers + } + if pvgp.IsRoutingPreferenceInternet != nil { + objectMap["isRoutingPreferenceInternet"] = pvgp.IsRoutingPreferenceInternet + } + return json.Marshal(objectMap) +} + +// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result. +func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pvg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request") + } + } + return +} + +// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type P2sVpnGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result. +func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture.Result. +func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture") + return + } + ar.Response = future.Response() + return +} + +// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnGatewaysGenerateVpnProfileFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result. +func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vpr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent { + vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request") + } + } + return +} + +// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result. +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) result(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pvch.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent { + pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request") + } + } + return +} + +// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result. +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pvg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request") + } + } + return +} + +// P2SVpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type P2SVpnGatewaysResetFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2SVpnGatewaysResetFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2SVpnGatewaysResetFuture.Result. +func (future *P2SVpnGatewaysResetFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2SVpnGatewaysResetFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pvg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2SVpnGatewaysResetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.ResetResponder(pvg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2SVpnGatewaysResetFuture", "Result", pvg.Response.Response, "Failure responding to request") + } + } + return +} + +// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnGatewaysUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result. +func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pvg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.UpdateTagsResponder(pvg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request") + } + } + return +} + +// P2SVpnProfileParameters vpn Client Parameters for package generation. +type P2SVpnProfileParameters struct { + // AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2' + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` +} + +// PacketCapture parameters that define the create packet capture operation. +type PacketCapture struct { + // PacketCaptureParameters - Properties of the packet capture. + *PacketCaptureParameters `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PacketCapture. +func (pc PacketCapture) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pc.PacketCaptureParameters != nil { + objectMap["properties"] = pc.PacketCaptureParameters + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. +func (pc *PacketCapture) 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 packetCaptureParameters PacketCaptureParameters + err = json.Unmarshal(*v, &packetCaptureParameters) + if err != nil { + return err + } + pc.PacketCaptureParameters = &packetCaptureParameters + } + } + } + + return nil +} + +// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. +type PacketCaptureFilter struct { + // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' + Protocol PcProtocol `json:"protocol,omitempty"` + // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalIPAddress *string `json:"localIPAddress,omitempty"` + // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` + // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalPort *string `json:"localPort,omitempty"` + // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemotePort *string `json:"remotePort,omitempty"` +} + +// PacketCaptureListResult list of packet capture sessions. +type PacketCaptureListResult struct { + autorest.Response `json:"-"` + // Value - Information about packet capture sessions. + Value *[]PacketCaptureResult `json:"value,omitempty"` +} + +// PacketCaptureParameters parameters that define the create packet capture operation. +type PacketCaptureParameters struct { + // Target - The ID of the targeted resource, only VM is currently supported. + Target *string `json:"target,omitempty"` + // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` + // TimeLimitInSeconds - Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` + // StorageLocation - The storage location for a packet capture session. + StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` + // Filters - A list of packet capture filters. + Filters *[]PacketCaptureFilter `json:"filters,omitempty"` +} + +// PacketCaptureQueryStatusResult status of packet capture session. +type PacketCaptureQueryStatusResult struct { + autorest.Response `json:"-"` + // Name - The name of the packet capture resource. + Name *string `json:"name,omitempty"` + // ID - The ID of the packet capture resource. + ID *string `json:"id,omitempty"` + // CaptureStartTime - The start time of the packet capture session. + CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` + // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' + PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` + // StopReason - The reason the current packet capture session was stopped. + StopReason *string `json:"stopReason,omitempty"` + // PacketCaptureError - List of errors of packet capture session. + PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` +} + +// PacketCaptureResult information about packet capture session. +type PacketCaptureResult struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; Name of the packet capture session. + Name *string `json:"name,omitempty"` + // ID - READ-ONLY; ID of the packet capture operation. + ID *string `json:"id,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // PacketCaptureResultProperties - Properties of the packet capture result. + *PacketCaptureResultProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PacketCaptureResult. +func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcr.PacketCaptureResultProperties != nil { + objectMap["properties"] = pcr.PacketCaptureResultProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. +func (pcr *PacketCaptureResult) 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 + } + pcr.Name = &name + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pcr.Etag = &etag + } + case "properties": + if v != nil { + var packetCaptureResultProperties PacketCaptureResultProperties + err = json.Unmarshal(*v, &packetCaptureResultProperties) + if err != nil { + return err + } + pcr.PacketCaptureResultProperties = &packetCaptureResultProperties + } + } + } + + return nil +} + +// PacketCaptureResultProperties the properties of a packet capture session. +type PacketCaptureResultProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Target - The ID of the targeted resource, only VM is currently supported. + Target *string `json:"target,omitempty"` + // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` + // TimeLimitInSeconds - Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` + // StorageLocation - The storage location for a packet capture session. + StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` + // Filters - A list of packet capture filters. + Filters *[]PacketCaptureFilter `json:"filters,omitempty"` +} + +// MarshalJSON is the custom marshaler for PacketCaptureResultProperties. +func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcrp.Target != nil { + objectMap["target"] = pcrp.Target + } + if pcrp.BytesToCapturePerPacket != nil { + objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket + } + if pcrp.TotalBytesPerSession != nil { + objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession + } + if pcrp.TimeLimitInSeconds != nil { + objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds + } + if pcrp.StorageLocation != nil { + objectMap["storageLocation"] = pcrp.StorageLocation + } + if pcrp.Filters != nil { + objectMap["filters"] = pcrp.Filters + } + return json.Marshal(objectMap) +} + +// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PacketCapturesClient) (PacketCaptureResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PacketCapturesCreateFuture.Result. +func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pcr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { + pcr, err = client.CreateResponder(pcr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") + } + } + return +} + +// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PacketCapturesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PacketCapturesDeleteFuture.Result. +func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesGetStatusFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PacketCapturesGetStatusFuture.Result. +func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pcqsr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { + pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") + } + } + return +} + +// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesStopFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PacketCapturesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PacketCapturesStopFuture.Result. +func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") + return + } + ar.Response = future.Response() + return +} + +// PacketCaptureStorageLocation the storage location for a packet capture session. +type PacketCaptureStorageLocation struct { + // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. + StorageID *string `json:"storageId,omitempty"` + // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. + StoragePath *string `json:"storagePath,omitempty"` + // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. + FilePath *string `json:"filePath,omitempty"` +} + +// PatchRouteFilter route Filter Resource. +type PatchRouteFilter struct { + // RouteFilterPropertiesFormat - Properties of the route filter. + *RouteFilterPropertiesFormat `json:"properties,omitempty"` + // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PatchRouteFilter. +func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if prf.RouteFilterPropertiesFormat != nil { + objectMap["properties"] = prf.RouteFilterPropertiesFormat + } + if prf.Tags != nil { + objectMap["tags"] = prf.Tags + } + if prf.ID != nil { + objectMap["id"] = prf.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. +func (prf *PatchRouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat + err = json.Unmarshal(*v, &routeFilterPropertiesFormat) + if err != nil { + return err + } + prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + prf.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + prf.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + prf.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + prf.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + prf.ID = &ID + } + } + } + + return nil +} + +// PatchRouteFilterRule route Filter Rule Resource. +type PatchRouteFilterRule struct { + // RouteFilterRulePropertiesFormat - Properties of the route filter rule. + *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` + // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PatchRouteFilterRule. +func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if prfr.RouteFilterRulePropertiesFormat != nil { + objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat + } + if prfr.ID != nil { + objectMap["id"] = prfr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. +func (prfr *PatchRouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat + err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) + if err != nil { + return err + } + prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + prfr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + prfr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + prfr.ID = &ID + } + } + } + + return nil +} + +// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering +// resource. +type PeerExpressRouteCircuitConnection struct { + autorest.Response `json:"-"` + // PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection. + *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection. +func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil { + objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat + } + if percc.Name != nil { + objectMap["name"] = percc.Name + } + if percc.ID != nil { + objectMap["id"] = percc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct. +func (percc *PeerExpressRouteCircuitConnection) 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 peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat + err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat) + if err != nil { + return err + } + percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + percc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + percc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + percc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + percc.ID = &ID + } + } + } + + return nil +} + +// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call +// retrieves all global reach peer circuit connections that belongs to a Private Peering for an +// ExpressRouteCircuit. +type PeerExpressRouteCircuitConnectionListResult struct { + autorest.Response `json:"-"` + // Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit. + Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of +// PeerExpressRouteCircuitConnection values. +type PeerExpressRouteCircuitConnectionListResultIterator struct { + i int + page PeerExpressRouteCircuitConnectionListResultPage +} + +// 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 *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.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 *PeerExpressRouteCircuitConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PeerExpressRouteCircuitConnectionListResultIterator) 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 PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult { + 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 PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection { + if !iter.page.NotDone() { + return PeerExpressRouteCircuitConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type. +func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator { + return PeerExpressRouteCircuitConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool { + return percclr.Value == nil || len(*percclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool { + return percclr.NextLink != nil && len(*percclr.NextLink) != 0 +} + +// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !percclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(percclr.NextLink))) +} + +// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection +// values. +type PeerExpressRouteCircuitConnectionListResultPage struct { + fn func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error) + percclr PeerExpressRouteCircuitConnectionListResult +} + +// 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 *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.percclr) + if err != nil { + return err + } + page.percclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PeerExpressRouteCircuitConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool { + return !page.percclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult { + return page.percclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection { + if page.percclr.IsEmpty() { + return nil + } + return *page.percclr.Value +} + +// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type. +func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage { + return PeerExpressRouteCircuitConnectionListResultPage{ + fn: getNextPage, + percclr: cur, + } +} + +// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit +// connection. +type PeerExpressRouteCircuitConnectionPropertiesFormat struct { + // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit. + ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` + // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` + // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` + // ConnectionName - The name of the express route circuit connection resource. + ConnectionName *string `json:"connectionName,omitempty"` + // AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection. + AuthResourceGUID *string `json:"authResourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat. +func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if perccpf.ExpressRouteCircuitPeering != nil { + objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering + } + if perccpf.PeerExpressRouteCircuitPeering != nil { + objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering + } + if perccpf.AddressPrefix != nil { + objectMap["addressPrefix"] = perccpf.AddressPrefix + } + if perccpf.CircuitConnectionStatus != "" { + objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus + } + if perccpf.ConnectionName != nil { + objectMap["connectionName"] = perccpf.ConnectionName + } + if perccpf.AuthResourceGUID != nil { + objectMap["authResourceGuid"] = perccpf.AuthResourceGUID + } + return json.Marshal(objectMap) +} + +// PeerRoute peer routing details. +type PeerRoute struct { + // LocalAddress - READ-ONLY; The peer's local address. + LocalAddress *string `json:"localAddress,omitempty"` + // NetworkProperty - READ-ONLY; The route's network prefix. + NetworkProperty *string `json:"network,omitempty"` + // NextHop - READ-ONLY; The route's next hop. + NextHop *string `json:"nextHop,omitempty"` + // SourcePeer - READ-ONLY; The peer this route was learned from. + SourcePeer *string `json:"sourcePeer,omitempty"` + // Origin - READ-ONLY; The source this route was learned from. + Origin *string `json:"origin,omitempty"` + // AsPath - READ-ONLY; The route's AS path sequence. + AsPath *string `json:"asPath,omitempty"` + // Weight - READ-ONLY; The route's weight. + Weight *int32 `json:"weight,omitempty"` +} + +// MarshalJSON is the custom marshaler for PeerRoute. +func (pr PeerRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PeerRouteList list of virtual router peer routes. +type PeerRouteList struct { + autorest.Response `json:"-"` + // Value - List of peer routes. + Value *[]PeerRoute `json:"value,omitempty"` +} + +// PolicySettings defines contents of a web application firewall global configuration. +type PolicySettings struct { + // State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled' + State WebApplicationFirewallEnabledState `json:"state,omitempty"` + // Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection' + Mode WebApplicationFirewallMode `json:"mode,omitempty"` + // RequestBodyCheck - Whether to allow WAF to check request Body. + RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` + // MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF. + MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"` + // FileUploadLimitInMb - Maximum file upload size in Mb for WAF. + FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"` +} + +// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet. +type PrepareNetworkPoliciesRequest struct { + // ServiceName - The name of the service for which subnet is being prepared for. + ServiceName *string `json:"serviceName,omitempty"` + // NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration. + NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"` +} + +// PrivateDNSZoneConfig privateDnsZoneConfig resource. +type PrivateDNSZoneConfig struct { + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration. + *PrivateDNSZonePropertiesFormat `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig. +func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzc.Name != nil { + objectMap["name"] = pdzc.Name + } + if pdzc.PrivateDNSZonePropertiesFormat != nil { + objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct. +func (pdzc *PrivateDNSZoneConfig) 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 + } + pdzc.Name = &name + } + case "properties": + if v != nil { + var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat + err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat) + if err != nil { + return err + } + pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat + } + } + } + + return nil +} + +// PrivateDNSZoneGroup private dns zone group resource. +type PrivateDNSZoneGroup struct { + autorest.Response `json:"-"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group. + *PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup. +func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzg.Name != nil { + objectMap["name"] = pdzg.Name + } + if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil { + objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat + } + if pdzg.ID != nil { + objectMap["id"] = pdzg.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct. +func (pdzg *PrivateDNSZoneGroup) 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 + } + pdzg.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pdzg.Etag = &etag + } + case "properties": + if v != nil { + var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat + err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat) + if err != nil { + return err + } + pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pdzg.ID = &ID + } + } + } + + return nil +} + +// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call. +type PrivateDNSZoneGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of private dns zone group resources in a private endpoint. + Value *[]PrivateDNSZoneGroup `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult. +func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzglr.Value != nil { + objectMap["value"] = pdzglr.Value + } + return json.Marshal(objectMap) +} + +// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup +// values. +type PrivateDNSZoneGroupListResultIterator struct { + i int + page PrivateDNSZoneGroupListResultPage +} + +// 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 *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.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 *PrivateDNSZoneGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateDNSZoneGroupListResultIterator) 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 PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult { + 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 PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup { + if !iter.page.NotDone() { + return PrivateDNSZoneGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type. +func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator { + return PrivateDNSZoneGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool { + return pdzglr.Value == nil || len(*pdzglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool { + return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0 +} + +// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !pdzglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pdzglr.NextLink))) +} + +// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values. +type PrivateDNSZoneGroupListResultPage struct { + fn func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error) + pdzglr PrivateDNSZoneGroupListResult +} + +// 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 *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.pdzglr) + if err != nil { + return err + } + page.pdzglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateDNSZoneGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateDNSZoneGroupListResultPage) NotDone() bool { + return !page.pdzglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult { + return page.pdzglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup { + if page.pdzglr.IsEmpty() { + return nil + } + return *page.pdzglr.Value +} + +// Creates a new instance of the PrivateDNSZoneGroupListResultPage type. +func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage { + return PrivateDNSZoneGroupListResultPage{ + fn: getNextPage, + pdzglr: cur, + } +} + +// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group. +type PrivateDNSZoneGroupPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group. + PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat. +func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzgpf.PrivateDNSZoneConfigs != nil { + objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs + } + return json.Marshal(objectMap) +} + +// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateDNSZoneGroupsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateDNSZoneGroupsCreateOrUpdateFuture.Result. +func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) result(client PrivateDNSZoneGroupsClient) (pdzg PrivateDNSZoneGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pdzg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pdzg.Response.Response, err = future.GetResult(sender); err == nil && pdzg.Response.Response.StatusCode != http.StatusNoContent { + pdzg, err = client.CreateOrUpdateResponder(pdzg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", pdzg.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateDNSZoneGroupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateDNSZoneGroupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateDNSZoneGroupsDeleteFuture.Result. +func (future *PrivateDNSZoneGroupsDeleteFuture) result(client PrivateDNSZoneGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource. +type PrivateDNSZonePropertiesFormat struct { + // PrivateDNSZoneID - The resource id of the private dns zone. + PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"` + // RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources. + RecordSets *[]RecordSet `json:"recordSets,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat. +func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzpf.PrivateDNSZoneID != nil { + objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID + } + return json.Marshal(objectMap) +} + +// PrivateEndpoint private endpoint resource. +type PrivateEndpoint struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the load balancer. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // PrivateEndpointProperties - Properties of the private endpoint. + *PrivateEndpointProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 PrivateEndpoint. +func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peVar.ExtendedLocation != nil { + objectMap["extendedLocation"] = peVar.ExtendedLocation + } + if peVar.PrivateEndpointProperties != nil { + objectMap["properties"] = peVar.PrivateEndpointProperties + } + if peVar.ID != nil { + objectMap["id"] = peVar.ID + } + if peVar.Location != nil { + objectMap["location"] = peVar.Location + } + if peVar.Tags != nil { + objectMap["tags"] = peVar.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct. +func (peVar *PrivateEndpoint) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + peVar.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var privateEndpointProperties PrivateEndpointProperties + err = json.Unmarshal(*v, &privateEndpointProperties) + if err != nil { + return err + } + peVar.PrivateEndpointProperties = &privateEndpointProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + peVar.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + peVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + peVar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + peVar.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + peVar.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + peVar.Tags = tags + } + } + } + + return nil +} + +// PrivateEndpointConnection privateEndpointConnection resource. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Properties of the private end point connection. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties + } + if pec.Name != nil { + objectMap["name"] = pec.Name + } + if pec.ID != nil { + objectMap["id"] = pec.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. +func (pec *PrivateEndpointConnection) 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 privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pec.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pec.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pec.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pec.ID = &ID + } + } + } + + return nil +} + +// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call. +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - A list of PrivateEndpointConnection resources for a specific private link service. + Value *[]PrivateEndpointConnection `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult. +func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peclr.Value != nil { + objectMap["value"] = peclr.Value + } + return json.Marshal(objectMap) +} + +// PrivateEndpointConnectionListResultIterator provides access to a complete listing of +// PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultIterator struct { + i int + page PrivateEndpointConnectionListResultPage +} + +// 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 *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.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 *PrivateEndpointConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointConnectionListResultIterator) 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 PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult { + 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 PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection { + if !iter.page.NotDone() { + return PrivateEndpointConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointConnectionListResultIterator type. +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return PrivateEndpointConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { + return peclr.Value == nil || len(*peclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool { + return peclr.NextLink != nil && len(*peclr.NextLink) != 0 +} + +// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !peclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(peclr.NextLink))) +} + +// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultPage struct { + fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error) + peclr PrivateEndpointConnectionListResult +} + +// 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 *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateEndpointConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointConnectionListResultPage) NotDone() bool { + return !page.peclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult { + return page.peclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection { + if page.peclr.IsEmpty() { + return nil + } + return *page.peclr.Value +} + +// Creates a new instance of the PrivateEndpointConnectionListResultPage type. +func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{ + fn: getNextPage, + peclr: cur, + } +} + +// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - READ-ONLY; The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // LinkIdentifier - READ-ONLY; The consumer link id. + LinkIdentifier *string `json:"linkIdentifier,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. +func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + +// PrivateEndpointIPConfiguration an IP Configuration of the private endpoint. +type PrivateEndpointIPConfiguration struct { + // PrivateEndpointIPConfigurationProperties - Properties of private endpoint IP configurations. + *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointIPConfiguration. +func (peic PrivateEndpointIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peic.PrivateEndpointIPConfigurationProperties != nil { + objectMap["properties"] = peic.PrivateEndpointIPConfigurationProperties + } + if peic.Name != nil { + objectMap["name"] = peic.Name + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointIPConfiguration struct. +func (peic *PrivateEndpointIPConfiguration) 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 privateEndpointIPConfigurationProperties PrivateEndpointIPConfigurationProperties + err = json.Unmarshal(*v, &privateEndpointIPConfigurationProperties) + if err != nil { + return err + } + peic.PrivateEndpointIPConfigurationProperties = &privateEndpointIPConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + peic.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + peic.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + peic.Etag = &etag + } + } + } + + return nil +} + +// PrivateEndpointIPConfigurationProperties properties of an IP Configuration of the private endpoint. +type PrivateEndpointIPConfigurationProperties struct { + // GroupID - The ID of a group obtained from the remote resource that this private endpoint should connect to. + GroupID *string `json:"groupId,omitempty"` + // MemberName - The member name of a group obtained from the remote resource that this private endpoint should connect to. + MemberName *string `json:"memberName,omitempty"` + // PrivateIPAddress - A private ip address obtained from the private endpoint's subnet. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` +} + +// PrivateEndpointListResult response for the ListPrivateEndpoints API service call. +type PrivateEndpointListResult struct { + autorest.Response `json:"-"` + // Value - A list of private endpoint resources in a resource group. + Value *[]PrivateEndpoint `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointListResult. +func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pelr.Value != nil { + objectMap["value"] = pelr.Value + } + return json.Marshal(objectMap) +} + +// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values. +type PrivateEndpointListResultIterator struct { + i int + page PrivateEndpointListResultPage +} + +// 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 *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.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 *PrivateEndpointListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointListResultIterator) 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 PrivateEndpointListResultIterator) Response() PrivateEndpointListResult { + 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 PrivateEndpointListResultIterator) Value() PrivateEndpoint { + if !iter.page.NotDone() { + return PrivateEndpoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointListResultIterator type. +func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator { + return PrivateEndpointListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pelr PrivateEndpointListResult) IsEmpty() bool { + return pelr.Value == nil || len(*pelr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (pelr PrivateEndpointListResult) hasNextLink() bool { + return pelr.NextLink != nil && len(*pelr.NextLink) != 0 +} + +// privateEndpointListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) { + if !pelr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pelr.NextLink))) +} + +// PrivateEndpointListResultPage contains a page of PrivateEndpoint values. +type PrivateEndpointListResultPage struct { + fn func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error) + pelr PrivateEndpointListResult +} + +// 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 *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.pelr) + if err != nil { + return err + } + page.pelr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateEndpointListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointListResultPage) NotDone() bool { + return !page.pelr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult { + return page.pelr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint { + if page.pelr.IsEmpty() { + return nil + } + return *page.pelr.Value +} + +// Creates a new instance of the PrivateEndpointListResultPage type. +func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage { + return PrivateEndpointListResultPage{ + fn: getNextPage, + pelr: cur, + } +} + +// PrivateEndpointProperties properties of the private endpoint. +type PrivateEndpointProperties struct { + // Subnet - The ID of the subnet from which the private IP will be allocated. + Subnet *Subnet `json:"subnet,omitempty"` + // NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint. + NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. + PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` + // ManualPrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. + ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` + // CustomDNSConfigs - An array of custom dns configurations. + CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` + // ApplicationSecurityGroups - Application security groups in which the private endpoint IP configuration is included. + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + // IPConfigurations - A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. + IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` + // CustomNetworkInterfaceName - The custom name of the network interface attached to the private endpoint. + CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointProperties. +func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pep.Subnet != nil { + objectMap["subnet"] = pep.Subnet + } + if pep.PrivateLinkServiceConnections != nil { + objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections + } + if pep.ManualPrivateLinkServiceConnections != nil { + objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections + } + if pep.CustomDNSConfigs != nil { + objectMap["customDnsConfigs"] = pep.CustomDNSConfigs + } + if pep.ApplicationSecurityGroups != nil { + objectMap["applicationSecurityGroups"] = pep.ApplicationSecurityGroups + } + if pep.IPConfigurations != nil { + objectMap["ipConfigurations"] = pep.IPConfigurations + } + if pep.CustomNetworkInterfaceName != nil { + objectMap["customNetworkInterfaceName"] = pep.CustomNetworkInterfaceName + } + return json.Marshal(objectMap) +} + +// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointsClient) (PrivateEndpoint, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result. +func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + peVar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent { + peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PrivateEndpointsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointsDeleteFuture.Result. +func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkService private link service resource. +type PrivateLinkService struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the load balancer. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // PrivateLinkServiceProperties - Properties of the private link service. + *PrivateLinkServiceProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 PrivateLinkService. +func (pls PrivateLinkService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pls.ExtendedLocation != nil { + objectMap["extendedLocation"] = pls.ExtendedLocation + } + if pls.PrivateLinkServiceProperties != nil { + objectMap["properties"] = pls.PrivateLinkServiceProperties + } + if pls.ID != nil { + objectMap["id"] = pls.ID + } + if pls.Location != nil { + objectMap["location"] = pls.Location + } + if pls.Tags != nil { + objectMap["tags"] = pls.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct. +func (pls *PrivateLinkService) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + pls.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var privateLinkServiceProperties PrivateLinkServiceProperties + err = json.Unmarshal(*v, &privateLinkServiceProperties) + if err != nil { + return err + } + pls.PrivateLinkServiceProperties = &privateLinkServiceProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pls.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pls.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pls.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pls.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pls.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pls.Tags = tags + } + } + } + + return nil +} + +// PrivateLinkServiceConnection privateLinkServiceConnection resource. +type PrivateLinkServiceConnection struct { + // PrivateLinkServiceConnectionProperties - Properties of the private link service connection. + *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection. +func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsc.PrivateLinkServiceConnectionProperties != nil { + objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties + } + if plsc.Name != nil { + objectMap["name"] = plsc.Name + } + if plsc.ID != nil { + objectMap["id"] = plsc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct. +func (plsc *PrivateLinkServiceConnection) 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 privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties + err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties) + if err != nil { + return err + } + plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + plsc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + plsc.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + plsc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + plsc.ID = &ID + } + } + } + + return nil +} + +// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection. +type PrivateLinkServiceConnectionProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateLinkServiceID - The resource id of private link service. + PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"` + // GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. + GroupIds *[]string `json:"groupIds,omitempty"` + // RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. + RequestMessage *string `json:"requestMessage,omitempty"` + // PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties. +func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plscp.PrivateLinkServiceID != nil { + objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID + } + if plscp.GroupIds != nil { + objectMap["groupIds"] = plscp.GroupIds + } + if plscp.RequestMessage != nil { + objectMap["requestMessage"] = plscp.RequestMessage + } + if plscp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + +// PrivateLinkServiceConnectionState a collection of information about the state of the connection between +// service consumer and provider. +type PrivateLinkServiceConnectionState struct { + // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *string `json:"status,omitempty"` + // Description - The reason for approval/rejection of the connection. + Description *string `json:"description,omitempty"` + // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string `json:"actionsRequired,omitempty"` +} + +// PrivateLinkServiceIPConfiguration the private link service ip configuration. +type PrivateLinkServiceIPConfiguration struct { + // PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration. + *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` + // Name - The name of private link service ip configuration. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration. +func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsic.PrivateLinkServiceIPConfigurationProperties != nil { + objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties + } + if plsic.Name != nil { + objectMap["name"] = plsic.Name + } + if plsic.ID != nil { + objectMap["id"] = plsic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct. +func (plsic *PrivateLinkServiceIPConfiguration) 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 privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties + err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties) + if err != nil { + return err + } + plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + plsic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + plsic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + plsic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + plsic.ID = &ID + } + } + } + + return nil +} + +// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration. +type PrivateLinkServiceIPConfigurationProperties struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference to the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // Primary - Whether the ip configuration is primary or not. + Primary *bool `json:"primary,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties. +func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsicp.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = plsicp.PrivateIPAddress + } + if plsicp.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod + } + if plsicp.Subnet != nil { + objectMap["subnet"] = plsicp.Subnet + } + if plsicp.Primary != nil { + objectMap["primary"] = plsicp.Primary + } + if plsicp.PrivateIPAddressVersion != "" { + objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion + } + return json.Marshal(objectMap) +} + +// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call. +type PrivateLinkServiceListResult struct { + autorest.Response `json:"-"` + // Value - A list of PrivateLinkService resources in a resource group. + Value *[]PrivateLinkService `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult. +func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plslr.Value != nil { + objectMap["value"] = plslr.Value + } + return json.Marshal(objectMap) +} + +// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values. +type PrivateLinkServiceListResultIterator struct { + i int + page PrivateLinkServiceListResultPage +} + +// 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 *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.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 *PrivateLinkServiceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateLinkServiceListResultIterator) 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 PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult { + 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 PrivateLinkServiceListResultIterator) Value() PrivateLinkService { + if !iter.page.NotDone() { + return PrivateLinkService{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateLinkServiceListResultIterator type. +func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator { + return PrivateLinkServiceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (plslr PrivateLinkServiceListResult) IsEmpty() bool { + return plslr.Value == nil || len(*plslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (plslr PrivateLinkServiceListResult) hasNextLink() bool { + return plslr.NextLink != nil && len(*plslr.NextLink) != 0 +} + +// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !plslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(plslr.NextLink))) +} + +// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values. +type PrivateLinkServiceListResultPage struct { + fn func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error) + plslr PrivateLinkServiceListResult +} + +// 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 *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.plslr) + if err != nil { + return err + } + page.plslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateLinkServiceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateLinkServiceListResultPage) NotDone() bool { + return !page.plslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult { + return page.plslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService { + if page.plslr.IsEmpty() { + return nil + } + return *page.plslr.Value +} + +// Creates a new instance of the PrivateLinkServiceListResultPage type. +func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage { + return PrivateLinkServiceListResultPage{ + fn: getNextPage, + plslr: cur, + } +} + +// PrivateLinkServiceProperties properties of the private link service. +type PrivateLinkServiceProperties struct { + // LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations. + LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` + // IPConfigurations - An array of private link service IP configurations. + IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` + // NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service. + NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint. + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // Visibility - The visibility list of the private link service. + Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"` + // AutoApproval - The auto-approval list of the private link service. + AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"` + // Fqdns - The list of Fqdn. + Fqdns *[]string `json:"fqdns,omitempty"` + // Alias - READ-ONLY; The alias of the private link service. + Alias *string `json:"alias,omitempty"` + // EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not. + EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties. +func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsp.LoadBalancerFrontendIPConfigurations != nil { + objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations + } + if plsp.IPConfigurations != nil { + objectMap["ipConfigurations"] = plsp.IPConfigurations + } + if plsp.Visibility != nil { + objectMap["visibility"] = plsp.Visibility + } + if plsp.AutoApproval != nil { + objectMap["autoApproval"] = plsp.AutoApproval + } + if plsp.Fqdns != nil { + objectMap["fqdns"] = plsp.Fqdns + } + if plsp.EnableProxyProtocol != nil { + objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol + } + return json.Marshal(objectMap) +} + +// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service. +type PrivateLinkServicePropertiesAutoApproval struct { + // Subscriptions - The list of subscriptions. + Subscriptions *[]string `json:"subscriptions,omitempty"` +} + +// PrivateLinkServicePropertiesVisibility the visibility list of the private link service. +type PrivateLinkServicePropertiesVisibility struct { + // Subscriptions - The list of subscriptions. + Subscriptions *[]string `json:"subscriptions,omitempty"` +} + +// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring +// and retrieving the results of a long-running operation. +type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result. +func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + plsv.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent { + plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result. +func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + plsv.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent { + plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateLinkServicesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateLinkServicesClient) (PrivateLinkService, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result. +func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pls.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent { + pls, err = client.CreateOrUpdateResponder(pls.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateLinkServicesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateLinkServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateLinkServicesDeleteFuture.Result. +func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateLinkServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result. +func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call. +type PrivateLinkServiceVisibility struct { + autorest.Response `json:"-"` + // Visible - Private Link Service Visibility (True/False). + Visible *bool `json:"visible,omitempty"` +} + +// Probe a load balancer probe. +type Probe struct { + autorest.Response `json:"-"` + // ProbePropertiesFormat - Properties of load balancer probe. + *ProbePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for Probe. +func (p Probe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.ProbePropertiesFormat != nil { + objectMap["properties"] = p.ProbePropertiesFormat + } + if p.Name != nil { + objectMap["name"] = p.Name + } + if p.ID != nil { + objectMap["id"] = p.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Probe struct. +func (p *Probe) 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 probePropertiesFormat ProbePropertiesFormat + err = json.Unmarshal(*v, &probePropertiesFormat) + if err != nil { + return err + } + p.ProbePropertiesFormat = &probePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + p.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + p.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + p.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + p.ID = &ID + } + } + } + + return nil +} + +// ProbePropertiesFormat load balancer probe resource. +type ProbePropertiesFormat struct { + // LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // Protocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS' + Protocol ProbeProtocol `json:"protocol,omitempty"` + // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. + Port *int32 `json:"port,omitempty"` + // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` + // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. + NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` + // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. + RequestPath *string `json:"requestPath,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProbePropertiesFormat. +func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppf.Protocol != "" { + objectMap["protocol"] = ppf.Protocol + } + if ppf.Port != nil { + objectMap["port"] = ppf.Port + } + if ppf.IntervalInSeconds != nil { + objectMap["intervalInSeconds"] = ppf.IntervalInSeconds + } + if ppf.NumberOfProbes != nil { + objectMap["numberOfProbes"] = ppf.NumberOfProbes + } + if ppf.RequestPath != nil { + objectMap["requestPath"] = ppf.RequestPath + } + return json.Marshal(objectMap) +} + +// Profile network profile resource. +type Profile struct { + autorest.Response `json:"-"` + // ProfilePropertiesFormat - Network profile properties. + *ProfilePropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 Profile. +func (p Profile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.ProfilePropertiesFormat != nil { + objectMap["properties"] = p.ProfilePropertiesFormat + } + if p.ID != nil { + objectMap["id"] = p.ID + } + if p.Location != nil { + objectMap["location"] = p.Location + } + if p.Tags != nil { + objectMap["tags"] = p.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Profile struct. +func (p *Profile) 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 profilePropertiesFormat ProfilePropertiesFormat + err = json.Unmarshal(*v, &profilePropertiesFormat) + if err != nil { + return err + } + p.ProfilePropertiesFormat = &profilePropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + p.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + p.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + p.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + p.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + p.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + p.Tags = tags + } + } + } + + return nil +} + +// ProfileListResult response for ListNetworkProfiles API service call. +type ProfileListResult struct { + autorest.Response `json:"-"` + // Value - A list of network profiles that exist in a resource group. + Value *[]Profile `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProfileListResultIterator provides access to a complete listing of Profile values. +type ProfileListResultIterator struct { + i int + page ProfileListResultPage +} + +// 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 *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.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 *ProfileListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProfileListResultIterator) 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 ProfileListResultIterator) Response() ProfileListResult { + 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 ProfileListResultIterator) Value() Profile { + if !iter.page.NotDone() { + return Profile{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProfileListResultIterator type. +func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator { + return ProfileListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (plr ProfileListResult) IsEmpty() bool { + return plr.Value == nil || len(*plr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (plr ProfileListResult) hasNextLink() bool { + return plr.NextLink != nil && len(*plr.NextLink) != 0 +} + +// profileListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) { + if !plr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(plr.NextLink))) +} + +// ProfileListResultPage contains a page of Profile values. +type ProfileListResultPage struct { + fn func(context.Context, ProfileListResult) (ProfileListResult, error) + plr ProfileListResult +} + +// 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 *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.plr) + if err != nil { + return err + } + page.plr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ProfileListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProfileListResultPage) NotDone() bool { + return !page.plr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProfileListResultPage) Response() ProfileListResult { + return page.plr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProfileListResultPage) Values() []Profile { + if page.plr.IsEmpty() { + return nil + } + return *page.plr.Value +} + +// Creates a new instance of the ProfileListResultPage type. +func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { + return ProfileListResultPage{ + fn: getNextPage, + plr: cur, + } +} + +// ProfilePropertiesFormat network profile properties. +type ProfilePropertiesFormat struct { + // ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces. + ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"` + // ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations. + ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProfilePropertiesFormat. +func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppf.ContainerNetworkInterfaceConfigurations != nil { + objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations + } + return json.Marshal(objectMap) +} + +// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ProfilesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ProfilesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ProfilesDeleteFuture.Result. +func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PropagatedRouteTable the list of RouteTables to advertise the routes to. +type PropagatedRouteTable struct { + // Labels - The list of labels. + Labels *[]string `json:"labels,omitempty"` + // Ids - The list of resource ids of all the RouteTables. + Ids *[]SubResource `json:"ids,omitempty"` +} + +// ProtocolConfiguration configuration of the protocol. +type ProtocolConfiguration struct { + // HTTPConfiguration - HTTP configuration of the connectivity check. + HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` +} + +// ProtocolCustomSettingsFormat dDoS custom policy properties. +type ProtocolCustomSettingsFormat struct { + // Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn' + Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"` + // TriggerRateOverride - The customized DDoS protection trigger rate. + TriggerRateOverride *string `json:"triggerRateOverride,omitempty"` + // SourceRateOverride - The customized DDoS protection source rate. + SourceRateOverride *string `json:"sourceRateOverride,omitempty"` + // TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'DdosCustomPolicyTriggerSensitivityOverrideRelaxed', 'DdosCustomPolicyTriggerSensitivityOverrideLow', 'DdosCustomPolicyTriggerSensitivityOverrideDefault', 'DdosCustomPolicyTriggerSensitivityOverrideHigh' + TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"` +} + +// PublicIPAddress public IP address resource. +type PublicIPAddress struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the public ip address. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // Sku - The public IP address SKU. + Sku *PublicIPAddressSku `json:"sku,omitempty"` + // PublicIPAddressPropertiesFormat - Public IP address properties. + *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // ID - 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 PublicIPAddress. +func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pia.ExtendedLocation != nil { + objectMap["extendedLocation"] = pia.ExtendedLocation + } + if pia.Sku != nil { + objectMap["sku"] = pia.Sku + } + if pia.PublicIPAddressPropertiesFormat != nil { + objectMap["properties"] = pia.PublicIPAddressPropertiesFormat + } + if pia.Zones != nil { + objectMap["zones"] = pia.Zones + } + if pia.ID != nil { + objectMap["id"] = pia.ID + } + if pia.Location != nil { + objectMap["location"] = pia.Location + } + if pia.Tags != nil { + objectMap["tags"] = pia.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. +func (pia *PublicIPAddress) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + pia.ExtendedLocation = &extendedLocation + } + case "sku": + if v != nil { + var sku PublicIPAddressSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + pia.Sku = &sku + } + case "properties": + if v != nil { + var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat + err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) + if err != nil { + return err + } + pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pia.Etag = &etag + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + pia.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pia.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pia.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pia.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pia.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pia.Tags = tags + } + } + } + + return nil +} + +// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address. +type PublicIPAddressDNSSettings struct { + // DomainNameLabel - The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. + DomainNameLabel *string `json:"domainNameLabel,omitempty"` + // Fqdn - The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. + Fqdn *string `json:"fqdn,omitempty"` + // ReverseFqdn - The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + ReverseFqdn *string `json:"reverseFqdn,omitempty"` +} + +// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PublicIPAddressesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PublicIPAddressesClient) (PublicIPAddress, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result. +func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pia.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { + pia, err = client.CreateOrUpdateResponder(pia.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request") + } + } + return +} + +// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PublicIPAddressesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PublicIPAddressesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PublicIPAddressesDeleteFuture.Result. +func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PublicIPAddressListResult response for ListPublicIpAddresses API service call. +type PublicIPAddressListResult struct { + autorest.Response `json:"-"` + // Value - A list of public IP addresses that exists in a resource group. + Value *[]PublicIPAddress `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. +type PublicIPAddressListResultIterator struct { + i int + page PublicIPAddressListResultPage +} + +// 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 *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.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 *PublicIPAddressListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PublicIPAddressListResultIterator) 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 PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { + 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 PublicIPAddressListResultIterator) Value() PublicIPAddress { + if !iter.page.NotDone() { + return PublicIPAddress{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PublicIPAddressListResultIterator type. +func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator { + return PublicIPAddressListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pialr PublicIPAddressListResult) IsEmpty() bool { + return pialr.Value == nil || len(*pialr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (pialr PublicIPAddressListResult) hasNextLink() bool { + return pialr.NextLink != nil && len(*pialr.NextLink) != 0 +} + +// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) { + if !pialr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pialr.NextLink))) +} + +// PublicIPAddressListResultPage contains a page of PublicIPAddress values. +type PublicIPAddressListResultPage struct { + fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error) + pialr PublicIPAddressListResult +} + +// 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 *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.pialr) + if err != nil { + return err + } + page.pialr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PublicIPAddressListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PublicIPAddressListResultPage) NotDone() bool { + return !page.pialr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { + return page.pialr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { + if page.pialr.IsEmpty() { + return nil + } + return *page.pialr.Value +} + +// Creates a new instance of the PublicIPAddressListResultPage type. +func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { + return PublicIPAddressListResultPage{ + fn: getNextPage, + pialr: cur, + } +} + +// PublicIPAddressPropertiesFormat public IP address properties. +type PublicIPAddressPropertiesFormat struct { + // PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` + // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` + // IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address. + IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` + // DNSSettings - The FQDN of the DNS record associated with the public IP address. + DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` + // DdosSettings - The DDoS protection custom policy associated with the public IP address. + DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` + // IPTags - The list of tags associated with the public IP address. + IPTags *[]IPTag `json:"ipTags,omitempty"` + // IPAddress - The IP address associated with the public IP address resource. + IPAddress *string `json:"ipAddress,omitempty"` + // PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from. + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + // IdleTimeoutInMinutes - The idle timeout of the public IP address. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ServicePublicIPAddress - The service public IP address of the public IP address resource. + ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` + // NatGateway - The NatGateway for the Public IP address. + NatGateway *NatGateway `json:"natGateway,omitempty"` + // MigrationPhase - Migration phase of Public IP Address. Possible values include: 'PublicIPAddressMigrationPhaseNone', 'PublicIPAddressMigrationPhasePrepare', 'PublicIPAddressMigrationPhaseCommit', 'PublicIPAddressMigrationPhaseAbort', 'PublicIPAddressMigrationPhaseCommitted' + MigrationPhase PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` + // LinkedPublicIPAddress - The linked public IP address of the public IP address resource. + LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` + // DeleteOption - Specify what happens to the public IP address when the VM using it is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat. +func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if piapf.PublicIPAllocationMethod != "" { + objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod + } + if piapf.PublicIPAddressVersion != "" { + objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion + } + if piapf.DNSSettings != nil { + objectMap["dnsSettings"] = piapf.DNSSettings + } + if piapf.DdosSettings != nil { + objectMap["ddosSettings"] = piapf.DdosSettings + } + if piapf.IPTags != nil { + objectMap["ipTags"] = piapf.IPTags + } + if piapf.IPAddress != nil { + objectMap["ipAddress"] = piapf.IPAddress + } + if piapf.PublicIPPrefix != nil { + objectMap["publicIPPrefix"] = piapf.PublicIPPrefix + } + if piapf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes + } + if piapf.ServicePublicIPAddress != nil { + objectMap["servicePublicIPAddress"] = piapf.ServicePublicIPAddress + } + if piapf.NatGateway != nil { + objectMap["natGateway"] = piapf.NatGateway + } + if piapf.MigrationPhase != "" { + objectMap["migrationPhase"] = piapf.MigrationPhase + } + if piapf.LinkedPublicIPAddress != nil { + objectMap["linkedPublicIPAddress"] = piapf.LinkedPublicIPAddress + } + if piapf.DeleteOption != "" { + objectMap["deleteOption"] = piapf.DeleteOption + } + return json.Marshal(objectMap) +} + +// PublicIPAddressSku SKU of a public IP address. +type PublicIPAddressSku struct { + // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' + Name PublicIPAddressSkuName `json:"name,omitempty"` + // Tier - Tier of a public IP address SKU. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal' + Tier PublicIPAddressSkuTier `json:"tier,omitempty"` +} + +// PublicIPPrefix public IP prefix resource. +type PublicIPPrefix struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the public ip address. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // Sku - The public IP prefix SKU. + Sku *PublicIPPrefixSku `json:"sku,omitempty"` + // PublicIPPrefixPropertiesFormat - Public IP prefix properties. + *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // ID - 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 PublicIPPrefix. +func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pip.ExtendedLocation != nil { + objectMap["extendedLocation"] = pip.ExtendedLocation + } + if pip.Sku != nil { + objectMap["sku"] = pip.Sku + } + if pip.PublicIPPrefixPropertiesFormat != nil { + objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat + } + if pip.Zones != nil { + objectMap["zones"] = pip.Zones + } + if pip.ID != nil { + objectMap["id"] = pip.ID + } + if pip.Location != nil { + objectMap["location"] = pip.Location + } + if pip.Tags != nil { + objectMap["tags"] = pip.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct. +func (pip *PublicIPPrefix) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + pip.ExtendedLocation = &extendedLocation + } + case "sku": + if v != nil { + var sku PublicIPPrefixSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + pip.Sku = &sku + } + case "properties": + if v != nil { + var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat + err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat) + if err != nil { + return err + } + pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pip.Etag = &etag + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + pip.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pip.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pip.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pip.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pip.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pip.Tags = tags + } + } + } + + return nil +} + +// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PublicIPPrefixesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PublicIPPrefixesClient) (PublicIPPrefix, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result. +func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pip.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent { + pip, err = client.CreateOrUpdateResponder(pip.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request") + } + } + return +} + +// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PublicIPPrefixesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PublicIPPrefixesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PublicIPPrefixesDeleteFuture.Result. +func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call. +type PublicIPPrefixListResult struct { + autorest.Response `json:"-"` + // Value - A list of public IP prefixes that exists in a resource group. + Value *[]PublicIPPrefix `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values. +type PublicIPPrefixListResultIterator struct { + i int + page PublicIPPrefixListResultPage +} + +// 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 *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.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 *PublicIPPrefixListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PublicIPPrefixListResultIterator) 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 PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult { + 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 PublicIPPrefixListResultIterator) Value() PublicIPPrefix { + if !iter.page.NotDone() { + return PublicIPPrefix{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PublicIPPrefixListResultIterator type. +func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator { + return PublicIPPrefixListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (piplr PublicIPPrefixListResult) IsEmpty() bool { + return piplr.Value == nil || len(*piplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (piplr PublicIPPrefixListResult) hasNextLink() bool { + return piplr.NextLink != nil && len(*piplr.NextLink) != 0 +} + +// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) { + if !piplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(piplr.NextLink))) +} + +// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values. +type PublicIPPrefixListResultPage struct { + fn func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error) + piplr PublicIPPrefixListResult +} + +// 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 *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.piplr) + if err != nil { + return err + } + page.piplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PublicIPPrefixListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PublicIPPrefixListResultPage) NotDone() bool { + return !page.piplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult { + return page.piplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix { + if page.piplr.IsEmpty() { + return nil + } + return *page.piplr.Value +} + +// Creates a new instance of the PublicIPPrefixListResultPage type. +func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage { + return PublicIPPrefixListResultPage{ + fn: getNextPage, + piplr: cur, + } +} + +// PublicIPPrefixPropertiesFormat public IP prefix properties. +type PublicIPPrefixPropertiesFormat struct { + // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6' + PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` + // IPTags - The list of tags associated with the public IP prefix. + IPTags *[]IPTag `json:"ipTags,omitempty"` + // PrefixLength - The Length of the Public IP Prefix. + PrefixLength *int32 `json:"prefixLength,omitempty"` + // IPPrefix - READ-ONLY; The allocated Prefix. + IPPrefix *string `json:"ipPrefix,omitempty"` + // PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses. + PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"` + // LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix. + LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"` + // CustomIPPrefix - The customIpPrefix that this prefix is associated with. + CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // NatGateway - NatGateway of Public IP Prefix. + NatGateway *NatGateway `json:"natGateway,omitempty"` +} + +// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat. +func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pippf.PublicIPAddressVersion != "" { + objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion + } + if pippf.IPTags != nil { + objectMap["ipTags"] = pippf.IPTags + } + if pippf.PrefixLength != nil { + objectMap["prefixLength"] = pippf.PrefixLength + } + if pippf.CustomIPPrefix != nil { + objectMap["customIPPrefix"] = pippf.CustomIPPrefix + } + if pippf.NatGateway != nil { + objectMap["natGateway"] = pippf.NatGateway + } + return json.Marshal(objectMap) +} + +// PublicIPPrefixSku SKU of a public IP prefix. +type PublicIPPrefixSku struct { + // Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard' + Name PublicIPPrefixSkuName `json:"name,omitempty"` + // Tier - Tier of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuTierRegional', 'PublicIPPrefixSkuTierGlobal' + Tier PublicIPPrefixSkuTier `json:"tier,omitempty"` +} + +// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PutBastionShareableLinkAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BaseClient) (BastionShareableLinkListResultPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PutBastionShareableLinkAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PutBastionShareableLinkAllFuture.Result. +func (future *PutBastionShareableLinkAllFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bsllrp.bsllr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkAllFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent { + bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request") + } + } + return +} + +// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PutBastionShareableLinkFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BaseClient) (BastionShareableLinkListResultPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PutBastionShareableLinkFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PutBastionShareableLinkFuture.Result. +func (future *PutBastionShareableLinkFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bsllrp.bsllr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent { + bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request") + } + } + return +} + +// QosDefinition quality of Service defines the traffic configuration between endpoints. Mandatory to have +// one marking. +type QosDefinition struct { + // Markings - List of markings to be used in the configuration. + Markings *[]int32 `json:"markings,omitempty"` + // SourceIPRanges - Source IP ranges. + SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` + // DestinationIPRanges - Destination IP ranges. + DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` + // SourcePortRanges - Sources port ranges. + SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - Destination port ranges. + DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` + // Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll' + Protocol ProtocolType `json:"protocol,omitempty"` +} + +// QosIPRange qos Traffic Profiler IP Range properties. +type QosIPRange struct { + // StartIP - Start IP Address. + StartIP *string `json:"startIP,omitempty"` + // EndIP - End IP Address. + EndIP *string `json:"endIP,omitempty"` +} + +// QosPortRange qos Traffic Profiler Port range properties. +type QosPortRange struct { + // Start - Qos Port Range start. + Start *int32 `json:"start,omitempty"` + // End - Qos Port Range end. + End *int32 `json:"end,omitempty"` +} + +// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. +type QueryTroubleshootingParameters struct { + // TargetResourceID - The target resource ID to query the troubleshooting result. + TargetResourceID *string `json:"targetResourceId,omitempty"` +} + +// RadiusServer radius Server Settings. +type RadiusServer struct { + // RadiusServerAddress - The address of this radius server. + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + // RadiusServerScore - The initial score assigned to this radius server. + RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` + // RadiusServerSecret - The secret used for this radius server. + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` +} + +// RecordSet a collective group of information about the record set information. +type RecordSet struct { + // RecordType - Resource record type. + RecordType *string `json:"recordType,omitempty"` + // RecordSetName - Recordset name. + RecordSetName *string `json:"recordSetName,omitempty"` + // Fqdn - Fqdn that resolves to private endpoint ip address. + Fqdn *string `json:"fqdn,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // TTL - Recordset time to live. + TTL *int32 `json:"ttl,omitempty"` + // IPAddresses - The private ip address of the private endpoint. + IPAddresses *[]string `json:"ipAddresses,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecordSet. +func (rs RecordSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rs.RecordType != nil { + objectMap["recordType"] = rs.RecordType + } + if rs.RecordSetName != nil { + objectMap["recordSetName"] = rs.RecordSetName + } + if rs.Fqdn != nil { + objectMap["fqdn"] = rs.Fqdn + } + if rs.TTL != nil { + objectMap["ttl"] = rs.TTL + } + if rs.IPAddresses != nil { + objectMap["ipAddresses"] = rs.IPAddresses + } + return json.Marshal(objectMap) +} + +// ReferencedPublicIPAddress reference to a public IP address. +type ReferencedPublicIPAddress struct { + // ID - The PublicIPAddress Reference. + ID *string `json:"id,omitempty"` +} + +// Resource common resource representation. +type Resource struct { + // ID - 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.ID != nil { + objectMap["id"] = r.ID + } + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + return json.Marshal(objectMap) +} + +// ResourceNavigationLink resourceNavigationLink resource. +type ResourceNavigationLink struct { + // ResourceNavigationLinkFormat - Resource navigation link properties format. + *ResourceNavigationLinkFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceNavigationLink. +func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rnl.ResourceNavigationLinkFormat != nil { + objectMap["properties"] = rnl.ResourceNavigationLinkFormat + } + if rnl.Name != nil { + objectMap["name"] = rnl.Name + } + if rnl.ID != nil { + objectMap["id"] = rnl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct. +func (rnl *ResourceNavigationLink) 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 resourceNavigationLinkFormat ResourceNavigationLinkFormat + err = json.Unmarshal(*v, &resourceNavigationLinkFormat) + if err != nil { + return err + } + rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rnl.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rnl.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rnl.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rnl.ID = &ID + } + } + } + + return nil +} + +// ResourceNavigationLinkFormat properties of ResourceNavigationLink. +type ResourceNavigationLinkFormat struct { + // LinkedResourceType - Resource type of the linked resource. + LinkedResourceType *string `json:"linkedResourceType,omitempty"` + // Link - Link to the external resource. + Link *string `json:"link,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat. +func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rnlf.LinkedResourceType != nil { + objectMap["linkedResourceType"] = rnlf.LinkedResourceType + } + if rnlf.Link != nil { + objectMap["link"] = rnlf.Link + } + return json.Marshal(objectMap) +} + +// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation. +type ResourceNavigationLinksListResult struct { + autorest.Response `json:"-"` + // Value - The resource navigation links in a subnet. + Value *[]ResourceNavigationLink `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult. +func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rnllr.Value != nil { + objectMap["value"] = rnllr.Value + } + return json.Marshal(objectMap) +} + +// ResourceSet the base resource set for visibility and auto-approval. +type ResourceSet struct { + // Subscriptions - The list of subscriptions. + Subscriptions *[]string `json:"subscriptions,omitempty"` +} + +// RetentionPolicyParameters parameters that define the retention policy for flow log. +type RetentionPolicyParameters struct { + // Days - Number of days to retain flow log records. + Days *int32 `json:"days,omitempty"` + // Enabled - Flag to enable/disable retention. + Enabled *bool `json:"enabled,omitempty"` +} + +// Route route resource. +type Route struct { + autorest.Response `json:"-"` + // RoutePropertiesFormat - Properties of the route. + *RoutePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for Route. +func (r Route) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.RoutePropertiesFormat != nil { + objectMap["properties"] = r.RoutePropertiesFormat + } + if r.Name != nil { + objectMap["name"] = r.Name + } + if r.Type != nil { + objectMap["type"] = r.Type + } + if r.ID != nil { + objectMap["id"] = r.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Route struct. +func (r *Route) 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 routePropertiesFormat RoutePropertiesFormat + err = json.Unmarshal(*v, &routePropertiesFormat) + if err != nil { + return err + } + r.RoutePropertiesFormat = &routePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + r.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + r.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + r.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + r.ID = &ID + } + } + } + + return nil +} + +// RouteFilter route Filter Resource. +type RouteFilter struct { + autorest.Response `json:"-"` + // RouteFilterPropertiesFormat - Properties of the route filter. + *RouteFilterPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 RouteFilter. +func (rf RouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rf.RouteFilterPropertiesFormat != nil { + objectMap["properties"] = rf.RouteFilterPropertiesFormat + } + if rf.ID != nil { + objectMap["id"] = rf.ID + } + if rf.Location != nil { + objectMap["location"] = rf.Location + } + if rf.Tags != nil { + objectMap["tags"] = rf.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RouteFilter struct. +func (rf *RouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat + err = json.Unmarshal(*v, &routeFilterPropertiesFormat) + if err != nil { + return err + } + rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rf.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rf.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rf.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rf.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rf.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rf.Tags = tags + } + } + } + + return nil +} + +// RouteFilterListResult response for the ListRouteFilters API service call. +type RouteFilterListResult struct { + autorest.Response `json:"-"` + // Value - A list of route filters in a resource group. + Value *[]RouteFilter `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values. +type RouteFilterListResultIterator struct { + i int + page RouteFilterListResultPage +} + +// 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 *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.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 *RouteFilterListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteFilterListResultIterator) 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 RouteFilterListResultIterator) Response() RouteFilterListResult { + 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 RouteFilterListResultIterator) Value() RouteFilter { + if !iter.page.NotDone() { + return RouteFilter{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RouteFilterListResultIterator type. +func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator { + return RouteFilterListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rflr RouteFilterListResult) IsEmpty() bool { + return rflr.Value == nil || len(*rflr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rflr RouteFilterListResult) hasNextLink() bool { + return rflr.NextLink != nil && len(*rflr.NextLink) != 0 +} + +// routeFilterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rflr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rflr.NextLink))) +} + +// RouteFilterListResultPage contains a page of RouteFilter values. +type RouteFilterListResultPage struct { + fn func(context.Context, RouteFilterListResult) (RouteFilterListResult, error) + rflr RouteFilterListResult +} + +// 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 *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rflr) + if err != nil { + return err + } + page.rflr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RouteFilterListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteFilterListResultPage) NotDone() bool { + return !page.rflr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteFilterListResultPage) Response() RouteFilterListResult { + return page.rflr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteFilterListResultPage) Values() []RouteFilter { + if page.rflr.IsEmpty() { + return nil + } + return *page.rflr.Value +} + +// Creates a new instance of the RouteFilterListResultPage type. +func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage { + return RouteFilterListResultPage{ + fn: getNextPage, + rflr: cur, + } +} + +// RouteFilterPropertiesFormat route Filter Resource. +type RouteFilterPropertiesFormat struct { + // Rules - Collection of RouteFilterRules contained within a route filter. + Rules *[]RouteFilterRule `json:"rules,omitempty"` + // Peerings - READ-ONLY; A collection of references to express route circuit peerings. + Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` + // Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings. + Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat. +func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rfpf.Rules != nil { + objectMap["rules"] = rfpf.Rules + } + return json.Marshal(objectMap) +} + +// RouteFilterRule route Filter Rule Resource. +type RouteFilterRule struct { + autorest.Response `json:"-"` + // RouteFilterRulePropertiesFormat - Properties of the route filter rule. + *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for RouteFilterRule. +func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rfr.RouteFilterRulePropertiesFormat != nil { + objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat + } + if rfr.Name != nil { + objectMap["name"] = rfr.Name + } + if rfr.Location != nil { + objectMap["location"] = rfr.Location + } + if rfr.ID != nil { + objectMap["id"] = rfr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct. +func (rfr *RouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat + err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) + if err != nil { + return err + } + rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rfr.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rfr.Location = &location + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rfr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rfr.ID = &ID + } + } + } + + return nil +} + +// RouteFilterRuleListResult response for the ListRouteFilterRules API service call. +type RouteFilterRuleListResult struct { + autorest.Response `json:"-"` + // Value - A list of RouteFilterRules in a resource group. + Value *[]RouteFilterRule `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values. +type RouteFilterRuleListResultIterator struct { + i int + page RouteFilterRuleListResultPage +} + +// 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 *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.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 *RouteFilterRuleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteFilterRuleListResultIterator) 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 RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult { + 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 RouteFilterRuleListResultIterator) Value() RouteFilterRule { + if !iter.page.NotDone() { + return RouteFilterRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RouteFilterRuleListResultIterator type. +func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator { + return RouteFilterRuleListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rfrlr RouteFilterRuleListResult) IsEmpty() bool { + return rfrlr.Value == nil || len(*rfrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rfrlr RouteFilterRuleListResult) hasNextLink() bool { + return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0 +} + +// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rfrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rfrlr.NextLink))) +} + +// RouteFilterRuleListResultPage contains a page of RouteFilterRule values. +type RouteFilterRuleListResultPage struct { + fn func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error) + rfrlr RouteFilterRuleListResult +} + +// 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 *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rfrlr) + if err != nil { + return err + } + page.rfrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RouteFilterRuleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteFilterRuleListResultPage) NotDone() bool { + return !page.rfrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult { + return page.rfrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { + if page.rfrlr.IsEmpty() { + return nil + } + return *page.rfrlr.Value +} + +// Creates a new instance of the RouteFilterRuleListResultPage type. +func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage { + return RouteFilterRuleListResultPage{ + fn: getNextPage, + rfrlr: cur, + } +} + +// RouteFilterRulePropertiesFormat route Filter Rule Resource. +type RouteFilterRulePropertiesFormat struct { + // Access - The access type of the rule. Possible values include: 'AccessAllow', 'AccessDeny' + Access Access `json:"access,omitempty"` + // RouteFilterRuleType - The rule type of the rule. + RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` + // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + Communities *[]string `json:"communities,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat. +func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rfrpf.Access != "" { + objectMap["access"] = rfrpf.Access + } + if rfrpf.RouteFilterRuleType != nil { + objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType + } + if rfrpf.Communities != nil { + objectMap["communities"] = rfrpf.Communities + } + return json.Marshal(objectMap) +} + +// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RouteFilterRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RouteFilterRulesClient) (RouteFilterRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result. +func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rfr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { + rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteFilterRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RouteFilterRulesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RouteFilterRulesDeleteFuture.Result. +func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RouteFiltersCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RouteFiltersClient) (RouteFilter, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result. +func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rf.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { + rf, err = client.CreateOrUpdateResponder(rf.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteFiltersDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RouteFiltersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RouteFiltersDeleteFuture.Result. +func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteListResult response for the ListRoute API service call. +type RouteListResult struct { + autorest.Response `json:"-"` + // Value - A list of routes in a resource group. + Value *[]Route `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteListResultIterator provides access to a complete listing of Route values. +type RouteListResultIterator struct { + i int + page RouteListResultPage +} + +// 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 *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.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 *RouteListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteListResultIterator) 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 RouteListResultIterator) Response() RouteListResult { + 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 RouteListResultIterator) Value() Route { + if !iter.page.NotDone() { + return Route{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RouteListResultIterator type. +func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator { + return RouteListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rlr RouteListResult) IsEmpty() bool { + return rlr.Value == nil || len(*rlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rlr RouteListResult) hasNextLink() bool { + return rlr.NextLink != nil && len(*rlr.NextLink) != 0 +} + +// routeListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rlr.NextLink))) +} + +// RouteListResultPage contains a page of Route values. +type RouteListResultPage struct { + fn func(context.Context, RouteListResult) (RouteListResult, error) + rlr RouteListResult +} + +// 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 *RouteListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RouteListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteListResultPage) NotDone() bool { + return !page.rlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteListResultPage) Response() RouteListResult { + return page.rlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteListResultPage) Values() []Route { + if page.rlr.IsEmpty() { + return nil + } + return *page.rlr.Value +} + +// Creates a new instance of the RouteListResultPage type. +func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { + return RouteListResultPage{ + fn: getNextPage, + rlr: cur, + } +} + +// RoutePropertiesFormat route resource. +type RoutePropertiesFormat struct { + // AddressPrefix - The destination CIDR to which the route applies. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' + NextHopType RouteNextHopType `json:"nextHopType,omitempty"` + // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // HasBgpOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM. + HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` +} + +// MarshalJSON is the custom marshaler for RoutePropertiesFormat. +func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpf.AddressPrefix != nil { + objectMap["addressPrefix"] = rpf.AddressPrefix + } + if rpf.NextHopType != "" { + objectMap["nextHopType"] = rpf.NextHopType + } + if rpf.NextHopIPAddress != nil { + objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress + } + if rpf.HasBgpOverride != nil { + objectMap["hasBgpOverride"] = rpf.HasBgpOverride + } + return json.Marshal(objectMap) +} + +// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RoutesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RoutesClient) (Route, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RoutesCreateOrUpdateFuture.Result. +func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + r.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { + r, err = client.CreateOrUpdateResponder(r.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request") + } + } + return +} + +// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type RoutesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RoutesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RoutesDeleteFuture.Result. +func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteTable route table resource. +type RouteTable struct { + autorest.Response `json:"-"` + // RouteTablePropertiesFormat - Properties of the route table. + *RouteTablePropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 RouteTable. +func (rt RouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rt.RouteTablePropertiesFormat != nil { + objectMap["properties"] = rt.RouteTablePropertiesFormat + } + if rt.ID != nil { + objectMap["id"] = rt.ID + } + if rt.Location != nil { + objectMap["location"] = rt.Location + } + if rt.Tags != nil { + objectMap["tags"] = rt.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RouteTable struct. +func (rt *RouteTable) 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 routeTablePropertiesFormat RouteTablePropertiesFormat + err = json.Unmarshal(*v, &routeTablePropertiesFormat) + if err != nil { + return err + } + rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rt.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rt.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rt.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rt.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rt.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rt.Tags = tags + } + } + } + + return nil +} + +// RouteTableListResult response for the ListRouteTable API service call. +type RouteTableListResult struct { + autorest.Response `json:"-"` + // Value - A list of route tables in a resource group. + Value *[]RouteTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteTableListResultIterator provides access to a complete listing of RouteTable values. +type RouteTableListResultIterator struct { + i int + page RouteTableListResultPage +} + +// 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 *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.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 *RouteTableListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteTableListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult { + 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 RouteTableListResultIterator) Value() RouteTable { + if !iter.page.NotDone() { + return RouteTable{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RouteTableListResultIterator type. +func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator { + return RouteTableListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rtlr RouteTableListResult) IsEmpty() bool { + return rtlr.Value == nil || len(*rtlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rtlr RouteTableListResult) hasNextLink() bool { + return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0 +} + +// routeTableListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rtlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rtlr.NextLink))) +} + +// RouteTableListResultPage contains a page of RouteTable values. +type RouteTableListResultPage struct { + fn func(context.Context, RouteTableListResult) (RouteTableListResult, error) + rtlr RouteTableListResult +} + +// 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 *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rtlr) + if err != nil { + return err + } + page.rtlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RouteTableListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteTableListResultPage) NotDone() bool { + return !page.rtlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteTableListResultPage) Response() RouteTableListResult { + return page.rtlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteTableListResultPage) Values() []RouteTable { + if page.rtlr.IsEmpty() { + return nil + } + return *page.rtlr.Value +} + +// Creates a new instance of the RouteTableListResultPage type. +func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { + return RouteTableListResultPage{ + fn: getNextPage, + rtlr: cur, + } +} + +// RouteTablePropertiesFormat route Table resource. +type RouteTablePropertiesFormat struct { + // Routes - Collection of routes contained within a route table. + Routes *[]Route `json:"routes,omitempty"` + // Subnets - READ-ONLY; A collection of references to subnets. + Subnets *[]Subnet `json:"subnets,omitempty"` + // DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable. + DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the route table. + ResourceGUID *string `json:"resourceGuid,omitempty"` +} + +// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat. +func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rtpf.Routes != nil { + objectMap["routes"] = rtpf.Routes + } + if rtpf.DisableBgpRoutePropagation != nil { + objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation + } + return json.Marshal(objectMap) +} + +// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RouteTablesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RouteTablesClient) (RouteTable, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result. +func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rt.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { + rt, err = client.CreateOrUpdateResponder(rt.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteTablesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RouteTablesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RouteTablesDeleteFuture.Result. +func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RoutingConfiguration routing Configuration indicating the associated and propagated route tables for +// this connection. +type RoutingConfiguration struct { + // AssociatedRouteTable - The resource id RouteTable associated with this RoutingConfiguration. + AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` + // PropagatedRouteTables - The list of RouteTables to advertise the routes to. + PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` + // VnetRoutes - List of routes that control routing from VirtualHub into a virtual network connection. + VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` +} + +// Rule rule of type network. +type Rule struct { + // IPProtocols - Array of FirewallPolicyRuleNetworkProtocols. + IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses or Service Tags. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // DestinationPorts - List of destination ports. + DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` + // DestinationIPGroups - List of destination IpGroups for this rule. + DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` + // DestinationFqdns - List of destination FQDNs. + DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` + // Name - Name of the rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule' + RuleType RuleType `json:"ruleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for Rule. +func (r Rule) MarshalJSON() ([]byte, error) { + r.RuleType = RuleTypeNetworkRule + objectMap := make(map[string]interface{}) + if r.IPProtocols != nil { + objectMap["ipProtocols"] = r.IPProtocols + } + if r.SourceAddresses != nil { + objectMap["sourceAddresses"] = r.SourceAddresses + } + if r.DestinationAddresses != nil { + objectMap["destinationAddresses"] = r.DestinationAddresses + } + if r.DestinationPorts != nil { + objectMap["destinationPorts"] = r.DestinationPorts + } + if r.SourceIPGroups != nil { + objectMap["sourceIpGroups"] = r.SourceIPGroups + } + if r.DestinationIPGroups != nil { + objectMap["destinationIpGroups"] = r.DestinationIPGroups + } + if r.DestinationFqdns != nil { + objectMap["destinationFqdns"] = r.DestinationFqdns + } + if r.Name != nil { + objectMap["name"] = r.Name + } + if r.Description != nil { + objectMap["description"] = r.Description + } + if r.RuleType != "" { + objectMap["ruleType"] = r.RuleType + } + return json.Marshal(objectMap) +} + +// AsApplicationRule is the BasicFirewallPolicyRule implementation for Rule. +func (r Rule) AsApplicationRule() (*ApplicationRule, bool) { + return nil, false +} + +// AsNatRule is the BasicFirewallPolicyRule implementation for Rule. +func (r Rule) AsNatRule() (*NatRule, bool) { + return nil, false +} + +// AsRule is the BasicFirewallPolicyRule implementation for Rule. +func (r Rule) AsRule() (*Rule, bool) { + return &r, true +} + +// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule. +func (r Rule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule. +func (r Rule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { + return &r, true +} + +// SecurityGroup networkSecurityGroup resource. +type SecurityGroup struct { + autorest.Response `json:"-"` + // SecurityGroupPropertiesFormat - Properties of the network security group. + *SecurityGroupPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 SecurityGroup. +func (sg SecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sg.SecurityGroupPropertiesFormat != nil { + objectMap["properties"] = sg.SecurityGroupPropertiesFormat + } + if sg.ID != nil { + objectMap["id"] = sg.ID + } + if sg.Location != nil { + objectMap["location"] = sg.Location + } + if sg.Tags != nil { + objectMap["tags"] = sg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. +func (sg *SecurityGroup) 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 securityGroupPropertiesFormat SecurityGroupPropertiesFormat + err = json.Unmarshal(*v, &securityGroupPropertiesFormat) + if err != nil { + return err + } + sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sg.Tags = tags + } + } + } + + return nil +} + +// SecurityGroupListResult response for ListNetworkSecurityGroups API service call. +type SecurityGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of NetworkSecurityGroup resources. + Value *[]SecurityGroup `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. +type SecurityGroupListResultIterator struct { + i int + page SecurityGroupListResultPage +} + +// 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 *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.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 *SecurityGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SecurityGroupListResultIterator) 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 SecurityGroupListResultIterator) Response() SecurityGroupListResult { + 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 SecurityGroupListResultIterator) Value() SecurityGroup { + if !iter.page.NotDone() { + return SecurityGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SecurityGroupListResultIterator type. +func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator { + return SecurityGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sglr SecurityGroupListResult) IsEmpty() bool { + return sglr.Value == nil || len(*sglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sglr SecurityGroupListResult) hasNextLink() bool { + return sglr.NextLink != nil && len(*sglr.NextLink) != 0 +} + +// securityGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sglr.NextLink))) +} + +// SecurityGroupListResultPage contains a page of SecurityGroup values. +type SecurityGroupListResultPage struct { + fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error) + sglr SecurityGroupListResult +} + +// 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 *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sglr) + if err != nil { + return err + } + page.sglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SecurityGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SecurityGroupListResultPage) NotDone() bool { + return !page.sglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { + return page.sglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SecurityGroupListResultPage) Values() []SecurityGroup { + if page.sglr.IsEmpty() { + return nil + } + return *page.sglr.Value +} + +// Creates a new instance of the SecurityGroupListResultPage type. +func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { + return SecurityGroupListResultPage{ + fn: getNextPage, + sglr: cur, + } +} + +// SecurityGroupNetworkInterface network interface and all its associated security rules. +type SecurityGroupNetworkInterface struct { + // ID - ID of the network interface. + ID *string `json:"id,omitempty"` + // SecurityRuleAssociations - All security rules associated with the network interface. + SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` +} + +// SecurityGroupPropertiesFormat network Security Group resource. +type SecurityGroupPropertiesFormat struct { + // SecurityRules - A collection of security rules of the network security group. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` + // DefaultSecurityRules - READ-ONLY; The default security rules of network security group. + DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` + // NetworkInterfaces - READ-ONLY; A collection of references to network interfaces. + NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` + // Subnets - READ-ONLY; A collection of references to subnets. + Subnets *[]Subnet `json:"subnets,omitempty"` + // FlowLogs - READ-ONLY; A collection of references to flow log resources. + FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat. +func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sgpf.SecurityRules != nil { + objectMap["securityRules"] = sgpf.SecurityRules + } + return json.Marshal(objectMap) +} + +// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query. +type SecurityGroupResult struct { + // SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"` + // EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic. + EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityGroupResult. +func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sgr.SecurityRuleAccessResult != "" { + objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult + } + return json.Marshal(objectMap) +} + +// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SecurityGroupsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SecurityGroupsClient) (SecurityGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result. +func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { + sg, err = client.CreateOrUpdateResponder(sg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SecurityGroupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SecurityGroupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SecurityGroupsDeleteFuture.Result. +func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SecurityGroupViewParameters parameters that define the VM to check security groups for. +type SecurityGroupViewParameters struct { + // TargetResourceID - ID of the target VM. + TargetResourceID *string `json:"targetResourceId,omitempty"` +} + +// SecurityGroupViewResult the information about security rules applied to the specified VM. +type SecurityGroupViewResult struct { + autorest.Response `json:"-"` + // NetworkInterfaces - List of network interfaces on the specified VM. + NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` +} + +// SecurityPartnerProvider security Partner Provider resource. +type SecurityPartnerProvider struct { + autorest.Response `json:"-"` + // SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider. + *SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 SecurityPartnerProvider. +func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spp.SecurityPartnerProviderPropertiesFormat != nil { + objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat + } + if spp.ID != nil { + objectMap["id"] = spp.ID + } + if spp.Location != nil { + objectMap["location"] = spp.Location + } + if spp.Tags != nil { + objectMap["tags"] = spp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct. +func (spp *SecurityPartnerProvider) 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 securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat + err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat) + if err != nil { + return err + } + spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + spp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spp.Tags = tags + } + } + } + + return nil +} + +// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call. +type SecurityPartnerProviderListResult struct { + autorest.Response `json:"-"` + // Value - List of Security Partner Providers in a resource group. + Value *[]SecurityPartnerProvider `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SecurityPartnerProviderListResultIterator provides access to a complete listing of +// SecurityPartnerProvider values. +type SecurityPartnerProviderListResultIterator struct { + i int + page SecurityPartnerProviderListResultPage +} + +// 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 *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.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 *SecurityPartnerProviderListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SecurityPartnerProviderListResultIterator) 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 SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult { + 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 SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider { + if !iter.page.NotDone() { + return SecurityPartnerProvider{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SecurityPartnerProviderListResultIterator type. +func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator { + return SecurityPartnerProviderListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spplr SecurityPartnerProviderListResult) IsEmpty() bool { + return spplr.Value == nil || len(*spplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spplr SecurityPartnerProviderListResult) hasNextLink() bool { + return spplr.NextLink != nil && len(*spplr.NextLink) != 0 +} + +// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spplr.NextLink))) +} + +// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values. +type SecurityPartnerProviderListResultPage struct { + fn func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error) + spplr SecurityPartnerProviderListResult +} + +// 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 *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spplr) + if err != nil { + return err + } + page.spplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SecurityPartnerProviderListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SecurityPartnerProviderListResultPage) NotDone() bool { + return !page.spplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult { + return page.spplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider { + if page.spplr.IsEmpty() { + return nil + } + return *page.spplr.Value +} + +// Creates a new instance of the SecurityPartnerProviderListResultPage type. +func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage { + return SecurityPartnerProviderListResultPage{ + fn: getNextPage, + spplr: cur, + } +} + +// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider. +type SecurityPartnerProviderPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // SecurityProviderName - The security provider name. Possible values include: 'SecurityProviderNameZScaler', 'SecurityProviderNameIBoss', 'SecurityProviderNameCheckpoint' + SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"` + // ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected' + ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"` + // VirtualHub - The virtualHub to which the Security Partner Provider belongs. + VirtualHub *SubResource `json:"virtualHub,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat. +func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spppf.SecurityProviderName != "" { + objectMap["securityProviderName"] = spppf.SecurityProviderName + } + if spppf.VirtualHub != nil { + objectMap["virtualHub"] = spppf.VirtualHub + } + return json.Marshal(objectMap) +} + +// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type SecurityPartnerProvidersCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SecurityPartnerProvidersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SecurityPartnerProvidersCreateOrUpdateFuture.Result. +func (future *SecurityPartnerProvidersCreateOrUpdateFuture) result(client SecurityPartnerProvidersClient) (spp SecurityPartnerProvider, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + spp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if spp.Response.Response, err = future.GetResult(sender); err == nil && spp.Response.Response.StatusCode != http.StatusNoContent { + spp, err = client.CreateOrUpdateResponder(spp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", spp.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SecurityPartnerProvidersDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SecurityPartnerProvidersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SecurityPartnerProvidersDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SecurityPartnerProvidersDeleteFuture.Result. +func (future *SecurityPartnerProvidersDeleteFuture) result(client SecurityPartnerProvidersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SecurityRule network security rule. +type SecurityRule struct { + autorest.Response `json:"-"` + // SecurityRulePropertiesFormat - Properties of the security rule. + *SecurityRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityRule. +func (sr SecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sr.SecurityRulePropertiesFormat != nil { + objectMap["properties"] = sr.SecurityRulePropertiesFormat + } + if sr.Name != nil { + objectMap["name"] = sr.Name + } + if sr.Type != nil { + objectMap["type"] = sr.Type + } + if sr.ID != nil { + objectMap["id"] = sr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. +func (sr *SecurityRule) 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 securityRulePropertiesFormat SecurityRulePropertiesFormat + err = json.Unmarshal(*v, &securityRulePropertiesFormat) + if err != nil { + return err + } + sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sr.ID = &ID + } + } + } + + return nil +} + +// SecurityRuleAssociations all security rules associated with the network interface. +type SecurityRuleAssociations struct { + // NetworkInterfaceAssociation - Network interface and it's custom security rules. + NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` + // SubnetAssociation - Subnet and it's custom security rules. + SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` + // DefaultSecurityRules - Collection of default security rules of the network security group. + DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` + // EffectiveSecurityRules - Collection of effective security rules. + EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` +} + +// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that +// belongs to a network security group. +type SecurityRuleListResult struct { + autorest.Response `json:"-"` + // Value - The security rules in a network security group. + Value *[]SecurityRule `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. +type SecurityRuleListResultIterator struct { + i int + page SecurityRuleListResultPage +} + +// 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 *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.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 *SecurityRuleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SecurityRuleListResultIterator) 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 SecurityRuleListResultIterator) Response() SecurityRuleListResult { + 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 SecurityRuleListResultIterator) Value() SecurityRule { + if !iter.page.NotDone() { + return SecurityRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SecurityRuleListResultIterator type. +func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator { + return SecurityRuleListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (srlr SecurityRuleListResult) IsEmpty() bool { + return srlr.Value == nil || len(*srlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (srlr SecurityRuleListResult) hasNextLink() bool { + return srlr.NextLink != nil && len(*srlr.NextLink) != 0 +} + +// securityRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !srlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(srlr.NextLink))) +} + +// SecurityRuleListResultPage contains a page of SecurityRule values. +type SecurityRuleListResultPage struct { + fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error) + srlr SecurityRuleListResult +} + +// 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 *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.srlr) + if err != nil { + return err + } + page.srlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SecurityRuleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SecurityRuleListResultPage) NotDone() bool { + return !page.srlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { + return page.srlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SecurityRuleListResultPage) Values() []SecurityRule { + if page.srlr.IsEmpty() { + return nil + } + return *page.srlr.Value +} + +// Creates a new instance of the SecurityRuleListResultPage type. +func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { + return SecurityRuleListResultPage{ + fn: getNextPage, + srlr: cur, + } +} + +// SecurityRulePropertiesFormat security rule resource. +type SecurityRulePropertiesFormat struct { + // Description - A description for this rule. Restricted to 140 chars. + Description *string `json:"description,omitempty"` + // Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh' + Protocol SecurityRuleProtocol `json:"protocol,omitempty"` + // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + SourcePortRange *string `json:"sourcePortRange,omitempty"` + // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + // SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + // SourceAddressPrefixes - The CIDR or source IP ranges. + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + // SourceApplicationSecurityGroups - The application security group specified as source. + SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` + // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges. + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + // DestinationApplicationSecurityGroups - The application security group specified as destination. + DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` + // SourcePortRanges - The source port ranges. + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - The destination port ranges. + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + // Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + Access SecurityRuleAccess `json:"access,omitempty"` + // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + Priority *int32 `json:"priority,omitempty"` + // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' + Direction SecurityRuleDirection `json:"direction,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat. +func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if srpf.Description != nil { + objectMap["description"] = srpf.Description + } + if srpf.Protocol != "" { + objectMap["protocol"] = srpf.Protocol + } + if srpf.SourcePortRange != nil { + objectMap["sourcePortRange"] = srpf.SourcePortRange + } + if srpf.DestinationPortRange != nil { + objectMap["destinationPortRange"] = srpf.DestinationPortRange + } + if srpf.SourceAddressPrefix != nil { + objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix + } + if srpf.SourceAddressPrefixes != nil { + objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes + } + if srpf.SourceApplicationSecurityGroups != nil { + objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups + } + if srpf.DestinationAddressPrefix != nil { + objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix + } + if srpf.DestinationAddressPrefixes != nil { + objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes + } + if srpf.DestinationApplicationSecurityGroups != nil { + objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups + } + if srpf.SourcePortRanges != nil { + objectMap["sourcePortRanges"] = srpf.SourcePortRanges + } + if srpf.DestinationPortRanges != nil { + objectMap["destinationPortRanges"] = srpf.DestinationPortRanges + } + if srpf.Access != "" { + objectMap["access"] = srpf.Access + } + if srpf.Priority != nil { + objectMap["priority"] = srpf.Priority + } + if srpf.Direction != "" { + objectMap["direction"] = srpf.Direction + } + return json.Marshal(objectMap) +} + +// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SecurityRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SecurityRulesClient) (SecurityRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result. +func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { + sr, err = client.CreateOrUpdateResponder(sr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SecurityRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SecurityRulesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SecurityRulesDeleteFuture.Result. +func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SecurityRulesEvaluationResult network security rules evaluation result. +type SecurityRulesEvaluationResult struct { + // Name - Name of the network security rule. + Name *string `json:"name,omitempty"` + // ProtocolMatched - Value indicating whether protocol is matched. + ProtocolMatched *bool `json:"protocolMatched,omitempty"` + // SourceMatched - Value indicating whether source is matched. + SourceMatched *bool `json:"sourceMatched,omitempty"` + // SourcePortMatched - Value indicating whether source port is matched. + SourcePortMatched *bool `json:"sourcePortMatched,omitempty"` + // DestinationMatched - Value indicating whether destination is matched. + DestinationMatched *bool `json:"destinationMatched,omitempty"` + // DestinationPortMatched - Value indicating whether destination port is matched. + DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"` +} + +// ServiceAssociationLink serviceAssociationLink resource. +type ServiceAssociationLink struct { + // ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format. + *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceAssociationLink. +func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sal.ServiceAssociationLinkPropertiesFormat != nil { + objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat + } + if sal.Name != nil { + objectMap["name"] = sal.Name + } + if sal.ID != nil { + objectMap["id"] = sal.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct. +func (sal *ServiceAssociationLink) 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 serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat + err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat) + if err != nil { + return err + } + sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sal.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sal.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sal.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sal.ID = &ID + } + } + } + + return nil +} + +// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink. +type ServiceAssociationLinkPropertiesFormat struct { + // LinkedResourceType - Resource type of the linked resource. + LinkedResourceType *string `json:"linkedResourceType,omitempty"` + // Link - Link to the external resource. + Link *string `json:"link,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // AllowDelete - If true, the resource can be deleted. + AllowDelete *bool `json:"allowDelete,omitempty"` + // Locations - A list of locations. + Locations *[]string `json:"locations,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat. +func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if salpf.LinkedResourceType != nil { + objectMap["linkedResourceType"] = salpf.LinkedResourceType + } + if salpf.Link != nil { + objectMap["link"] = salpf.Link + } + if salpf.AllowDelete != nil { + objectMap["allowDelete"] = salpf.AllowDelete + } + if salpf.Locations != nil { + objectMap["locations"] = salpf.Locations + } + return json.Marshal(objectMap) +} + +// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation. +type ServiceAssociationLinksListResult struct { + autorest.Response `json:"-"` + // Value - The service association links in a subnet. + Value *[]ServiceAssociationLink `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult. +func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sallr.Value != nil { + objectMap["value"] = sallr.Value + } + return json.Marshal(objectMap) +} + +// ServiceDelegationPropertiesFormat properties of a service delegation. +type ServiceDelegationPropertiesFormat struct { + // ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). + ServiceName *string `json:"serviceName,omitempty"` + // Actions - READ-ONLY; The actions permitted to the service upon delegation. + Actions *[]string `json:"actions,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat. +func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdpf.ServiceName != nil { + objectMap["serviceName"] = sdpf.ServiceName + } + return json.Marshal(objectMap) +} + +// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ServiceEndpointPoliciesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result. +func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sep.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent { + sep, err = client.CreateOrUpdateResponder(sep.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request") + } + } + return +} + +// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ServiceEndpointPoliciesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ServiceEndpointPoliciesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result. +func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ServiceEndpointPolicy service End point policy resource. +type ServiceEndpointPolicy struct { + autorest.Response `json:"-"` + // ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy. + *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Kind - READ-ONLY; Kind of service endpoint policy. This is metadata used for the Azure portal experience. + Kind *string `json:"kind,omitempty"` + // ID - 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 ServiceEndpointPolicy. +func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sep.ServiceEndpointPolicyPropertiesFormat != nil { + objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat + } + if sep.ID != nil { + objectMap["id"] = sep.ID + } + if sep.Location != nil { + objectMap["location"] = sep.Location + } + if sep.Tags != nil { + objectMap["tags"] = sep.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct. +func (sep *ServiceEndpointPolicy) 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 serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat + err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat) + if err != nil { + return err + } + sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sep.Etag = &etag + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sep.Kind = &kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sep.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sep.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sep.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sep.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sep.Tags = tags + } + } + } + + return nil +} + +// ServiceEndpointPolicyDefinition service Endpoint policy definitions. +type ServiceEndpointPolicyDefinition struct { + autorest.Response `json:"-"` + // ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition. + *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition. +func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil { + objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat + } + if sepd.Name != nil { + objectMap["name"] = sepd.Name + } + if sepd.Type != nil { + objectMap["type"] = sepd.Type + } + if sepd.ID != nil { + objectMap["id"] = sepd.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct. +func (sepd *ServiceEndpointPolicyDefinition) 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 serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat + err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat) + if err != nil { + return err + } + sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sepd.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sepd.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sepd.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sepd.ID = &ID + } + } + } + + return nil +} + +// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service +// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. +type ServiceEndpointPolicyDefinitionListResult struct { + autorest.Response `json:"-"` + // Value - The service endpoint policy definition in a service endpoint policy. + Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of +// ServiceEndpointPolicyDefinition values. +type ServiceEndpointPolicyDefinitionListResultIterator struct { + i int + page ServiceEndpointPolicyDefinitionListResultPage +} + +// 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 *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.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 *ServiceEndpointPolicyDefinitionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceEndpointPolicyDefinitionListResultIterator) 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 ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult { + 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 ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition { + if !iter.page.NotDone() { + return ServiceEndpointPolicyDefinition{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type. +func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator { + return ServiceEndpointPolicyDefinitionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool { + return sepdlr.Value == nil || len(*sepdlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool { + return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0 +} + +// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sepdlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sepdlr.NextLink))) +} + +// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values. +type ServiceEndpointPolicyDefinitionListResultPage struct { + fn func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error) + sepdlr ServiceEndpointPolicyDefinitionListResult +} + +// 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 *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sepdlr) + if err != nil { + return err + } + page.sepdlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServiceEndpointPolicyDefinitionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool { + return !page.sepdlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult { + return page.sepdlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition { + if page.sepdlr.IsEmpty() { + return nil + } + return *page.sepdlr.Value +} + +// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type. +func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage { + return ServiceEndpointPolicyDefinitionListResultPage{ + fn: getNextPage, + sepdlr: cur, + } +} + +// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource. +type ServiceEndpointPolicyDefinitionPropertiesFormat struct { + // Description - A description for this rule. Restricted to 140 chars. + Description *string `json:"description,omitempty"` + // Service - Service endpoint name. + Service *string `json:"service,omitempty"` + // ServiceResources - A list of service resources. + ServiceResources *[]string `json:"serviceResources,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat. +func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sepdpf.Description != nil { + objectMap["description"] = sepdpf.Description + } + if sepdpf.Service != nil { + objectMap["service"] = sepdpf.Service + } + if sepdpf.ServiceResources != nil { + objectMap["serviceResources"] = sepdpf.ServiceResources + } + return json.Marshal(objectMap) +} + +// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result. +func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sepd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent { + sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request") + } + } + return +} + +// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ServiceEndpointPolicyDefinitionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result. +func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call. +type ServiceEndpointPolicyListResult struct { + autorest.Response `json:"-"` + // Value - A list of ServiceEndpointPolicy resources. + Value *[]ServiceEndpointPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult. +func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if seplr.Value != nil { + objectMap["value"] = seplr.Value + } + return json.Marshal(objectMap) +} + +// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy +// values. +type ServiceEndpointPolicyListResultIterator struct { + i int + page ServiceEndpointPolicyListResultPage +} + +// 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 *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.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 *ServiceEndpointPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceEndpointPolicyListResultIterator) 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 ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult { + 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 ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy { + if !iter.page.NotDone() { + return ServiceEndpointPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceEndpointPolicyListResultIterator type. +func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator { + return ServiceEndpointPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool { + return seplr.Value == nil || len(*seplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool { + return seplr.NextLink != nil && len(*seplr.NextLink) != 0 +} + +// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !seplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(seplr.NextLink))) +} + +// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values. +type ServiceEndpointPolicyListResultPage struct { + fn func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error) + seplr ServiceEndpointPolicyListResult +} + +// 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 *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.seplr) + if err != nil { + return err + } + page.seplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServiceEndpointPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceEndpointPolicyListResultPage) NotDone() bool { + return !page.seplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult { + return page.seplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy { + if page.seplr.IsEmpty() { + return nil + } + return *page.seplr.Value +} + +// Creates a new instance of the ServiceEndpointPolicyListResultPage type. +func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { + return ServiceEndpointPolicyListResultPage{ + fn: getNextPage, + seplr: cur, + } +} + +// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource. +type ServiceEndpointPolicyPropertiesFormat struct { + // ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy. + ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` + // Subnets - READ-ONLY; A collection of references to subnets. + Subnets *[]Subnet `json:"subnets,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ServiceAlias - The alias indicating if the policy belongs to a service + ServiceAlias *string `json:"serviceAlias,omitempty"` + // ContextualServiceEndpointPolicies - A collection of contextual service endpoint policy. + ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat. +func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if seppf.ServiceEndpointPolicyDefinitions != nil { + objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions + } + if seppf.ServiceAlias != nil { + objectMap["serviceAlias"] = seppf.ServiceAlias + } + if seppf.ContextualServiceEndpointPolicies != nil { + objectMap["contextualServiceEndpointPolicies"] = seppf.ContextualServiceEndpointPolicies + } + return json.Marshal(objectMap) +} + +// ServiceEndpointPropertiesFormat the service endpoint properties. +type ServiceEndpointPropertiesFormat struct { + // Service - The type of the endpoint service. + Service *string `json:"service,omitempty"` + // Locations - A list of locations. + Locations *[]string `json:"locations,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat. +func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sepf.Service != nil { + objectMap["service"] = sepf.Service + } + if sepf.Locations != nil { + objectMap["locations"] = sepf.Locations + } + return json.Marshal(objectMap) +} + +// ServiceTagInformation the service tag information. +type ServiceTagInformation struct { + // Properties - READ-ONLY; Properties of the service tag information. + Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"` + // Name - READ-ONLY; The name of service tag. + Name *string `json:"name,omitempty"` + // ID - READ-ONLY; The ID of service tag. + ID *string `json:"id,omitempty"` + // ServiceTagChangeNumber - READ-ONLY; The iteration number of service tag object for region. + ServiceTagChangeNumber *string `json:"serviceTagChangeNumber,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceTagInformation. +func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServiceTagInformationListResult response for Get ServiceTagInformation API service call. Retrieves the +// list of service tag information resources. +type ServiceTagInformationListResult struct { + autorest.Response `json:"-"` + // Value - The list of service tag information resources. + Value *[]ServiceTagInformation `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceTagInformationListResult. +func (stilr ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if stilr.Value != nil { + objectMap["value"] = stilr.Value + } + return json.Marshal(objectMap) +} + +// ServiceTagInformationListResultIterator provides access to a complete listing of ServiceTagInformation +// values. +type ServiceTagInformationListResultIterator struct { + i int + page ServiceTagInformationListResultPage +} + +// 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 *ServiceTagInformationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationListResultIterator.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 *ServiceTagInformationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceTagInformationListResultIterator) 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 ServiceTagInformationListResultIterator) Response() ServiceTagInformationListResult { + 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 ServiceTagInformationListResultIterator) Value() ServiceTagInformation { + if !iter.page.NotDone() { + return ServiceTagInformation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceTagInformationListResultIterator type. +func NewServiceTagInformationListResultIterator(page ServiceTagInformationListResultPage) ServiceTagInformationListResultIterator { + return ServiceTagInformationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (stilr ServiceTagInformationListResult) IsEmpty() bool { + return stilr.Value == nil || len(*stilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (stilr ServiceTagInformationListResult) hasNextLink() bool { + return stilr.NextLink != nil && len(*stilr.NextLink) != 0 +} + +// serviceTagInformationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (stilr ServiceTagInformationListResult) serviceTagInformationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !stilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(stilr.NextLink))) +} + +// ServiceTagInformationListResultPage contains a page of ServiceTagInformation values. +type ServiceTagInformationListResultPage struct { + fn func(context.Context, ServiceTagInformationListResult) (ServiceTagInformationListResult, error) + stilr ServiceTagInformationListResult +} + +// 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 *ServiceTagInformationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.stilr) + if err != nil { + return err + } + page.stilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServiceTagInformationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceTagInformationListResultPage) NotDone() bool { + return !page.stilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceTagInformationListResultPage) Response() ServiceTagInformationListResult { + return page.stilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceTagInformationListResultPage) Values() []ServiceTagInformation { + if page.stilr.IsEmpty() { + return nil + } + return *page.stilr.Value +} + +// Creates a new instance of the ServiceTagInformationListResultPage type. +func NewServiceTagInformationListResultPage(cur ServiceTagInformationListResult, getNextPage func(context.Context, ServiceTagInformationListResult) (ServiceTagInformationListResult, error)) ServiceTagInformationListResultPage { + return ServiceTagInformationListResultPage{ + fn: getNextPage, + stilr: cur, + } +} + +// ServiceTagInformationPropertiesFormat properties of the service tag information. +type ServiceTagInformationPropertiesFormat struct { + // ChangeNumber - READ-ONLY; The iteration number of service tag. + ChangeNumber *string `json:"changeNumber,omitempty"` + // Region - READ-ONLY; The region of service tag. + Region *string `json:"region,omitempty"` + // SystemService - READ-ONLY; The name of system service. + SystemService *string `json:"systemService,omitempty"` + // AddressPrefixes - READ-ONLY; The list of IP address prefixes. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + // State - READ-ONLY; The state of the service tag. + State *string `json:"state,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat. +func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServiceTagsListResult response for the ListServiceTags API service call. +type ServiceTagsListResult struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; The name of the cloud. + Name *string `json:"name,omitempty"` + // ID - READ-ONLY; The ID of the cloud. + ID *string `json:"id,omitempty"` + // Type - READ-ONLY; The azure resource type. + Type *string `json:"type,omitempty"` + // ChangeNumber - READ-ONLY; The iteration number. + ChangeNumber *string `json:"changeNumber,omitempty"` + // Cloud - READ-ONLY; The name of the cloud. + Cloud *string `json:"cloud,omitempty"` + // Values - READ-ONLY; The list of service tag information resources. + Values *[]ServiceTagInformation `json:"values,omitempty"` + // NextLink - READ-ONLY; The URL to get next page of service tag information resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceTagsListResult. +func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SessionIds list of session IDs. +type SessionIds struct { + // SessionIds - List of session IDs. + SessionIds *[]string `json:"sessionIds,omitempty"` +} + +// Sku the sku of this Bastion Host. +type Sku struct { + // Name - The name of this Bastion Host. Possible values include: 'BastionHostSkuNameBasic', 'BastionHostSkuNameStandard' + Name BastionHostSkuName `json:"name,omitempty"` +} + +// StaticRoute list of all Static Routes. +type StaticRoute struct { + // Name - The name of the StaticRoute that is unique within a VnetRoute. + Name *string `json:"name,omitempty"` + // AddressPrefixes - List of all address prefixes. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + // NextHopIPAddress - The ip address of the next hop. + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` +} + +// String ... +type String struct { + autorest.Response `json:"-"` + Value *string `json:"value,omitempty"` +} + +// Subnet subnet in a virtual network resource. +type Subnet struct { + autorest.Response `json:"-"` + // SubnetPropertiesFormat - Properties of the subnet. + *SubnetPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for Subnet. +func (s Subnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.SubnetPropertiesFormat != nil { + objectMap["properties"] = s.SubnetPropertiesFormat + } + if s.Name != nil { + objectMap["name"] = s.Name + } + if s.Type != nil { + objectMap["type"] = s.Type + } + if s.ID != nil { + objectMap["id"] = s.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Subnet struct. +func (s *Subnet) 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 subnetPropertiesFormat SubnetPropertiesFormat + err = json.Unmarshal(*v, &subnetPropertiesFormat) + if err != nil { + return err + } + s.SubnetPropertiesFormat = &subnetPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + s.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + } + } + + return nil +} + +// SubnetAssociation subnet and it's custom security rules. +type SubnetAssociation struct { + // ID - READ-ONLY; Subnet ID. + ID *string `json:"id,omitempty"` + // SecurityRules - Collection of custom security rules. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` +} + +// MarshalJSON is the custom marshaler for SubnetAssociation. +func (sa SubnetAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sa.SecurityRules != nil { + objectMap["securityRules"] = sa.SecurityRules + } + return json.Marshal(objectMap) +} + +// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual +// network. +type SubnetListResult struct { + autorest.Response `json:"-"` + // Value - The subnets in a virtual network. + Value *[]Subnet `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SubnetListResultIterator provides access to a complete listing of Subnet values. +type SubnetListResultIterator struct { + i int + page SubnetListResultPage +} + +// 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 *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.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 *SubnetListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SubnetListResultIterator) 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 SubnetListResultIterator) Response() SubnetListResult { + 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 SubnetListResultIterator) Value() Subnet { + if !iter.page.NotDone() { + return Subnet{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SubnetListResultIterator type. +func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator { + return SubnetListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (slr SubnetListResult) IsEmpty() bool { + return slr.Value == nil || len(*slr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (slr SubnetListResult) hasNextLink() bool { + return slr.NextLink != nil && len(*slr.NextLink) != 0 +} + +// subnetListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) { + if !slr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(slr.NextLink))) +} + +// SubnetListResultPage contains a page of Subnet values. +type SubnetListResultPage struct { + fn func(context.Context, SubnetListResult) (SubnetListResult, error) + slr SubnetListResult +} + +// 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 *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.slr) + if err != nil { + return err + } + page.slr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SubnetListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SubnetListResultPage) NotDone() bool { + return !page.slr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SubnetListResultPage) Response() SubnetListResult { + return page.slr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SubnetListResultPage) Values() []Subnet { + if page.slr.IsEmpty() { + return nil + } + return *page.slr.Value +} + +// Creates a new instance of the SubnetListResultPage type. +func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { + return SubnetListResultPage{ + fn: getNextPage, + slr: cur, + } +} + +// SubnetPropertiesFormat properties of the subnet. +type SubnetPropertiesFormat struct { + // AddressPrefix - The address prefix for the subnet. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // AddressPrefixes - List of address prefixes for the subnet. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + // NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` + // RouteTable - The reference to the RouteTable resource. + RouteTable *RouteTable `json:"routeTable,omitempty"` + // NatGateway - Nat gateway associated with this subnet. + NatGateway *SubResource `json:"natGateway,omitempty"` + // ServiceEndpoints - An array of service endpoints. + ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` + // ServiceEndpointPolicies - An array of service endpoint policies. + ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` + // PrivateEndpoints - READ-ONLY; An array of references to private endpoints. + PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` + // IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet. + IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` + // IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet. + IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` + // IPAllocations - Array of IpAllocation which reference this subnet. + IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` + // ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet. + ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` + // ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet. + ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` + // Delegations - An array of references to the delegations on the subnet. + Delegations *[]Delegation `json:"delegations,omitempty"` + // Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. + Purpose *string `json:"purpose,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. Possible values include: 'VirtualNetworkPrivateEndpointNetworkPoliciesEnabled', 'VirtualNetworkPrivateEndpointNetworkPoliciesDisabled' + PrivateEndpointNetworkPolicies VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` + // PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet. Possible values include: 'VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled', 'VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled' + PrivateLinkServiceNetworkPolicies VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` + // ApplicationGatewayIPConfigurations - Application gateway IP configurations of virtual network resource. + ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIpConfigurations,omitempty"` +} + +// MarshalJSON is the custom marshaler for SubnetPropertiesFormat. +func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spf.AddressPrefix != nil { + objectMap["addressPrefix"] = spf.AddressPrefix + } + if spf.AddressPrefixes != nil { + objectMap["addressPrefixes"] = spf.AddressPrefixes + } + if spf.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup + } + if spf.RouteTable != nil { + objectMap["routeTable"] = spf.RouteTable + } + if spf.NatGateway != nil { + objectMap["natGateway"] = spf.NatGateway + } + if spf.ServiceEndpoints != nil { + objectMap["serviceEndpoints"] = spf.ServiceEndpoints + } + if spf.ServiceEndpointPolicies != nil { + objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies + } + if spf.IPAllocations != nil { + objectMap["ipAllocations"] = spf.IPAllocations + } + if spf.Delegations != nil { + objectMap["delegations"] = spf.Delegations + } + if spf.PrivateEndpointNetworkPolicies != "" { + objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies + } + if spf.PrivateLinkServiceNetworkPolicies != "" { + objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies + } + if spf.ApplicationGatewayIPConfigurations != nil { + objectMap["applicationGatewayIpConfigurations"] = spf.ApplicationGatewayIPConfigurations + } + return json.Marshal(objectMap) +} + +// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SubnetsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SubnetsClient) (Subnet, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SubnetsCreateOrUpdateFuture.Result. +func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SubnetsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SubnetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SubnetsDeleteFuture.Result. +func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SubnetsPrepareNetworkPoliciesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SubnetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result. +func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture") + return + } + ar.Response = future.Response() + return +} + +// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SubnetsUnprepareNetworkPoliciesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SubnetsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result. +func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture") + return + } + ar.Response = future.Response() + return +} + +// SubResource reference to another subresource. +type SubResource struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// TagsObject tags object for patch operations. +type TagsObject struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TagsObject. +func (toVar TagsObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if toVar.Tags != nil { + objectMap["tags"] = toVar.Tags + } + return json.Marshal(objectMap) +} + +// Topology topology of the specified resource group. +type Topology struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; GUID representing the operation id. + ID *string `json:"id,omitempty"` + // CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group. + CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` + // LastModified - READ-ONLY; The datetime when the topology was last modified. + LastModified *date.Time `json:"lastModified,omitempty"` + // Resources - A list of topology resources. + Resources *[]TopologyResource `json:"resources,omitempty"` +} + +// MarshalJSON is the custom marshaler for Topology. +func (t Topology) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.Resources != nil { + objectMap["resources"] = t.Resources + } + return json.Marshal(objectMap) +} + +// TopologyAssociation resources that have an association with the parent resource. +type TopologyAssociation struct { + // Name - The name of the resource that is associated with the parent resource. + Name *string `json:"name,omitempty"` + // ResourceID - The ID of the resource that is associated with the parent resource. + ResourceID *string `json:"resourceId,omitempty"` + // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'AssociationTypeAssociated', 'AssociationTypeContains' + AssociationType AssociationType `json:"associationType,omitempty"` +} + +// TopologyParameters parameters that define the representation of topology. +type TopologyParameters struct { + // TargetResourceGroupName - The name of the target resource group to perform topology on. + TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` + // TargetVirtualNetwork - The reference to the Virtual Network resource. + TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` + // TargetSubnet - The reference to the Subnet resource. + TargetSubnet *SubResource `json:"targetSubnet,omitempty"` +} + +// TopologyResource the network resource topology information for the given resource group. +type TopologyResource struct { + // Name - Name of the resource. + Name *string `json:"name,omitempty"` + // ID - ID of the resource. + ID *string `json:"id,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Associations - Holds the associations the resource has with other resources in the resource group. + Associations *[]TopologyAssociation `json:"associations,omitempty"` +} + +// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics. +type TrafficAnalyticsConfigurationProperties struct { + // Enabled - Flag to enable/disable traffic analytics. + Enabled *bool `json:"enabled,omitempty"` + // WorkspaceID - The resource guid of the attached workspace. + WorkspaceID *string `json:"workspaceId,omitempty"` + // WorkspaceRegion - The location of the attached workspace. + WorkspaceRegion *string `json:"workspaceRegion,omitempty"` + // WorkspaceResourceID - Resource Id of the attached workspace. + WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` + // TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics. + TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"` +} + +// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics. +type TrafficAnalyticsProperties struct { + // NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. + NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` +} + +// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection. +type TrafficSelectorPolicy struct { + // LocalAddressRanges - A collection of local address spaces in CIDR format. + LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"` + // RemoteAddressRanges - A collection of remote address spaces in CIDR format. + RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"` +} + +// TroubleshootingDetails information gained from troubleshooting of specified resource. +type TroubleshootingDetails struct { + // ID - The id of the get troubleshoot operation. + ID *string `json:"id,omitempty"` + // ReasonType - Reason type of failure. + ReasonType *string `json:"reasonType,omitempty"` + // Summary - A summary of troubleshooting. + Summary *string `json:"summary,omitempty"` + // Detail - Details on troubleshooting results. + Detail *string `json:"detail,omitempty"` + // RecommendedActions - List of recommended actions. + RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` +} + +// TroubleshootingParameters parameters that define the resource to troubleshoot. +type TroubleshootingParameters struct { + // TargetResourceID - The target resource to troubleshoot. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // TroubleshootingProperties - Properties of the troubleshooting resource. + *TroubleshootingProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for TroubleshootingParameters. +func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tp.TargetResourceID != nil { + objectMap["targetResourceId"] = tp.TargetResourceID + } + if tp.TroubleshootingProperties != nil { + objectMap["properties"] = tp.TroubleshootingProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct. +func (tp *TroubleshootingParameters) 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 "targetResourceId": + if v != nil { + var targetResourceID string + err = json.Unmarshal(*v, &targetResourceID) + if err != nil { + return err + } + tp.TargetResourceID = &targetResourceID + } + case "properties": + if v != nil { + var troubleshootingProperties TroubleshootingProperties + err = json.Unmarshal(*v, &troubleshootingProperties) + if err != nil { + return err + } + tp.TroubleshootingProperties = &troubleshootingProperties + } + } + } + + return nil +} + +// TroubleshootingProperties storage location provided for troubleshoot. +type TroubleshootingProperties struct { + // StorageID - The ID for the storage account to save the troubleshoot result. + StorageID *string `json:"storageId,omitempty"` + // StoragePath - The path to the blob to save the troubleshoot result in. + StoragePath *string `json:"storagePath,omitempty"` +} + +// TroubleshootingRecommendedActions recommended actions based on discovered issues. +type TroubleshootingRecommendedActions struct { + // ActionID - ID of the recommended action. + ActionID *string `json:"actionId,omitempty"` + // ActionText - Description of recommended actions. + ActionText *string `json:"actionText,omitempty"` + // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions. + ActionURI *string `json:"actionUri,omitempty"` + // ActionURIText - The information from the URI for the recommended troubleshooting actions. + ActionURIText *string `json:"actionUriText,omitempty"` +} + +// TroubleshootingResult troubleshooting information gained from specified resource. +type TroubleshootingResult struct { + autorest.Response `json:"-"` + // StartTime - The start time of the troubleshooting. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the troubleshooting. + EndTime *date.Time `json:"endTime,omitempty"` + // Code - The result code of the troubleshooting. + Code *string `json:"code,omitempty"` + // Results - Information from troubleshooting. + Results *[]TroubleshootingDetails `json:"results,omitempty"` +} + +// TunnelConnectionHealth virtualNetworkGatewayConnection properties. +type TunnelConnectionHealth struct { + // Tunnel - READ-ONLY; Tunnel name. + Tunnel *string `json:"tunnel,omitempty"` + // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format. + LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for TunnelConnectionHealth. +func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet. +type UnprepareNetworkPoliciesRequest struct { + // ServiceName - The name of the service for which subnet is being unprepared for. + ServiceName *string `json:"serviceName,omitempty"` +} + +// Usage the network resource usage. +type Usage struct { + // ID - READ-ONLY; Resource identifier. + ID *string `json:"id,omitempty"` + // Unit - An enum describing the unit of measurement. + Unit *string `json:"unit,omitempty"` + // CurrentValue - The current value of the usage. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - The limit of usage. + Limit *int64 `json:"limit,omitempty"` + // Name - The name of the type of usage. + Name *UsageName `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if u.Unit != nil { + objectMap["unit"] = u.Unit + } + if u.CurrentValue != nil { + objectMap["currentValue"] = u.CurrentValue + } + if u.Limit != nil { + objectMap["limit"] = u.Limit + } + if u.Name != nil { + objectMap["name"] = u.Name + } + return json.Marshal(objectMap) +} + +// UsageName the usage names. +type UsageName struct { + // Value - A string describing the resource name. + Value *string `json:"value,omitempty"` + // LocalizedValue - A localized string describing the resource name. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// UsagesListResult the list usages operation response. +type UsagesListResult struct { + autorest.Response `json:"-"` + // Value - The list network resource usages. + Value *[]Usage `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// UsagesListResultIterator provides access to a complete listing of Usage values. +type UsagesListResultIterator struct { + i int + page UsagesListResultPage +} + +// 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 *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.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 *UsagesListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter UsagesListResultIterator) 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 UsagesListResultIterator) Response() UsagesListResult { + 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 UsagesListResultIterator) Value() Usage { + if !iter.page.NotDone() { + return Usage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the UsagesListResultIterator type. +func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator { + return UsagesListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ulr UsagesListResult) IsEmpty() bool { + return ulr.Value == nil || len(*ulr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ulr UsagesListResult) hasNextLink() bool { + return ulr.NextLink != nil && len(*ulr.NextLink) != 0 +} + +// usagesListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ulr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ulr.NextLink))) +} + +// UsagesListResultPage contains a page of Usage values. +type UsagesListResultPage struct { + fn func(context.Context, UsagesListResult) (UsagesListResult, error) + ulr UsagesListResult +} + +// 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 *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ulr) + if err != nil { + return err + } + page.ulr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *UsagesListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page UsagesListResultPage) NotDone() bool { + return !page.ulr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page UsagesListResultPage) Response() UsagesListResult { + return page.ulr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page UsagesListResultPage) Values() []Usage { + if page.ulr.IsEmpty() { + return nil + } + return *page.ulr.Value +} + +// Creates a new instance of the UsagesListResultPage type. +func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage { + return UsagesListResultPage{ + fn: getNextPage, + ulr: cur, + } +} + +// VerificationIPFlowParameters parameters that define the IP flow to be verified. +type VerificationIPFlowParameters struct { + // TargetResourceID - The ID of the target resource to perform next-hop on. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'DirectionInbound', 'DirectionOutbound' + Direction Direction `json:"direction,omitempty"` + // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP' + Protocol IPFlowProtocol `json:"protocol,omitempty"` + // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + LocalPort *string `json:"localPort,omitempty"` + // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + RemotePort *string `json:"remotePort,omitempty"` + // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses. + LocalIPAddress *string `json:"localIPAddress,omitempty"` + // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses. + RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` + // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). + TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` +} + +// VerificationIPFlowResult results of IP flow verification on the target resource. +type VerificationIPFlowResult struct { + autorest.Response `json:"-"` + // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'AccessAllow', 'AccessDeny' + Access Access `json:"access,omitempty"` + // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed. + RuleName *string `json:"ruleName,omitempty"` +} + +// VirtualAppliance networkVirtualAppliance Resource. +type VirtualAppliance struct { + autorest.Response `json:"-"` + // VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance. + *VirtualAppliancePropertiesFormat `json:"properties,omitempty"` + // Identity - The service principal that has read access to cloud-init and config blob. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualAppliance. +func (va VirtualAppliance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if va.VirtualAppliancePropertiesFormat != nil { + objectMap["properties"] = va.VirtualAppliancePropertiesFormat + } + if va.Identity != nil { + objectMap["identity"] = va.Identity + } + if va.ID != nil { + objectMap["id"] = va.ID + } + if va.Location != nil { + objectMap["location"] = va.Location + } + if va.Tags != nil { + objectMap["tags"] = va.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct. +func (va *VirtualAppliance) 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 virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat + err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat) + if err != nil { + return err + } + va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + va.Identity = &identity + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + va.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + va.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + va.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + va.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + va.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + va.Tags = tags + } + } + } + + return nil +} + +// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call. +type VirtualApplianceListResult struct { + autorest.Response `json:"-"` + // Value - List of Network Virtual Appliances. + Value *[]VirtualAppliance `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values. +type VirtualApplianceListResultIterator struct { + i int + page VirtualApplianceListResultPage +} + +// 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 *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.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 *VirtualApplianceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualApplianceListResultIterator) 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 VirtualApplianceListResultIterator) Response() VirtualApplianceListResult { + 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 VirtualApplianceListResultIterator) Value() VirtualAppliance { + if !iter.page.NotDone() { + return VirtualAppliance{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualApplianceListResultIterator type. +func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator { + return VirtualApplianceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (valr VirtualApplianceListResult) IsEmpty() bool { + return valr.Value == nil || len(*valr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (valr VirtualApplianceListResult) hasNextLink() bool { + return valr.NextLink != nil && len(*valr.NextLink) != 0 +} + +// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !valr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(valr.NextLink))) +} + +// VirtualApplianceListResultPage contains a page of VirtualAppliance values. +type VirtualApplianceListResultPage struct { + fn func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error) + valr VirtualApplianceListResult +} + +// 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 *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.valr) + if err != nil { + return err + } + page.valr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualApplianceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualApplianceListResultPage) NotDone() bool { + return !page.valr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult { + return page.valr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualApplianceListResultPage) Values() []VirtualAppliance { + if page.valr.IsEmpty() { + return nil + } + return *page.valr.Value +} + +// Creates a new instance of the VirtualApplianceListResultPage type. +func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage { + return VirtualApplianceListResultPage{ + fn: getNextPage, + valr: cur, + } +} + +// VirtualApplianceNicProperties network Virtual Appliance NIC properties. +type VirtualApplianceNicProperties struct { + // Name - READ-ONLY; NIC name. + Name *string `json:"name,omitempty"` + // PublicIPAddress - READ-ONLY; Public IP address. + PublicIPAddress *string `json:"publicIpAddress,omitempty"` + // PrivateIPAddress - READ-ONLY; Private IP address. + PrivateIPAddress *string `json:"privateIpAddress,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualApplianceNicProperties. +func (vanp VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualAppliancePropertiesFormat network Virtual Appliance definition. +type VirtualAppliancePropertiesFormat struct { + // NvaSku - Network Virtual Appliance SKU. + NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"` + // AddressPrefix - READ-ONLY; Address Prefix. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // BootStrapConfigurationBlobs - BootStrapConfigurationBlobs storage URLs. + BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"` + // VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed. + VirtualHub *SubResource `json:"virtualHub,omitempty"` + // CloudInitConfigurationBlobs - CloudInitConfigurationBlob storage URLs. + CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"` + // CloudInitConfiguration - CloudInitConfiguration string in plain text. + CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"` + // VirtualApplianceAsn - VirtualAppliance ASN. + VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"` + // SSHPublicKey - Public key for SSH login. + SSHPublicKey *string `json:"sshPublicKey,omitempty"` + // VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces. + VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"` + // VirtualApplianceSites - READ-ONLY; List of references to VirtualApplianceSite. + VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"` + // InboundSecurityRules - READ-ONLY; List of references to InboundSecurityRules. + InboundSecurityRules *[]SubResource `json:"inboundSecurityRules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat. +func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vapf.NvaSku != nil { + objectMap["nvaSku"] = vapf.NvaSku + } + if vapf.BootStrapConfigurationBlobs != nil { + objectMap["bootStrapConfigurationBlobs"] = vapf.BootStrapConfigurationBlobs + } + if vapf.VirtualHub != nil { + objectMap["virtualHub"] = vapf.VirtualHub + } + if vapf.CloudInitConfigurationBlobs != nil { + objectMap["cloudInitConfigurationBlobs"] = vapf.CloudInitConfigurationBlobs + } + if vapf.CloudInitConfiguration != nil { + objectMap["cloudInitConfiguration"] = vapf.CloudInitConfiguration + } + if vapf.VirtualApplianceAsn != nil { + objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn + } + if vapf.SSHPublicKey != nil { + objectMap["sshPublicKey"] = vapf.SSHPublicKey + } + return json.Marshal(objectMap) +} + +// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualAppliancesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualAppliancesClient) (VirtualAppliance, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualAppliancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualAppliancesCreateOrUpdateFuture.Result. +func (future *VirtualAppliancesCreateOrUpdateFuture) result(client VirtualAppliancesClient) (va VirtualAppliance, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + va.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if va.Response.Response, err = future.GetResult(sender); err == nil && va.Response.Response.StatusCode != http.StatusNoContent { + va, err = client.CreateOrUpdateResponder(va.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", va.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualAppliancesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualAppliancesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualAppliancesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualAppliancesDeleteFuture.Result. +func (future *VirtualAppliancesDeleteFuture) result(client VirtualAppliancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualApplianceSite virtual Appliance Site resource. +type VirtualApplianceSite struct { + autorest.Response `json:"-"` + // VirtualApplianceSiteProperties - The properties of the Virtual Appliance Sites. + *VirtualApplianceSiteProperties `json:"properties,omitempty"` + // Name - Name of the virtual appliance site. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Site type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualApplianceSite. +func (vas VirtualApplianceSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vas.VirtualApplianceSiteProperties != nil { + objectMap["properties"] = vas.VirtualApplianceSiteProperties + } + if vas.Name != nil { + objectMap["name"] = vas.Name + } + if vas.ID != nil { + objectMap["id"] = vas.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSite struct. +func (vas *VirtualApplianceSite) 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 virtualApplianceSiteProperties VirtualApplianceSiteProperties + err = json.Unmarshal(*v, &virtualApplianceSiteProperties) + if err != nil { + return err + } + vas.VirtualApplianceSiteProperties = &virtualApplianceSiteProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vas.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vas.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vas.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vas.ID = &ID + } + } + } + + return nil +} + +// VirtualApplianceSiteListResult response for ListNetworkVirtualApplianceSites API service call. +type VirtualApplianceSiteListResult struct { + autorest.Response `json:"-"` + // Value - List of Network Virtual Appliance sites. + Value *[]VirtualApplianceSite `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualApplianceSiteListResultIterator provides access to a complete listing of VirtualApplianceSite +// values. +type VirtualApplianceSiteListResultIterator struct { + i int + page VirtualApplianceSiteListResultPage +} + +// 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 *VirtualApplianceSiteListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultIterator.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 *VirtualApplianceSiteListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualApplianceSiteListResultIterator) 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 VirtualApplianceSiteListResultIterator) Response() VirtualApplianceSiteListResult { + 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 VirtualApplianceSiteListResultIterator) Value() VirtualApplianceSite { + if !iter.page.NotDone() { + return VirtualApplianceSite{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualApplianceSiteListResultIterator type. +func NewVirtualApplianceSiteListResultIterator(page VirtualApplianceSiteListResultPage) VirtualApplianceSiteListResultIterator { + return VirtualApplianceSiteListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vaslr VirtualApplianceSiteListResult) IsEmpty() bool { + return vaslr.Value == nil || len(*vaslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vaslr VirtualApplianceSiteListResult) hasNextLink() bool { + return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0 +} + +// virtualApplianceSiteListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vaslr VirtualApplianceSiteListResult) virtualApplianceSiteListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vaslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vaslr.NextLink))) +} + +// VirtualApplianceSiteListResultPage contains a page of VirtualApplianceSite values. +type VirtualApplianceSiteListResultPage struct { + fn func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error) + vaslr VirtualApplianceSiteListResult +} + +// 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 *VirtualApplianceSiteListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vaslr) + if err != nil { + return err + } + page.vaslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualApplianceSiteListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualApplianceSiteListResultPage) NotDone() bool { + return !page.vaslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualApplianceSiteListResultPage) Response() VirtualApplianceSiteListResult { + return page.vaslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualApplianceSiteListResultPage) Values() []VirtualApplianceSite { + if page.vaslr.IsEmpty() { + return nil + } + return *page.vaslr.Value +} + +// Creates a new instance of the VirtualApplianceSiteListResultPage type. +func NewVirtualApplianceSiteListResultPage(cur VirtualApplianceSiteListResult, getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage { + return VirtualApplianceSiteListResultPage{ + fn: getNextPage, + vaslr: cur, + } +} + +// VirtualApplianceSiteProperties properties of the rule group. +type VirtualApplianceSiteProperties struct { + // AddressPrefix - Address Prefix. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // O365Policy - Office 365 Policy. + O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualApplianceSiteProperties. +func (vasp VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vasp.AddressPrefix != nil { + objectMap["addressPrefix"] = vasp.AddressPrefix + } + if vasp.O365Policy != nil { + objectMap["o365Policy"] = vasp.O365Policy + } + return json.Marshal(objectMap) +} + +// VirtualApplianceSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualApplianceSitesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualApplianceSitesClient) (VirtualApplianceSite, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualApplianceSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualApplianceSitesCreateOrUpdateFuture.Result. +func (future *VirtualApplianceSitesCreateOrUpdateFuture) result(client VirtualApplianceSitesClient) (vas VirtualApplianceSite, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vas.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualApplianceSitesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vas.Response.Response, err = future.GetResult(sender); err == nil && vas.Response.Response.StatusCode != http.StatusNoContent { + vas, err = client.CreateOrUpdateResponder(vas.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesCreateOrUpdateFuture", "Result", vas.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualApplianceSitesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualApplianceSitesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualApplianceSitesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualApplianceSitesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualApplianceSitesDeleteFuture.Result. +func (future *VirtualApplianceSitesDeleteFuture) result(client VirtualApplianceSitesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualApplianceSitesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualApplianceSku definition of the NetworkVirtualApplianceSkus resource. +type VirtualApplianceSku struct { + autorest.Response `json:"-"` + // VirtualApplianceSkuPropertiesFormat - NetworkVirtualApplianceSku properties. + *VirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualApplianceSku. +func (vas VirtualApplianceSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vas.VirtualApplianceSkuPropertiesFormat != nil { + objectMap["properties"] = vas.VirtualApplianceSkuPropertiesFormat + } + if vas.ID != nil { + objectMap["id"] = vas.ID + } + if vas.Location != nil { + objectMap["location"] = vas.Location + } + if vas.Tags != nil { + objectMap["tags"] = vas.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSku struct. +func (vas *VirtualApplianceSku) 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 virtualApplianceSkuPropertiesFormat VirtualApplianceSkuPropertiesFormat + err = json.Unmarshal(*v, &virtualApplianceSkuPropertiesFormat) + if err != nil { + return err + } + vas.VirtualApplianceSkuPropertiesFormat = &virtualApplianceSkuPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vas.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vas.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vas.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vas.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vas.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vas.Tags = tags + } + } + } + + return nil +} + +// VirtualApplianceSkuInstances list of available Sku and instances. +type VirtualApplianceSkuInstances struct { + // ScaleUnit - READ-ONLY; Scale Unit. + ScaleUnit *string `json:"scaleUnit,omitempty"` + // InstanceCount - READ-ONLY; Instance Count. + InstanceCount *int32 `json:"instanceCount,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualApplianceSkuInstances. +func (vasi VirtualApplianceSkuInstances) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualApplianceSkuListResult response for ListNetworkVirtualApplianceSkus API service call. +type VirtualApplianceSkuListResult struct { + autorest.Response `json:"-"` + // Value - List of Network Virtual Appliance Skus that are available. + Value *[]VirtualApplianceSku `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualApplianceSkuListResultIterator provides access to a complete listing of VirtualApplianceSku +// values. +type VirtualApplianceSkuListResultIterator struct { + i int + page VirtualApplianceSkuListResultPage +} + +// 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 *VirtualApplianceSkuListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultIterator.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 *VirtualApplianceSkuListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualApplianceSkuListResultIterator) 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 VirtualApplianceSkuListResultIterator) Response() VirtualApplianceSkuListResult { + 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 VirtualApplianceSkuListResultIterator) Value() VirtualApplianceSku { + if !iter.page.NotDone() { + return VirtualApplianceSku{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualApplianceSkuListResultIterator type. +func NewVirtualApplianceSkuListResultIterator(page VirtualApplianceSkuListResultPage) VirtualApplianceSkuListResultIterator { + return VirtualApplianceSkuListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vaslr VirtualApplianceSkuListResult) IsEmpty() bool { + return vaslr.Value == nil || len(*vaslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vaslr VirtualApplianceSkuListResult) hasNextLink() bool { + return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0 +} + +// virtualApplianceSkuListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vaslr VirtualApplianceSkuListResult) virtualApplianceSkuListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vaslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vaslr.NextLink))) +} + +// VirtualApplianceSkuListResultPage contains a page of VirtualApplianceSku values. +type VirtualApplianceSkuListResultPage struct { + fn func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error) + vaslr VirtualApplianceSkuListResult +} + +// 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 *VirtualApplianceSkuListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vaslr) + if err != nil { + return err + } + page.vaslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualApplianceSkuListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualApplianceSkuListResultPage) NotDone() bool { + return !page.vaslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualApplianceSkuListResultPage) Response() VirtualApplianceSkuListResult { + return page.vaslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualApplianceSkuListResultPage) Values() []VirtualApplianceSku { + if page.vaslr.IsEmpty() { + return nil + } + return *page.vaslr.Value +} + +// Creates a new instance of the VirtualApplianceSkuListResultPage type. +func NewVirtualApplianceSkuListResultPage(cur VirtualApplianceSkuListResult, getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage { + return VirtualApplianceSkuListResultPage{ + fn: getNextPage, + vaslr: cur, + } +} + +// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties. +type VirtualApplianceSkuProperties struct { + // Vendor - Virtual Appliance Vendor. + Vendor *string `json:"vendor,omitempty"` + // BundledScaleUnit - Virtual Appliance Scale Unit. + BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"` + // MarketPlaceVersion - Virtual Appliance Version. + MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"` +} + +// VirtualApplianceSkuPropertiesFormat properties specific to NetworkVirtualApplianceSkus. +type VirtualApplianceSkuPropertiesFormat struct { + // Vendor - READ-ONLY; Network Virtual Appliance Sku vendor. + Vendor *string `json:"vendor,omitempty"` + // AvailableVersions - READ-ONLY; Available Network Virtual Appliance versions. + AvailableVersions *[]string `json:"availableVersions,omitempty"` + // AvailableScaleUnits - The list of scale units available. + AvailableScaleUnits *[]VirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualApplianceSkuPropertiesFormat. +func (vaspf VirtualApplianceSkuPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vaspf.AvailableScaleUnits != nil { + objectMap["availableScaleUnits"] = vaspf.AvailableScaleUnits + } + return json.Marshal(objectMap) +} + +// VirtualHub virtualHub Resource. +type VirtualHub struct { + autorest.Response `json:"-"` + // VirtualHubProperties - Properties of the virtual hub. + *VirtualHubProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Kind - READ-ONLY; Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. + Kind *string `json:"kind,omitempty"` + // ID - 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 VirtualHub. +func (vh VirtualHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vh.VirtualHubProperties != nil { + objectMap["properties"] = vh.VirtualHubProperties + } + if vh.ID != nil { + objectMap["id"] = vh.ID + } + if vh.Location != nil { + objectMap["location"] = vh.Location + } + if vh.Tags != nil { + objectMap["tags"] = vh.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualHub struct. +func (vh *VirtualHub) 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 virtualHubProperties VirtualHubProperties + err = json.Unmarshal(*v, &virtualHubProperties) + if err != nil { + return err + } + vh.VirtualHubProperties = &virtualHubProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vh.Etag = &etag + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + vh.Kind = &kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vh.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vh.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vh.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vh.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vh.Tags = tags + } + } + } + + return nil +} + +// VirtualHubBgpConnectionCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualHubBgpConnectionCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubBgpConnectionClient) (BgpConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubBgpConnectionCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubBgpConnectionCreateOrUpdateFuture.Result. +func (future *VirtualHubBgpConnectionCreateOrUpdateFuture) result(client VirtualHubBgpConnectionClient) (bc BgpConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bc.Response.Response, err = future.GetResult(sender); err == nil && bc.Response.Response.StatusCode != http.StatusNoContent { + bc, err = client.CreateOrUpdateResponder(bc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionCreateOrUpdateFuture", "Result", bc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubBgpConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualHubBgpConnectionDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubBgpConnectionClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubBgpConnectionDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubBgpConnectionDeleteFuture.Result. +func (future *VirtualHubBgpConnectionDeleteFuture) result(client VirtualHubBgpConnectionClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualHubBgpConnectionsListAdvertisedRoutesFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualHubBgpConnectionsListAdvertisedRoutesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubBgpConnectionsListAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubBgpConnectionsListAdvertisedRoutesFuture.Result. +func (future *VirtualHubBgpConnectionsListAdvertisedRoutesFuture) result(client VirtualHubBgpConnectionsClient) (prl PeerRouteList, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + prl.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if prl.Response.Response, err = future.GetResult(sender); err == nil && prl.Response.Response.StatusCode != http.StatusNoContent { + prl, err = client.ListAdvertisedRoutesResponder(prl.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture", "Result", prl.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubBgpConnectionsListLearnedRoutesFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualHubBgpConnectionsListLearnedRoutesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubBgpConnectionsListLearnedRoutesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubBgpConnectionsListLearnedRoutesFuture.Result. +func (future *VirtualHubBgpConnectionsListLearnedRoutesFuture) result(client VirtualHubBgpConnectionsClient) (prl PeerRouteList, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListLearnedRoutesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + prl.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionsListLearnedRoutesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if prl.Response.Response, err = future.GetResult(sender); err == nil && prl.Response.Response.StatusCode != http.StatusNoContent { + prl, err = client.ListLearnedRoutesResponder(prl.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListLearnedRoutesFuture", "Result", prl.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubEffectiveRoute the effective route configured on the virtual hub or specified resource. +type VirtualHubEffectiveRoute struct { + // AddressPrefixes - The list of address prefixes. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + // NextHops - The list of next hops. + NextHops *[]string `json:"nextHops,omitempty"` + // NextHopType - The type of the next hop. + NextHopType *string `json:"nextHopType,omitempty"` + // AsPath - The ASPath of this route. + AsPath *string `json:"asPath,omitempty"` + // RouteOrigin - The origin of this route. + RouteOrigin *string `json:"routeOrigin,omitempty"` +} + +// VirtualHubEffectiveRouteList effectiveRoutes List. +type VirtualHubEffectiveRouteList struct { + // Value - The list of effective routes configured on the virtual hub or the specified resource. + Value *[]VirtualHubEffectiveRoute `json:"value,omitempty"` +} + +// VirtualHubID virtual Hub identifier. +type VirtualHubID struct { + // ID - The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription. + ID *string `json:"id,omitempty"` +} + +// VirtualHubIPConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualHubIPConfigurationCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubIPConfigurationClient) (HubIPConfiguration, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubIPConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubIPConfigurationCreateOrUpdateFuture.Result. +func (future *VirtualHubIPConfigurationCreateOrUpdateFuture) result(client VirtualHubIPConfigurationClient) (hic HubIPConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + hic.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubIPConfigurationCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if hic.Response.Response, err = future.GetResult(sender); err == nil && hic.Response.Response.StatusCode != http.StatusNoContent { + hic, err = client.CreateOrUpdateResponder(hic.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationCreateOrUpdateFuture", "Result", hic.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubIPConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualHubIPConfigurationDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubIPConfigurationClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubIPConfigurationDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubIPConfigurationDeleteFuture.Result. +func (future *VirtualHubIPConfigurationDeleteFuture) result(client VirtualHubIPConfigurationClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubIPConfigurationDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualHubProperties parameters for VirtualHub. +type VirtualHubProperties struct { + // VirtualWan - The VirtualWAN to which the VirtualHub belongs. + VirtualWan *SubResource `json:"virtualWan,omitempty"` + // VpnGateway - The VpnGateway associated with this VirtualHub. + VpnGateway *SubResource `json:"vpnGateway,omitempty"` + // P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub. + P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"` + // ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub. + ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` + // AzureFirewall - The azureFirewall associated with this VirtualHub. + AzureFirewall *SubResource `json:"azureFirewall,omitempty"` + // SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub. + SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"` + // AddressPrefix - Address-prefix for this VirtualHub. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // RouteTable - The routeTable associated with this virtual hub. + RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // SecurityProviderName - The Security Provider name. + SecurityProviderName *string `json:"securityProviderName,omitempty"` + // VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub. + VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"` + // Sku - The sku of this VirtualHub. + Sku *string `json:"sku,omitempty"` + // RoutingState - The routing state. Possible values include: 'RoutingStateNone', 'RoutingStateProvisioned', 'RoutingStateProvisioning', 'RoutingStateFailed' + RoutingState RoutingState `json:"routingState,omitempty"` + // BgpConnections - READ-ONLY; List of references to Bgp Connections. + BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` + // IPConfigurations - READ-ONLY; List of references to IpConfigurations. + IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"` + // VirtualRouterAsn - VirtualRouter ASN. + VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` + // VirtualRouterIps - VirtualRouter IPs. + VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"` + // AllowBranchToBranchTraffic - Flag to control transit for VirtualRouter hub. + AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` + // PreferredRoutingGateway - The preferred gateway to route on-prem traffic. Possible values include: 'PreferredRoutingGatewayExpressRoute', 'PreferredRoutingGatewayVpnGateway', 'PreferredRoutingGatewayNone' + PreferredRoutingGateway PreferredRoutingGateway `json:"preferredRoutingGateway,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualHubProperties. +func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vhp.VirtualWan != nil { + objectMap["virtualWan"] = vhp.VirtualWan + } + if vhp.VpnGateway != nil { + objectMap["vpnGateway"] = vhp.VpnGateway + } + if vhp.P2SVpnGateway != nil { + objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway + } + if vhp.ExpressRouteGateway != nil { + objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway + } + if vhp.AzureFirewall != nil { + objectMap["azureFirewall"] = vhp.AzureFirewall + } + if vhp.SecurityPartnerProvider != nil { + objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider + } + if vhp.AddressPrefix != nil { + objectMap["addressPrefix"] = vhp.AddressPrefix + } + if vhp.RouteTable != nil { + objectMap["routeTable"] = vhp.RouteTable + } + if vhp.SecurityProviderName != nil { + objectMap["securityProviderName"] = vhp.SecurityProviderName + } + if vhp.VirtualHubRouteTableV2s != nil { + objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s + } + if vhp.Sku != nil { + objectMap["sku"] = vhp.Sku + } + if vhp.RoutingState != "" { + objectMap["routingState"] = vhp.RoutingState + } + if vhp.VirtualRouterAsn != nil { + objectMap["virtualRouterAsn"] = vhp.VirtualRouterAsn + } + if vhp.VirtualRouterIps != nil { + objectMap["virtualRouterIps"] = vhp.VirtualRouterIps + } + if vhp.AllowBranchToBranchTraffic != nil { + objectMap["allowBranchToBranchTraffic"] = vhp.AllowBranchToBranchTraffic + } + if vhp.PreferredRoutingGateway != "" { + objectMap["preferredRoutingGateway"] = vhp.PreferredRoutingGateway + } + return json.Marshal(objectMap) +} + +// VirtualHubRoute virtualHub route. +type VirtualHubRoute struct { + // AddressPrefixes - List of all addressPrefixes. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + // NextHopIPAddress - NextHop ip address. + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` +} + +// VirtualHubRouteTable virtualHub route table. +type VirtualHubRouteTable struct { + // Routes - List of all routes. + Routes *[]VirtualHubRoute `json:"routes,omitempty"` +} + +// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource. +type VirtualHubRouteTableV2 struct { + autorest.Response `json:"-"` + // VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2. + *VirtualHubRouteTableV2Properties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2. +func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vhrtv.VirtualHubRouteTableV2Properties != nil { + objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties + } + if vhrtv.Name != nil { + objectMap["name"] = vhrtv.Name + } + if vhrtv.ID != nil { + objectMap["id"] = vhrtv.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct. +func (vhrtv *VirtualHubRouteTableV2) 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 virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties + err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties) + if err != nil { + return err + } + vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vhrtv.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vhrtv.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vhrtv.ID = &ID + } + } + } + + return nil +} + +// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2. +type VirtualHubRouteTableV2Properties struct { + // Routes - List of all routes. + Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"` + // AttachedConnections - List of all connections attached to this route table v2. + AttachedConnections *[]string `json:"attachedConnections,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties. +func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vhrtvp.Routes != nil { + objectMap["routes"] = vhrtvp.Routes + } + if vhrtvp.AttachedConnections != nil { + objectMap["attachedConnections"] = vhrtvp.AttachedConnections + } + return json.Marshal(objectMap) +} + +// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualHubRouteTableV2sCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubRouteTableV2sCreateOrUpdateFuture.Result. +func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) result(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vhrtv.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent { + vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualHubRouteTableV2sDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubRouteTableV2sDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubRouteTableV2sDeleteFuture.Result. +func (future *VirtualHubRouteTableV2sDeleteFuture) result(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualHubRouteV2 virtualHubRouteTableV2 route. +type VirtualHubRouteV2 struct { + // DestinationType - The type of destinations. + DestinationType *string `json:"destinationType,omitempty"` + // Destinations - List of all destinations. + Destinations *[]string `json:"destinations,omitempty"` + // NextHopType - The type of next hops. + NextHopType *string `json:"nextHopType,omitempty"` + // NextHops - NextHops ip address. + NextHops *[]string `json:"nextHops,omitempty"` +} + +// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualHubsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubsClient) (VirtualHub, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result. +func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { + vh, err = client.CreateOrUpdateResponder(vh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualHubsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubsDeleteFuture.Result. +func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualHubsGetEffectiveVirtualHubRoutesFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualHubsGetEffectiveVirtualHubRoutesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualHubsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualHubsGetEffectiveVirtualHubRoutesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualHubsGetEffectiveVirtualHubRoutesFuture.Result. +func (future *VirtualHubsGetEffectiveVirtualHubRoutesFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsGetEffectiveVirtualHubRoutesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsGetEffectiveVirtualHubRoutesFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetwork virtual Network resource. +type VirtualNetwork struct { + autorest.Response `json:"-"` + // ExtendedLocation - The extended location of the virtual network. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // VirtualNetworkPropertiesFormat - Properties of the virtual network. + *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualNetwork. +func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vn.ExtendedLocation != nil { + objectMap["extendedLocation"] = vn.ExtendedLocation + } + if vn.VirtualNetworkPropertiesFormat != nil { + objectMap["properties"] = vn.VirtualNetworkPropertiesFormat + } + if vn.ID != nil { + objectMap["id"] = vn.ID + } + if vn.Location != nil { + objectMap["location"] = vn.Location + } + if vn.Tags != nil { + objectMap["tags"] = vn.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. +func (vn *VirtualNetwork) 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 "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + vn.ExtendedLocation = &extendedLocation + } + case "properties": + if v != nil { + var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) + if err != nil { + return err + } + vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vn.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vn.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vn.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vn.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vn.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vn.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a +// prefix in this VNET. +type VirtualNetworkBgpCommunities struct { + // VirtualNetworkCommunity - The BGP community associated with the virtual network. + VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"` + // RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network. + RegionalCommunity *string `json:"regionalCommunity,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities. +func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnbc.VirtualNetworkCommunity != nil { + objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity + } + return json.Marshal(objectMap) +} + +// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway +// resource. +type VirtualNetworkConnectionGatewayReference struct { + // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + ID *string `json:"id,omitempty"` +} + +// VirtualNetworkGateway a common class for general resource information. +type VirtualNetworkGateway struct { + autorest.Response `json:"-"` + // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. + *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + // ExtendedLocation - The extended location of type local virtual network gateway. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualNetworkGateway. +func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vng.VirtualNetworkGatewayPropertiesFormat != nil { + objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat + } + if vng.ExtendedLocation != nil { + objectMap["extendedLocation"] = vng.ExtendedLocation + } + if vng.ID != nil { + objectMap["id"] = vng.ID + } + if vng.Location != nil { + objectMap["location"] = vng.Location + } + if vng.Tags != nil { + objectMap["tags"] = vng.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. +func (vng *VirtualNetworkGateway) 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 virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) + if err != nil { + return err + } + vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + vng.ExtendedLocation = &extendedLocation + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vng.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vng.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vng.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vng.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vng.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vng.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkGatewayConnection a common class for general resource information. +type VirtualNetworkGatewayConnection struct { + autorest.Response `json:"-"` + // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. + *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualNetworkGatewayConnection. +func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { + objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat + } + if vngc.ID != nil { + objectMap["id"] = vngc.ID + } + if vngc.Location != nil { + objectMap["location"] = vngc.Location + } + if vngc.Tags != nil { + objectMap["tags"] = vngc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. +func (vngc *VirtualNetworkGatewayConnection) 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 virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) + if err != nil { + return err + } + vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vngc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vngc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vngc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vngc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vngc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vngc.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkGatewayConnectionListEntity a common class for general resource information. +type VirtualNetworkGatewayConnectionListEntity struct { + // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. + *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualNetworkGatewayConnectionListEntity. +func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { + objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat + } + if vngcle.ID != nil { + objectMap["id"] = vngcle.ID + } + if vngcle.Location != nil { + objectMap["location"] = vngcle.Location + } + if vngcle.Tags != nil { + objectMap["tags"] = vngcle.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct. +func (vngcle *VirtualNetworkGatewayConnectionListEntity) 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 virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat) + if err != nil { + return err + } + vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vngcle.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vngcle.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vngcle.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vngcle.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vngcle.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vngcle.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties. +type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { + // AuthorizationKey - The authorizationKey. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // VirtualNetworkGateway1 - The reference to virtual network gateway resource. + VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` + // VirtualNetworkGateway2 - The reference to virtual network gateway resource. + VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` + // LocalNetworkGateway2 - The reference to local network gateway resource. + LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` + // ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient' + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1' + ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` + // RoutingWeight - The routing weight. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly' + ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` + // SharedKey - The IPSec shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. + TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` + // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // Peer - The reference to peerings resource. + Peer *SubResource `json:"peer,omitempty"` + // EnableBgp - EnableBgp flag. + EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection. + TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. + ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat. +func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngclepf.AuthorizationKey != nil { + objectMap["authorizationKey"] = vngclepf.AuthorizationKey + } + if vngclepf.VirtualNetworkGateway1 != nil { + objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1 + } + if vngclepf.VirtualNetworkGateway2 != nil { + objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2 + } + if vngclepf.LocalNetworkGateway2 != nil { + objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2 + } + if vngclepf.ConnectionType != "" { + objectMap["connectionType"] = vngclepf.ConnectionType + } + if vngclepf.ConnectionProtocol != "" { + objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol + } + if vngclepf.RoutingWeight != nil { + objectMap["routingWeight"] = vngclepf.RoutingWeight + } + if vngclepf.ConnectionMode != "" { + objectMap["connectionMode"] = vngclepf.ConnectionMode + } + if vngclepf.SharedKey != nil { + objectMap["sharedKey"] = vngclepf.SharedKey + } + if vngclepf.Peer != nil { + objectMap["peer"] = vngclepf.Peer + } + if vngclepf.EnableBgp != nil { + objectMap["enableBgp"] = vngclepf.EnableBgp + } + if vngclepf.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors + } + if vngclepf.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies + } + if vngclepf.TrafficSelectorPolicies != nil { + objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies + } + if vngclepf.ExpressRouteGatewayBypass != nil { + objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API +// service call. +type VirtualNetworkGatewayConnectionListResult struct { + autorest.Response `json:"-"` + // Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group. + Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult. +func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngclr.Value != nil { + objectMap["value"] = vngclr.Value + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of +// VirtualNetworkGatewayConnection values. +type VirtualNetworkGatewayConnectionListResultIterator struct { + i int + page VirtualNetworkGatewayConnectionListResultPage +} + +// 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 *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.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 *VirtualNetworkGatewayConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkGatewayConnectionListResultIterator) 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 VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { + 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 VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { + if !iter.page.NotDone() { + return VirtualNetworkGatewayConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type. +func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator { + return VirtualNetworkGatewayConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { + return vngclr.Value == nil || len(*vngclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool { + return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0 +} + +// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vngclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vngclr.NextLink))) +} + +// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. +type VirtualNetworkGatewayConnectionListResultPage struct { + fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) + vngclr VirtualNetworkGatewayConnectionListResult +} + +// 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 *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vngclr) + if err != nil { + return err + } + page.vngclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkGatewayConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { + return !page.vngclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { + return page.vngclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { + if page.vngclr.IsEmpty() { + return nil + } + return *page.vngclr.Value +} + +// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type. +func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { + return VirtualNetworkGatewayConnectionListResultPage{ + fn: getNextPage, + vngclr: cur, + } +} + +// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties. +type VirtualNetworkGatewayConnectionPropertiesFormat struct { + // AuthorizationKey - The authorizationKey. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // VirtualNetworkGateway1 - The reference to virtual network gateway resource. + VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` + // VirtualNetworkGateway2 - The reference to virtual network gateway resource. + VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` + // LocalNetworkGateway2 - The reference to local network gateway resource. + LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` + // IngressNatRules - List of ingress NatRules. + IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` + // EgressNatRules - List of egress NatRules. + EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` + // ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient' + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1' + ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` + // RoutingWeight - The routing weight. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds. + DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"` + // ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly' + ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` + // SharedKey - The IPSec shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. + TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` + // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // Peer - The reference to peerings resource. + Peer *SubResource `json:"peer,omitempty"` + // EnableBgp - EnableBgp flag. + EnableBgp *bool `json:"enableBgp,omitempty"` + // UseLocalAzureIPAddress - Use private local Azure IP for the connection. + UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection. + TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. + ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat. +func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngcpf.AuthorizationKey != nil { + objectMap["authorizationKey"] = vngcpf.AuthorizationKey + } + if vngcpf.VirtualNetworkGateway1 != nil { + objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1 + } + if vngcpf.VirtualNetworkGateway2 != nil { + objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2 + } + if vngcpf.LocalNetworkGateway2 != nil { + objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2 + } + if vngcpf.IngressNatRules != nil { + objectMap["ingressNatRules"] = vngcpf.IngressNatRules + } + if vngcpf.EgressNatRules != nil { + objectMap["egressNatRules"] = vngcpf.EgressNatRules + } + if vngcpf.ConnectionType != "" { + objectMap["connectionType"] = vngcpf.ConnectionType + } + if vngcpf.ConnectionProtocol != "" { + objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol + } + if vngcpf.RoutingWeight != nil { + objectMap["routingWeight"] = vngcpf.RoutingWeight + } + if vngcpf.DpdTimeoutSeconds != nil { + objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds + } + if vngcpf.ConnectionMode != "" { + objectMap["connectionMode"] = vngcpf.ConnectionMode + } + if vngcpf.SharedKey != nil { + objectMap["sharedKey"] = vngcpf.SharedKey + } + if vngcpf.Peer != nil { + objectMap["peer"] = vngcpf.Peer + } + if vngcpf.EnableBgp != nil { + objectMap["enableBgp"] = vngcpf.EnableBgp + } + if vngcpf.UseLocalAzureIPAddress != nil { + objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress + } + if vngcpf.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors + } + if vngcpf.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies + } + if vngcpf.TrafficSelectorPolicies != nil { + objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies + } + if vngcpf.ExpressRouteGatewayBypass != nil { + objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result. +func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vngc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { + vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewayConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result. +func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewayConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewayConnectionsGetIkeSasFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsGetIkeSasFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsGetIkeSasFuture.Result. +func (future *VirtualNetworkGatewayConnectionsGetIkeSasFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsGetIkeSasFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsGetIkeSasFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GetIkeSasResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsGetIkeSasFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsResetConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsResetConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsResetConnectionFuture.Result. +func (future *VirtualNetworkGatewayConnectionsResetConnectionFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetConnectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetConnectionFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result. +func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + crsk.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent { + crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result. +func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + csk.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent { + csk, err = client.SetSharedKeyResponder(csk.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result. +func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StartPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result. +func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StopPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result. +func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vngc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { + vngc, err = client.UpdateTagsResponder(vngc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway. +type VirtualNetworkGatewayIPConfiguration struct { + // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. + *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. +func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat + } + if vngic.Name != nil { + objectMap["name"] = vngic.Name + } + if vngic.ID != nil { + objectMap["id"] = vngic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. +func (vngic *VirtualNetworkGatewayIPConfiguration) 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 virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) + if err != nil { + return err + } + vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vngic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vngic.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vngic.ID = &ID + } + } + } + + return nil +} + +// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration. +type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference to the subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // PublicIPAddress - The reference to the public IP resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // PrivateIPAddress - READ-ONLY; Private IP Address for this gateway. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat. +func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod + } + if vngicpf.Subnet != nil { + objectMap["subnet"] = vngicpf.Subnet + } + if vngicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = vngicpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API +// service call. +type VirtualNetworkGatewayListConnectionsResult struct { + autorest.Response `json:"-"` + // Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group. + Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnglcr.Value != nil { + objectMap["value"] = vnglcr.Value + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of +// VirtualNetworkGatewayConnectionListEntity values. +type VirtualNetworkGatewayListConnectionsResultIterator struct { + i int + page VirtualNetworkGatewayListConnectionsResultPage +} + +// 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 *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.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 *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkGatewayListConnectionsResultIterator) 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 VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult { + 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 VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity { + if !iter.page.NotDone() { + return VirtualNetworkGatewayConnectionListEntity{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type. +func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator { + return VirtualNetworkGatewayListConnectionsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool { + return vnglcr.Value == nil || len(*vnglcr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool { + return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0 +} + +// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if !vnglcr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnglcr.NextLink))) +} + +// VirtualNetworkGatewayListConnectionsResultPage contains a page of +// VirtualNetworkGatewayConnectionListEntity values. +type VirtualNetworkGatewayListConnectionsResultPage struct { + fn func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error) + vnglcr VirtualNetworkGatewayListConnectionsResult +} + +// 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 *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vnglcr) + if err != nil { + return err + } + page.vnglcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkGatewayListConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool { + return !page.vnglcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult { + return page.vnglcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity { + if page.vnglcr.IsEmpty() { + return nil + } + return *page.vnglcr.Value +} + +// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type. +func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage { + return VirtualNetworkGatewayListConnectionsResultPage{ + fn: getNextPage, + vnglcr: cur, + } +} + +// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call. +type VirtualNetworkGatewayListResult struct { + autorest.Response `json:"-"` + // Value - A list of VirtualNetworkGateway resources that exists in a resource group. + Value *[]VirtualNetworkGateway `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult. +func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnglr.Value != nil { + objectMap["value"] = vnglr.Value + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway +// values. +type VirtualNetworkGatewayListResultIterator struct { + i int + page VirtualNetworkGatewayListResultPage +} + +// 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 *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.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 *VirtualNetworkGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkGatewayListResultIterator) 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 VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { + 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 VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { + if !iter.page.NotDone() { + return VirtualNetworkGateway{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkGatewayListResultIterator type. +func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator { + return VirtualNetworkGatewayListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { + return vnglr.Value == nil || len(*vnglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool { + return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0 +} + +// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vnglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnglr.NextLink))) +} + +// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. +type VirtualNetworkGatewayListResultPage struct { + fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) + vnglr VirtualNetworkGatewayListResult +} + +// 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 *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vnglr) + if err != nil { + return err + } + page.vnglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkGatewayListResultPage) NotDone() bool { + return !page.vnglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { + return page.vnglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { + if page.vnglr.IsEmpty() { + return nil + } + return *page.vnglr.Value +} + +// Creates a new instance of the VirtualNetworkGatewayListResultPage type. +func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { + return VirtualNetworkGatewayListResultPage{ + fn: getNextPage, + vnglr: cur, + } +} + +// VirtualNetworkGatewayNatRule virtualNetworkGatewayNatRule Resource. +type VirtualNetworkGatewayNatRule struct { + autorest.Response `json:"-"` + // VirtualNetworkGatewayNatRuleProperties - Properties of the Virtual Network Gateway NAT rule. + *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayNatRule. +func (vngnr VirtualNetworkGatewayNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngnr.VirtualNetworkGatewayNatRuleProperties != nil { + objectMap["properties"] = vngnr.VirtualNetworkGatewayNatRuleProperties + } + if vngnr.Name != nil { + objectMap["name"] = vngnr.Name + } + if vngnr.ID != nil { + objectMap["id"] = vngnr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayNatRule struct. +func (vngnr *VirtualNetworkGatewayNatRule) 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 virtualNetworkGatewayNatRuleProperties VirtualNetworkGatewayNatRuleProperties + err = json.Unmarshal(*v, &virtualNetworkGatewayNatRuleProperties) + if err != nil { + return err + } + vngnr.VirtualNetworkGatewayNatRuleProperties = &virtualNetworkGatewayNatRuleProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vngnr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vngnr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vngnr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vngnr.ID = &ID + } + } + } + + return nil +} + +// VirtualNetworkGatewayNatRuleProperties parameters for VirtualNetworkGatewayNatRule. +type VirtualNetworkGatewayNatRuleProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic' + Type VpnNatRuleType `json:"type,omitempty"` + // Mode - The Source NAT direction of a VPN NAT. Possible values include: 'VpnNatRuleModeEgressSnat', 'VpnNatRuleModeIngressSnat' + Mode VpnNatRuleMode `json:"mode,omitempty"` + // InternalMappings - The private IP address internal mapping for NAT. + InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` + // ExternalMappings - The private IP address external mapping for NAT. + ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` + // IPConfigurationID - The IP Configuration ID this NAT rule applies to. + IPConfigurationID *string `json:"ipConfigurationId,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayNatRuleProperties. +func (vngnrp VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngnrp.Type != "" { + objectMap["type"] = vngnrp.Type + } + if vngnrp.Mode != "" { + objectMap["mode"] = vngnrp.Mode + } + if vngnrp.InternalMappings != nil { + objectMap["internalMappings"] = vngnrp.InternalMappings + } + if vngnrp.ExternalMappings != nil { + objectMap["externalMappings"] = vngnrp.ExternalMappings + } + if vngnrp.IPConfigurationID != nil { + objectMap["ipConfigurationId"] = vngnrp.IPConfigurationID + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayNatRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayNatRulesClient) (VirtualNetworkGatewayNatRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayNatRulesCreateOrUpdateFuture.Result. +func (future *VirtualNetworkGatewayNatRulesCreateOrUpdateFuture) result(client VirtualNetworkGatewayNatRulesClient) (vngnr VirtualNetworkGatewayNatRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vngnr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngnr.Response.Response, err = future.GetResult(sender); err == nil && vngnr.Response.Response.StatusCode != http.StatusNoContent { + vngnr, err = client.CreateOrUpdateResponder(vngnr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture", "Result", vngnr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewayNatRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayNatRulesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayNatRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayNatRulesDeleteFuture.Result. +func (future *VirtualNetworkGatewayNatRulesDeleteFuture) result(client VirtualNetworkGatewayNatRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayNatRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties. +type VirtualNetworkGatewayPropertiesFormat struct { + // IPConfigurations - IP configurations for virtual network gateway. + IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` + // GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute', 'VirtualNetworkGatewayTypeLocalGateway' + GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` + // VpnType - The type of this virtual network gateway. Possible values include: 'VpnTypePolicyBased', 'VpnTypeRouteBased' + VpnType VpnType `json:"vpnType,omitempty"` + // VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2' + VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"` + // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. + EnableBgp *bool `json:"enableBgp,omitempty"` + // EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not. + EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` + // ActiveActive - ActiveActive flag. + ActiveActive *bool `json:"activeActive,omitempty"` + // GatewayDefaultSite - The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. + GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` + // Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. + Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` + // VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. + VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` + // BgpSettings - Virtual network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // CustomRoutes - The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. + CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // EnableDNSForwarding - Whether dns forwarding is enabled or not. + EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"` + // InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent. + InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` + // VNetExtendedLocationResourceID - Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. + VNetExtendedLocationResourceID *string `json:"vNetExtendedLocationResourceId,omitempty"` + // NatRules - NatRules for virtual network gateway. + NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` + // EnableBgpRouteTranslationForNat - EnableBgpRouteTranslationForNat flag. + EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat. +func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = vngpf.IPConfigurations + } + if vngpf.GatewayType != "" { + objectMap["gatewayType"] = vngpf.GatewayType + } + if vngpf.VpnType != "" { + objectMap["vpnType"] = vngpf.VpnType + } + if vngpf.VpnGatewayGeneration != "" { + objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration + } + if vngpf.EnableBgp != nil { + objectMap["enableBgp"] = vngpf.EnableBgp + } + if vngpf.EnablePrivateIPAddress != nil { + objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress + } + if vngpf.ActiveActive != nil { + objectMap["activeActive"] = vngpf.ActiveActive + } + if vngpf.GatewayDefaultSite != nil { + objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite + } + if vngpf.Sku != nil { + objectMap["sku"] = vngpf.Sku + } + if vngpf.VpnClientConfiguration != nil { + objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration + } + if vngpf.BgpSettings != nil { + objectMap["bgpSettings"] = vngpf.BgpSettings + } + if vngpf.CustomRoutes != nil { + objectMap["customRoutes"] = vngpf.CustomRoutes + } + if vngpf.EnableDNSForwarding != nil { + objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding + } + if vngpf.VNetExtendedLocationResourceID != nil { + objectMap["vNetExtendedLocationResourceId"] = vngpf.VNetExtendedLocationResourceID + } + if vngpf.NatRules != nil { + objectMap["natRules"] = vngpf.NatRules + } + if vngpf.EnableBgpRouteTranslationForNat != nil { + objectMap["enableBgpRouteTranslationForNat"] = vngpf.EnableBgpRouteTranslationForNat + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result. +func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vng.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.CreateOrUpdateResponder(vng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result. +func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring +// and retrieving the results of a long-running operation. +type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture.Result. +func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result. +func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GeneratevpnclientpackageResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewaysGenerateVpnProfileFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result. +func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GenerateVpnProfileResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result. +func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + grlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { + grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result. +func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bpslr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent { + bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewaysGetLearnedRoutesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result. +func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + grlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { + grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result. +func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vcchdlr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent { + vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result. +func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vcipp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { + vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result. +func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaySku virtualNetworkGatewaySku details. +type VirtualNetworkGatewaySku struct { + // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ' + Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` + // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ' + Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` + // Capacity - READ-ONLY; The capacity. + Capacity *int32 `json:"capacity,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku. +func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngs.Name != "" { + objectMap["name"] = vngs.Name + } + if vngs.Tier != "" { + objectMap["tier"] = vngs.Tier + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysResetFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result. +func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vng.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.ResetResponder(vng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result. +func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result. +func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vcipp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { + vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewaysStartPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysStartPacketCaptureFuture.Result. +func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StartPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewaysStopPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysStopPacketCaptureFuture.Result. +func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StopPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result. +func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vng.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.UpdateTagsResponder(vng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkListResult response for the ListVirtualNetworks API service call. +type VirtualNetworkListResult struct { + autorest.Response `json:"-"` + // Value - A list of VirtualNetwork resources in a resource group. + Value *[]VirtualNetwork `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. +type VirtualNetworkListResultIterator struct { + i int + page VirtualNetworkListResultPage +} + +// 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 *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.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 *VirtualNetworkListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkListResultIterator) 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 VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { + 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 VirtualNetworkListResultIterator) Value() VirtualNetwork { + if !iter.page.NotDone() { + return VirtualNetwork{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkListResultIterator type. +func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator { + return VirtualNetworkListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vnlr VirtualNetworkListResult) IsEmpty() bool { + return vnlr.Value == nil || len(*vnlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vnlr VirtualNetworkListResult) hasNextLink() bool { + return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0 +} + +// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vnlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnlr.NextLink))) +} + +// VirtualNetworkListResultPage contains a page of VirtualNetwork values. +type VirtualNetworkListResultPage struct { + fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error) + vnlr VirtualNetworkListResult +} + +// 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 *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vnlr) + if err != nil { + return err + } + page.vnlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkListResultPage) NotDone() bool { + return !page.vnlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { + return page.vnlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { + if page.vnlr.IsEmpty() { + return nil + } + return *page.vnlr.Value +} + +// Creates a new instance of the VirtualNetworkListResultPage type. +func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { + return VirtualNetworkListResultPage{ + fn: getNextPage, + vnlr: cur, + } +} + +// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call. +type VirtualNetworkListUsageResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; VirtualNetwork usage stats. + Value *[]VirtualNetworkUsage `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult. +func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnlur.NextLink != nil { + objectMap["nextLink"] = vnlur.NextLink + } + return json.Marshal(objectMap) +} + +// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage +// values. +type VirtualNetworkListUsageResultIterator struct { + i int + page VirtualNetworkListUsageResultPage +} + +// 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 *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.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 *VirtualNetworkListUsageResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkListUsageResultIterator) 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 VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult { + 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 VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage { + if !iter.page.NotDone() { + return VirtualNetworkUsage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkListUsageResultIterator type. +func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator { + return VirtualNetworkListUsageResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool { + return vnlur.Value == nil || len(*vnlur.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool { + return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0 +} + +// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) { + if !vnlur.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnlur.NextLink))) +} + +// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values. +type VirtualNetworkListUsageResultPage struct { + fn func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error) + vnlur VirtualNetworkListUsageResult +} + +// 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 *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vnlur) + if err != nil { + return err + } + page.vnlur = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkListUsageResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkListUsageResultPage) NotDone() bool { + return !page.vnlur.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult { + return page.vnlur +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { + if page.vnlur.IsEmpty() { + return nil + } + return *page.vnlur.Value +} + +// Creates a new instance of the VirtualNetworkListUsageResultPage type. +func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage { + return VirtualNetworkListUsageResultPage{ + fn: getNextPage, + vnlur: cur, + } +} + +// VirtualNetworkPeering peerings in a virtual network resource. +type VirtualNetworkPeering struct { + autorest.Response `json:"-"` + // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. + *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkPeering. +func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnp.VirtualNetworkPeeringPropertiesFormat != nil { + objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat + } + if vnp.Name != nil { + objectMap["name"] = vnp.Name + } + if vnp.Type != nil { + objectMap["type"] = vnp.Type + } + if vnp.ID != nil { + objectMap["id"] = vnp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct. +func (vnp *VirtualNetworkPeering) 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 virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat) + if err != nil { + return err + } + vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vnp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vnp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vnp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vnp.ID = &ID + } + } + } + + return nil +} + +// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that +// belong to a virtual network. +type VirtualNetworkPeeringListResult struct { + autorest.Response `json:"-"` + // Value - The peerings in a virtual network. + Value *[]VirtualNetworkPeering `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering +// values. +type VirtualNetworkPeeringListResultIterator struct { + i int + page VirtualNetworkPeeringListResultPage +} + +// 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 *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.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 *VirtualNetworkPeeringListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkPeeringListResultIterator) 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 VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult { + 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 VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering { + if !iter.page.NotDone() { + return VirtualNetworkPeering{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkPeeringListResultIterator type. +func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator { + return VirtualNetworkPeeringListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool { + return vnplr.Value == nil || len(*vnplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool { + return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0 +} + +// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vnplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnplr.NextLink))) +} + +// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values. +type VirtualNetworkPeeringListResultPage struct { + fn func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error) + vnplr VirtualNetworkPeeringListResult +} + +// 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 *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vnplr) + if err != nil { + return err + } + page.vnplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkPeeringListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkPeeringListResultPage) NotDone() bool { + return !page.vnplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult { + return page.vnplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering { + if page.vnplr.IsEmpty() { + return nil + } + return *page.vnplr.Value +} + +// Creates a new instance of the VirtualNetworkPeeringListResultPage type. +func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage { + return VirtualNetworkPeeringListResultPage{ + fn: getNextPage, + vnplr: cur, + } +} + +// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. +type VirtualNetworkPeeringPropertiesFormat struct { + // AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. + AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` + // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. + AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` + // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. + AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` + // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. + UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` + // RemoteVirtualNetwork - The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` + // RemoteAddressSpace - The reference to the address space peered with the remote virtual network. + RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` + // RemoteVirtualNetworkAddressSpace - The reference to the current address space of the remote virtual network. + RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` + // RemoteBgpCommunities - The reference to the remote virtual network's Bgp Communities. + RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` + // PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' + PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` + // PeeringSyncLevel - The peering sync status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringLevelFullyInSync', 'VirtualNetworkPeeringLevelRemoteNotInSync', 'VirtualNetworkPeeringLevelLocalNotInSync', 'VirtualNetworkPeeringLevelLocalAndRemoteNotInSync' + PeeringSyncLevel VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // DoNotVerifyRemoteGateways - If we need to verify the provisioning state of the remote gateway. + DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"` + // ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network peering resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat. +func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnppf.AllowVirtualNetworkAccess != nil { + objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess + } + if vnppf.AllowForwardedTraffic != nil { + objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic + } + if vnppf.AllowGatewayTransit != nil { + objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit + } + if vnppf.UseRemoteGateways != nil { + objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways + } + if vnppf.RemoteVirtualNetwork != nil { + objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork + } + if vnppf.RemoteAddressSpace != nil { + objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace + } + if vnppf.RemoteVirtualNetworkAddressSpace != nil { + objectMap["remoteVirtualNetworkAddressSpace"] = vnppf.RemoteVirtualNetworkAddressSpace + } + if vnppf.RemoteBgpCommunities != nil { + objectMap["remoteBgpCommunities"] = vnppf.RemoteBgpCommunities + } + if vnppf.PeeringState != "" { + objectMap["peeringState"] = vnppf.PeeringState + } + if vnppf.PeeringSyncLevel != "" { + objectMap["peeringSyncLevel"] = vnppf.PeeringSyncLevel + } + if vnppf.DoNotVerifyRemoteGateways != nil { + objectMap["doNotVerifyRemoteGateways"] = vnppf.DoNotVerifyRemoteGateways + } + return json.Marshal(objectMap) +} + +// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkPeeringsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result. +func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vnp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent { + vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkPeeringsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkPeeringsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result. +func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkPropertiesFormat properties of the virtual network. +type VirtualNetworkPropertiesFormat struct { + // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. + AddressSpace *AddressSpace `json:"addressSpace,omitempty"` + // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. + DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` + // FlowTimeoutInMinutes - The FlowTimeout value (in minutes) for the Virtual Network + FlowTimeoutInMinutes *int32 `json:"flowTimeoutInMinutes,omitempty"` + // Subnets - A list of subnets in a Virtual Network. + Subnets *[]Subnet `json:"subnets,omitempty"` + // VirtualNetworkPeerings - A list of peerings in a Virtual Network. + VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` + // ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. + EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` + // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network. + EnableVMProtection *bool `json:"enableVmProtection,omitempty"` + // DdosProtectionPlan - The DDoS protection plan associated with the virtual network. + DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` + // BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"` + // IPAllocations - Array of IpAllocation which reference this VNET. + IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat. +func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnpf.AddressSpace != nil { + objectMap["addressSpace"] = vnpf.AddressSpace + } + if vnpf.DhcpOptions != nil { + objectMap["dhcpOptions"] = vnpf.DhcpOptions + } + if vnpf.FlowTimeoutInMinutes != nil { + objectMap["flowTimeoutInMinutes"] = vnpf.FlowTimeoutInMinutes + } + if vnpf.Subnets != nil { + objectMap["subnets"] = vnpf.Subnets + } + if vnpf.VirtualNetworkPeerings != nil { + objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings + } + if vnpf.EnableDdosProtection != nil { + objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection + } + if vnpf.EnableVMProtection != nil { + objectMap["enableVmProtection"] = vnpf.EnableVMProtection + } + if vnpf.DdosProtectionPlan != nil { + objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan + } + if vnpf.BgpCommunities != nil { + objectMap["bgpCommunities"] = vnpf.BgpCommunities + } + if vnpf.IPAllocations != nil { + objectMap["ipAllocations"] = vnpf.IPAllocations + } + return json.Marshal(objectMap) +} + +// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworksCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworksClient) (VirtualNetwork, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result. +func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vn.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { + vn, err = client.CreateOrUpdateResponder(vn.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualNetworksDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworksClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworksDeleteFuture.Result. +func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkTap virtual Network Tap resource. +type VirtualNetworkTap struct { + autorest.Response `json:"-"` + // VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties. + *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualNetworkTap. +func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnt.VirtualNetworkTapPropertiesFormat != nil { + objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat + } + if vnt.ID != nil { + objectMap["id"] = vnt.ID + } + if vnt.Location != nil { + objectMap["location"] = vnt.Location + } + if vnt.Tags != nil { + objectMap["tags"] = vnt.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct. +func (vnt *VirtualNetworkTap) 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 virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat) + if err != nil { + return err + } + vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vnt.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vnt.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vnt.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vnt.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vnt.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vnt.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call. +type VirtualNetworkTapListResult struct { + autorest.Response `json:"-"` + // Value - A list of VirtualNetworkTaps in a resource group. + Value *[]VirtualNetworkTap `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values. +type VirtualNetworkTapListResultIterator struct { + i int + page VirtualNetworkTapListResultPage +} + +// 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 *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.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 *VirtualNetworkTapListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkTapListResultIterator) 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 VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult { + 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 VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap { + if !iter.page.NotDone() { + return VirtualNetworkTap{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualNetworkTapListResultIterator type. +func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator { + return VirtualNetworkTapListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vntlr VirtualNetworkTapListResult) IsEmpty() bool { + return vntlr.Value == nil || len(*vntlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vntlr VirtualNetworkTapListResult) hasNextLink() bool { + return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0 +} + +// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vntlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vntlr.NextLink))) +} + +// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values. +type VirtualNetworkTapListResultPage struct { + fn func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error) + vntlr VirtualNetworkTapListResult +} + +// 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 *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vntlr) + if err != nil { + return err + } + page.vntlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualNetworkTapListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkTapListResultPage) NotDone() bool { + return !page.vntlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult { + return page.vntlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap { + if page.vntlr.IsEmpty() { + return nil + } + return *page.vntlr.Value +} + +// Creates a new instance of the VirtualNetworkTapListResultPage type. +func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage { + return VirtualNetworkTapListResultPage{ + fn: getNextPage, + vntlr: cur, + } +} + +// VirtualNetworkTapPropertiesFormat virtual Network Tap properties. +type VirtualNetworkTapPropertiesFormat struct { + // NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. + NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap. + DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` + // DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap. + DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` + // DestinationPort - The VXLAN destination port that will receive the tapped traffic. + DestinationPort *int32 `json:"destinationPort,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat. +func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vntpf.DestinationNetworkInterfaceIPConfiguration != nil { + objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration + } + if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil { + objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration + } + if vntpf.DestinationPort != nil { + objectMap["destinationPort"] = vntpf.DestinationPort + } + return json.Marshal(objectMap) +} + +// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkTapsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result. +func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vnt.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent { + vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkTapsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkTapsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result. +func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkUsage usage details for subnet. +type VirtualNetworkUsage struct { + // CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet. + CurrentValue *float64 `json:"currentValue,omitempty"` + // ID - READ-ONLY; Subnet identifier. + ID *string `json:"id,omitempty"` + // Limit - READ-ONLY; Indicates the size of the subnet. + Limit *float64 `json:"limit,omitempty"` + // Name - READ-ONLY; The name containing common and localized value for usage. + Name *VirtualNetworkUsageName `json:"name,omitempty"` + // Unit - READ-ONLY; Usage units. Returns 'Count'. + Unit *string `json:"unit,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkUsage. +func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualNetworkUsageName usage strings container. +type VirtualNetworkUsageName struct { + // LocalizedValue - READ-ONLY; Localized subnet size and usage string. + LocalizedValue *string `json:"localizedValue,omitempty"` + // Value - READ-ONLY; Subnet size and usage string. + Value *string `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkUsageName. +func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualRouter virtualRouter Resource. +type VirtualRouter struct { + autorest.Response `json:"-"` + // VirtualRouterPropertiesFormat - Properties of the Virtual Router. + *VirtualRouterPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualRouter. +func (vr VirtualRouter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vr.VirtualRouterPropertiesFormat != nil { + objectMap["properties"] = vr.VirtualRouterPropertiesFormat + } + if vr.ID != nil { + objectMap["id"] = vr.ID + } + if vr.Location != nil { + objectMap["location"] = vr.Location + } + if vr.Tags != nil { + objectMap["tags"] = vr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct. +func (vr *VirtualRouter) 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 virtualRouterPropertiesFormat VirtualRouterPropertiesFormat + err = json.Unmarshal(*v, &virtualRouterPropertiesFormat) + if err != nil { + return err + } + vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vr.Tags = tags + } + } + } + + return nil +} + +// VirtualRouterListResult response for ListVirtualRouters API service call. +type VirtualRouterListResult struct { + autorest.Response `json:"-"` + // Value - List of Virtual Routers. + Value *[]VirtualRouter `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values. +type VirtualRouterListResultIterator struct { + i int + page VirtualRouterListResultPage +} + +// 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 *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.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 *VirtualRouterListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualRouterListResultIterator) 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 VirtualRouterListResultIterator) Response() VirtualRouterListResult { + 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 VirtualRouterListResultIterator) Value() VirtualRouter { + if !iter.page.NotDone() { + return VirtualRouter{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualRouterListResultIterator type. +func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator { + return VirtualRouterListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vrlr VirtualRouterListResult) IsEmpty() bool { + return vrlr.Value == nil || len(*vrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vrlr VirtualRouterListResult) hasNextLink() bool { + return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0 +} + +// virtualRouterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vrlr.NextLink))) +} + +// VirtualRouterListResultPage contains a page of VirtualRouter values. +type VirtualRouterListResultPage struct { + fn func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error) + vrlr VirtualRouterListResult +} + +// 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 *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vrlr) + if err != nil { + return err + } + page.vrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualRouterListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualRouterListResultPage) NotDone() bool { + return !page.vrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualRouterListResultPage) Response() VirtualRouterListResult { + return page.vrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualRouterListResultPage) Values() []VirtualRouter { + if page.vrlr.IsEmpty() { + return nil + } + return *page.vrlr.Value +} + +// Creates a new instance of the VirtualRouterListResultPage type. +func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage { + return VirtualRouterListResultPage{ + fn: getNextPage, + vrlr: cur, + } +} + +// VirtualRouterPeering virtual Router Peering resource. +type VirtualRouterPeering struct { + autorest.Response `json:"-"` + // VirtualRouterPeeringProperties - The properties of the Virtual Router Peering. + *VirtualRouterPeeringProperties `json:"properties,omitempty"` + // Name - Name of the virtual router peering that is unique within a virtual router. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Peering type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualRouterPeering. +func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vrp.VirtualRouterPeeringProperties != nil { + objectMap["properties"] = vrp.VirtualRouterPeeringProperties + } + if vrp.Name != nil { + objectMap["name"] = vrp.Name + } + if vrp.ID != nil { + objectMap["id"] = vrp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct. +func (vrp *VirtualRouterPeering) 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 virtualRouterPeeringProperties VirtualRouterPeeringProperties + err = json.Unmarshal(*v, &virtualRouterPeeringProperties) + if err != nil { + return err + } + vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vrp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vrp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vrp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vrp.ID = &ID + } + } + } + + return nil +} + +// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call. +type VirtualRouterPeeringListResult struct { + autorest.Response `json:"-"` + // Value - List of VirtualRouterPeerings in a VirtualRouter. + Value *[]VirtualRouterPeering `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering +// values. +type VirtualRouterPeeringListResultIterator struct { + i int + page VirtualRouterPeeringListResultPage +} + +// 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 *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.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 *VirtualRouterPeeringListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualRouterPeeringListResultIterator) 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 VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult { + 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 VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering { + if !iter.page.NotDone() { + return VirtualRouterPeering{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualRouterPeeringListResultIterator type. +func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator { + return VirtualRouterPeeringListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool { + return vrplr.Value == nil || len(*vrplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool { + return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0 +} + +// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vrplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vrplr.NextLink))) +} + +// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values. +type VirtualRouterPeeringListResultPage struct { + fn func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error) + vrplr VirtualRouterPeeringListResult +} + +// 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 *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vrplr) + if err != nil { + return err + } + page.vrplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VirtualRouterPeeringListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualRouterPeeringListResultPage) NotDone() bool { + return !page.vrplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult { + return page.vrplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering { + if page.vrplr.IsEmpty() { + return nil + } + return *page.vrplr.Value +} + +// Creates a new instance of the VirtualRouterPeeringListResultPage type. +func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage { + return VirtualRouterPeeringListResultPage{ + fn: getNextPage, + vrplr: cur, + } +} + +// VirtualRouterPeeringProperties properties of the rule group. +type VirtualRouterPeeringProperties struct { + // PeerAsn - Peer ASN. + PeerAsn *int64 `json:"peerAsn,omitempty"` + // PeerIP - Peer IP. + PeerIP *string `json:"peerIp,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties. +func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vrpp.PeerAsn != nil { + objectMap["peerAsn"] = vrpp.PeerAsn + } + if vrpp.PeerIP != nil { + objectMap["peerIp"] = vrpp.PeerIP + } + return json.Marshal(objectMap) +} + +// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualRouterPeeringsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualRouterPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualRouterPeeringsCreateOrUpdateFuture.Result. +func (future *VirtualRouterPeeringsCreateOrUpdateFuture) result(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vrp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent { + vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualRouterPeeringsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualRouterPeeringsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualRouterPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualRouterPeeringsDeleteFuture.Result. +func (future *VirtualRouterPeeringsDeleteFuture) result(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualRouterPropertiesFormat virtual Router definition. +type VirtualRouterPropertiesFormat struct { + // VirtualRouterAsn - VirtualRouter ASN. + VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` + // VirtualRouterIps - VirtualRouter IPs. + VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"` + // HostedSubnet - The Subnet on which VirtualRouter is hosted. + HostedSubnet *SubResource `json:"hostedSubnet,omitempty"` + // HostedGateway - The Gateway on which VirtualRouter is hosted. + HostedGateway *SubResource `json:"hostedGateway,omitempty"` + // Peerings - READ-ONLY; List of references to VirtualRouterPeerings. + Peerings *[]SubResource `json:"peerings,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat. +func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vrpf.VirtualRouterAsn != nil { + objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn + } + if vrpf.VirtualRouterIps != nil { + objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps + } + if vrpf.HostedSubnet != nil { + objectMap["hostedSubnet"] = vrpf.HostedSubnet + } + if vrpf.HostedGateway != nil { + objectMap["hostedGateway"] = vrpf.HostedGateway + } + return json.Marshal(objectMap) +} + +// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualRoutersCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualRoutersClient) (VirtualRouter, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualRoutersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualRoutersCreateOrUpdateFuture.Result. +func (future *VirtualRoutersCreateOrUpdateFuture) result(client VirtualRoutersClient) (vr VirtualRouter, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent { + vr, err = client.CreateOrUpdateResponder(vr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualRoutersDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualRoutersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualRoutersDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualRoutersDeleteFuture.Result. +func (future *VirtualRoutersDeleteFuture) result(client VirtualRoutersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualWAN virtualWAN Resource. +type VirtualWAN struct { + autorest.Response `json:"-"` + // VirtualWanProperties - Properties of the virtual WAN. + *VirtualWanProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VirtualWAN. +func (vw VirtualWAN) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vw.VirtualWanProperties != nil { + objectMap["properties"] = vw.VirtualWanProperties + } + if vw.ID != nil { + objectMap["id"] = vw.ID + } + if vw.Location != nil { + objectMap["location"] = vw.Location + } + if vw.Tags != nil { + objectMap["tags"] = vw.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct. +func (vw *VirtualWAN) 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 virtualWanProperties VirtualWanProperties + err = json.Unmarshal(*v, &virtualWanProperties) + if err != nil { + return err + } + vw.VirtualWanProperties = &virtualWanProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vw.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vw.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vw.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vw.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vw.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vw.Tags = tags + } + } + } + + return nil +} + +// VirtualWanProperties parameters for VirtualWAN. +type VirtualWanProperties struct { + // DisableVpnEncryption - Vpn encryption to be disabled or not. + DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"` + // VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN. + VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` + // VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN. + VpnSites *[]SubResource `json:"vpnSites,omitempty"` + // AllowBranchToBranchTraffic - True if branch to branch traffic is allowed. + AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` + // AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed. + AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` + // Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone' + Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Type - The type of the VirtualWAN. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualWanProperties. +func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vwp.DisableVpnEncryption != nil { + objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption + } + if vwp.AllowBranchToBranchTraffic != nil { + objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic + } + if vwp.AllowVnetToVnetTraffic != nil { + objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic + } + if vwp.Office365LocalBreakoutCategory != "" { + objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory + } + if vwp.Type != nil { + objectMap["type"] = vwp.Type + } + return json.Marshal(objectMap) +} + +// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualWansCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualWansClient) (VirtualWAN, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result. +func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vw.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent { + vw, err = client.CreateOrUpdateResponder(vw.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualWansDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualWansClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualWansDeleteFuture.Result. +func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualWanSecurityProvider collection of SecurityProviders. +type VirtualWanSecurityProvider struct { + // Name - Name of the security provider. + Name *string `json:"name,omitempty"` + // URL - Url of the security provider. + URL *string `json:"url,omitempty"` + // Type - Name of the security provider. Possible values include: 'VirtualWanSecurityProviderTypeExternal', 'VirtualWanSecurityProviderTypeNative' + Type VirtualWanSecurityProviderType `json:"type,omitempty"` +} + +// VirtualWanSecurityProviders collection of SecurityProviders. +type VirtualWanSecurityProviders struct { + autorest.Response `json:"-"` + // SupportedProviders - List of VirtualWAN security providers. + SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` +} + +// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation. +type VirtualWanVpnProfileParameters struct { + // VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to. + VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"` + // AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2' + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` +} + +// VM describes a Virtual Machine. +type VM struct { + // ID - 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 VM. +func (vVar VM) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vVar.ID != nil { + objectMap["id"] = vVar.ID + } + if vVar.Location != nil { + objectMap["location"] = vVar.Location + } + if vVar.Tags != nil { + objectMap["tags"] = vVar.Tags + } + return json.Marshal(objectMap) +} + +// VnetRoute list of routes that control routing from VirtualHub into a virtual network connection. +type VnetRoute struct { + // StaticRoutes - List of all Static Routes. + StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` + // BgpConnections - READ-ONLY; The list of references to HubBgpConnection objects. + BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` +} + +// MarshalJSON is the custom marshaler for VnetRoute. +func (vr VnetRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vr.StaticRoutes != nil { + objectMap["staticRoutes"] = vr.StaticRoutes + } + return json.Marshal(objectMap) +} + +// VpnClientConfiguration vpnClientConfiguration for P2S client. +type VpnClientConfiguration struct { + // VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient. + VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` + // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway. + VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` + // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. + VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` + // VpnClientProtocols - VpnClientProtocols for Virtual network gateway. + VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` + // VpnAuthenticationTypes - VPN authentication types for the virtual network gateway.. + VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` + // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client. + VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` + // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection. + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` + // RadiusServers - The radiusServers property for multiple radius server configuration. + RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` + // AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AadTenant *string `json:"aadTenant,omitempty"` + // AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AadAudience *string `json:"aadAudience,omitempty"` + // AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AadIssuer *string `json:"aadIssuer,omitempty"` +} + +// VpnClientConnectionHealth vpnClientConnectionHealth properties. +type VpnClientConnectionHealth struct { + // TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection. + TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` + // TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection. + TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` + // VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway. + VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"` + // AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients. + AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnClientConnectionHealth. +func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcch.VpnClientConnectionsCount != nil { + objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount + } + if vcch.AllocatedIPAddresses != nil { + objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses + } + return json.Marshal(objectMap) +} + +// VpnClientConnectionHealthDetail VPN client connection health detail. +type VpnClientConnectionHealthDetail struct { + // VpnConnectionID - READ-ONLY; The vpn client Id. + VpnConnectionID *string `json:"vpnConnectionId,omitempty"` + // VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client. + VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"` + // VpnConnectionTime - READ-ONLY; The start time of a connected vpn client. + VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"` + // PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client. + PublicIPAddress *string `json:"publicIpAddress,omitempty"` + // PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client. + PrivateIPAddress *string `json:"privateIpAddress,omitempty"` + // VpnUserName - READ-ONLY; The user name of a connected vpn client. + VpnUserName *string `json:"vpnUserName,omitempty"` + // MaxBandwidth - READ-ONLY; The max band width. + MaxBandwidth *int64 `json:"maxBandwidth,omitempty"` + // EgressPacketsTransferred - READ-ONLY; The egress packets per second. + EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"` + // EgressBytesTransferred - READ-ONLY; The egress bytes per second. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // IngressPacketsTransferred - READ-ONLY; The ingress packets per second. + IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"` + // IngressBytesTransferred - READ-ONLY; The ingress bytes per second. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second. + MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail. +func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health. +type VpnClientConnectionHealthDetailListResult struct { + autorest.Response `json:"-"` + // Value - List of vpn client connection health. + Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"` +} + +// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection. +type VpnClientIPsecParameters struct { + autorest.Response `json:"-"` + // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` + // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` + // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' + IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` + // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' + IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` + // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'IkeEncryptionDES', 'IkeEncryptionDES3', 'IkeEncryptionAES128', 'IkeEncryptionAES192', 'IkeEncryptionAES256', 'IkeEncryptionGCMAES256', 'IkeEncryptionGCMAES128' + IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` + // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' + IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` + // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24' + DhGroup DhGroup `json:"dhGroup,omitempty"` + // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +} + +// VpnClientParameters vpn Client Parameters for package generation. +type VpnClientParameters struct { + // ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'ProcessorArchitectureAmd64', 'ProcessorArchitectureX86' + ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` + // AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2' + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` + // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. + RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` + // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. + ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` +} + +// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway. +type VpnClientRevokedCertificate struct { + // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. + *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. +func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { + objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat + } + if vcrc.Name != nil { + objectMap["name"] = vcrc.Name + } + if vcrc.ID != nil { + objectMap["id"] = vcrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. +func (vcrc *VpnClientRevokedCertificate) 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 vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat + err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) + if err != nil { + return err + } + vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vcrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vcrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vcrc.ID = &ID + } + } + } + + return nil +} + +// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual +// network gateway. +type VpnClientRevokedCertificatePropertiesFormat struct { + // Thumbprint - The revoked VPN client certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat. +func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrcpf.Thumbprint != nil { + objectMap["thumbprint"] = vcrcpf.Thumbprint + } + return json.Marshal(objectMap) +} + +// VpnClientRootCertificate VPN client root certificate of virtual network gateway. +type VpnClientRootCertificate struct { + // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. + *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnClientRootCertificate. +func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrc.VpnClientRootCertificatePropertiesFormat != nil { + objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat + } + if vcrc.Name != nil { + objectMap["name"] = vcrc.Name + } + if vcrc.ID != nil { + objectMap["id"] = vcrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. +func (vcrc *VpnClientRootCertificate) 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 vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat + err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) + if err != nil { + return err + } + vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vcrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vcrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vcrc.ID = &ID + } + } + } + + return nil +} + +// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway. +type VpnClientRootCertificatePropertiesFormat struct { + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat. +func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrcpf.PublicCertData != nil { + objectMap["publicCertData"] = vcrcpf.PublicCertData + } + return json.Marshal(objectMap) +} + +// VpnConnection vpnConnection Resource. +type VpnConnection struct { + autorest.Response `json:"-"` + // VpnConnectionProperties - Properties of the VPN connection. + *VpnConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnConnection. +func (vc VpnConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vc.VpnConnectionProperties != nil { + objectMap["properties"] = vc.VpnConnectionProperties + } + if vc.Name != nil { + objectMap["name"] = vc.Name + } + if vc.ID != nil { + objectMap["id"] = vc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnConnection struct. +func (vc *VpnConnection) 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 vpnConnectionProperties VpnConnectionProperties + err = json.Unmarshal(*v, &vpnConnectionProperties) + if err != nil { + return err + } + vc.VpnConnectionProperties = &vpnConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vc.ID = &ID + } + } + } + + return nil +} + +// VpnConnectionPacketCaptureStartParameters vpn Connection packet capture parameters supplied to start +// packet capture on gateway connection. +type VpnConnectionPacketCaptureStartParameters struct { + // FilterData - Start Packet capture parameters on vpn connection. + FilterData *string `json:"filterData,omitempty"` + // LinkConnectionNames - List of site link connection names. + LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"` +} + +// VpnConnectionPacketCaptureStopParameters vpn Connection packet capture parameters supplied to stop +// packet capture on gateway connection. +type VpnConnectionPacketCaptureStopParameters struct { + // SasURL - SAS url for packet capture on vpn connection. + SasURL *string `json:"sasUrl,omitempty"` + // LinkConnectionNames - List of site link connection names. + LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"` +} + +// VpnConnectionProperties parameters for VpnConnection. +type VpnConnectionProperties struct { + // RemoteVpnSite - Id of the connected vpn site. + RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` + // RoutingWeight - Routing weight for vpn connection. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // DpdTimeoutSeconds - DPD timeout in seconds for vpn connection. + DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"` + // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' + ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` + // VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1' + VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` + // IngressBytesTransferred - READ-ONLY; Ingress bytes transferred. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // EgressBytesTransferred - READ-ONLY; Egress bytes transferred. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // ConnectionBandwidth - Expected bandwidth in MBPS. + ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` + // SharedKey - SharedKey for the vpn connection. + SharedKey *string `json:"sharedKey,omitempty"` + // EnableBgp - EnableBgp flag. + EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection. + TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` + // EnableRateLimiting - EnableBgp flag. + EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` + // EnableInternetSecurity - Enable internet security. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // UseLocalAzureIPAddress - Use local azure ip to initiate connection. + UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnLinkConnections - List of all vpn site link connections to the gateway. + VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` + // RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnConnectionProperties. +func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcp.RemoteVpnSite != nil { + objectMap["remoteVpnSite"] = vcp.RemoteVpnSite + } + if vcp.RoutingWeight != nil { + objectMap["routingWeight"] = vcp.RoutingWeight + } + if vcp.DpdTimeoutSeconds != nil { + objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds + } + if vcp.ConnectionStatus != "" { + objectMap["connectionStatus"] = vcp.ConnectionStatus + } + if vcp.VpnConnectionProtocolType != "" { + objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType + } + if vcp.ConnectionBandwidth != nil { + objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth + } + if vcp.SharedKey != nil { + objectMap["sharedKey"] = vcp.SharedKey + } + if vcp.EnableBgp != nil { + objectMap["enableBgp"] = vcp.EnableBgp + } + if vcp.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors + } + if vcp.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vcp.IpsecPolicies + } + if vcp.TrafficSelectorPolicies != nil { + objectMap["trafficSelectorPolicies"] = vcp.TrafficSelectorPolicies + } + if vcp.EnableRateLimiting != nil { + objectMap["enableRateLimiting"] = vcp.EnableRateLimiting + } + if vcp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity + } + if vcp.UseLocalAzureIPAddress != nil { + objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress + } + if vcp.VpnLinkConnections != nil { + objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections + } + if vcp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = vcp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + +// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnConnectionsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnConnectionsClient) (VpnConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result. +func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(vc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnConnectionsDeleteFuture.Result. +func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnConnectionsStartPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnConnectionsClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnConnectionsStartPacketCaptureFuture.Result. +func (future *VpnConnectionsStartPacketCaptureFuture) result(client VpnConnectionsClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsStartPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StartPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnConnectionsStopPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnConnectionsClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnConnectionsStopPacketCaptureFuture.Result. +func (future *VpnConnectionsStopPacketCaptureFuture) result(client VpnConnectionsClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsStopPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StopPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnDeviceScriptParameters vpn device configuration script generation parameters. +type VpnDeviceScriptParameters struct { + // Vendor - The vendor for the vpn device. + Vendor *string `json:"vendor,omitempty"` + // DeviceFamily - The device family for the vpn device. + DeviceFamily *string `json:"deviceFamily,omitempty"` + // FirmwareVersion - The firmware version for the vpn device. + FirmwareVersion *string `json:"firmwareVersion,omitempty"` +} + +// VpnGateway vpnGateway Resource. +type VpnGateway struct { + autorest.Response `json:"-"` + // VpnGatewayProperties - Properties of the VPN gateway. + *VpnGatewayProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VpnGateway. +func (vg VpnGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vg.VpnGatewayProperties != nil { + objectMap["properties"] = vg.VpnGatewayProperties + } + if vg.ID != nil { + objectMap["id"] = vg.ID + } + if vg.Location != nil { + objectMap["location"] = vg.Location + } + if vg.Tags != nil { + objectMap["tags"] = vg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnGateway struct. +func (vg *VpnGateway) 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 vpnGatewayProperties VpnGatewayProperties + err = json.Unmarshal(*v, &vpnGatewayProperties) + if err != nil { + return err + } + vg.VpnGatewayProperties = &vpnGatewayProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vg.Tags = tags + } + } + } + + return nil +} + +// VpnGatewayIPConfiguration IP Configuration of a VPN Gateway Resource. +type VpnGatewayIPConfiguration struct { + // ID - The identifier of the IP configuration for a VPN Gateway. + ID *string `json:"id,omitempty"` + // PublicIPAddress - The public IP address of this IP configuration. + PublicIPAddress *string `json:"publicIpAddress,omitempty"` + // PrivateIPAddress - The private IP address of this IP configuration. + PrivateIPAddress *string `json:"privateIpAddress,omitempty"` +} + +// VpnGatewayNatRule vpnGatewayNatRule Resource. +type VpnGatewayNatRule struct { + autorest.Response `json:"-"` + // VpnGatewayNatRuleProperties - Properties of the VpnGateway NAT rule. + *VpnGatewayNatRuleProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnGatewayNatRule. +func (vgnr VpnGatewayNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vgnr.VpnGatewayNatRuleProperties != nil { + objectMap["properties"] = vgnr.VpnGatewayNatRuleProperties + } + if vgnr.Name != nil { + objectMap["name"] = vgnr.Name + } + if vgnr.ID != nil { + objectMap["id"] = vgnr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnGatewayNatRule struct. +func (vgnr *VpnGatewayNatRule) 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 vpnGatewayNatRuleProperties VpnGatewayNatRuleProperties + err = json.Unmarshal(*v, &vpnGatewayNatRuleProperties) + if err != nil { + return err + } + vgnr.VpnGatewayNatRuleProperties = &vpnGatewayNatRuleProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vgnr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vgnr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vgnr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vgnr.ID = &ID + } + } + } + + return nil +} + +// VpnGatewayNatRuleProperties parameters for VpnGatewayNatRule. +type VpnGatewayNatRuleProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic' + Type VpnNatRuleType `json:"type,omitempty"` + // Mode - The Source NAT direction of a VPN NAT. Possible values include: 'VpnNatRuleModeEgressSnat', 'VpnNatRuleModeIngressSnat' + Mode VpnNatRuleMode `json:"mode,omitempty"` + // InternalMappings - The private IP address internal mapping for NAT. + InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` + // ExternalMappings - The private IP address external mapping for NAT. + ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` + // IPConfigurationID - The IP Configuration ID this NAT rule applies to. + IPConfigurationID *string `json:"ipConfigurationId,omitempty"` + // EgressVpnSiteLinkConnections - READ-ONLY; List of egress VpnSiteLinkConnections. + EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"` + // IngressVpnSiteLinkConnections - READ-ONLY; List of ingress VpnSiteLinkConnections. + IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnGatewayNatRuleProperties. +func (vgnrp VpnGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vgnrp.Type != "" { + objectMap["type"] = vgnrp.Type + } + if vgnrp.Mode != "" { + objectMap["mode"] = vgnrp.Mode + } + if vgnrp.InternalMappings != nil { + objectMap["internalMappings"] = vgnrp.InternalMappings + } + if vgnrp.ExternalMappings != nil { + objectMap["externalMappings"] = vgnrp.ExternalMappings + } + if vgnrp.IPConfigurationID != nil { + objectMap["ipConfigurationId"] = vgnrp.IPConfigurationID + } + return json.Marshal(objectMap) +} + +// VpnGatewayPacketCaptureStartParameters start packet capture parameters. +type VpnGatewayPacketCaptureStartParameters struct { + // FilterData - Start Packet capture parameters on vpn gateway. + FilterData *string `json:"filterData,omitempty"` +} + +// VpnGatewayPacketCaptureStopParameters stop packet capture parameters. +type VpnGatewayPacketCaptureStopParameters struct { + // SasURL - SAS url for packet capture on vpn gateway. + SasURL *string `json:"sasUrl,omitempty"` +} + +// VpnGatewayProperties parameters for VpnGateway. +type VpnGatewayProperties struct { + // VirtualHub - The VirtualHub to which the gateway belongs. + VirtualHub *SubResource `json:"virtualHub,omitempty"` + // Connections - List of all vpn connections to the gateway. + Connections *[]VpnConnection `json:"connections,omitempty"` + // BgpSettings - Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnGatewayScaleUnit - The scale unit for this vpn gateway. + VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` + // IPConfigurations - READ-ONLY; List of all IPs configured on the gateway. + IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"` + // EnableBgpRouteTranslationForNat - Enable BGP routes translation for NAT on this VpnGateway. + EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` + // IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the VpnGateway. + IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` + // NatRules - List of all the nat Rules associated with the gateway. + NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnGatewayProperties. +func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vgp.VirtualHub != nil { + objectMap["virtualHub"] = vgp.VirtualHub + } + if vgp.Connections != nil { + objectMap["connections"] = vgp.Connections + } + if vgp.BgpSettings != nil { + objectMap["bgpSettings"] = vgp.BgpSettings + } + if vgp.VpnGatewayScaleUnit != nil { + objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit + } + if vgp.EnableBgpRouteTranslationForNat != nil { + objectMap["enableBgpRouteTranslationForNat"] = vgp.EnableBgpRouteTranslationForNat + } + if vgp.IsRoutingPreferenceInternet != nil { + objectMap["isRoutingPreferenceInternet"] = vgp.IsRoutingPreferenceInternet + } + if vgp.NatRules != nil { + objectMap["natRules"] = vgp.NatRules + } + return json.Marshal(objectMap) +} + +// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnGatewaysCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnGatewaysClient) (VpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result. +func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { + vg, err = client.CreateOrUpdateResponder(vg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnGatewaysDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnGatewaysClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnGatewaysDeleteFuture.Result. +func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnGatewaysResetFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnGatewaysClient) (VpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnGatewaysResetFuture.Result. +func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { + vg, err = client.ResetResponder(vg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnGatewaysStartPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnGatewaysStartPacketCaptureFuture.Result. +func (future *VpnGatewaysStartPacketCaptureFuture) result(client VpnGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysStartPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StartPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnGatewaysStopPacketCaptureFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnGatewaysClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnGatewaysStopPacketCaptureFuture.Result. +func (future *VpnGatewaysStopPacketCaptureFuture) result(client VpnGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysStopPacketCaptureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.StopPacketCaptureResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnGatewaysUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnGatewaysClient) (VpnGateway, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result. +func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { + vg, err = client.UpdateTagsResponder(vg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnLinkBgpSettings BGP settings details for a link. +type VpnLinkBgpSettings struct { + // Asn - The BGP speaker's ASN. + Asn *int64 `json:"asn,omitempty"` + // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` +} + +// VpnLinkConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnLinkConnectionsGetIkeSasFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnLinkConnectionsClient) (String, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnLinkConnectionsGetIkeSasFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnLinkConnectionsGetIkeSasFuture.Result. +func (future *VpnLinkConnectionsGetIkeSasFuture) result(client VpnLinkConnectionsClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsGetIkeSasFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnLinkConnectionsGetIkeSasFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GetIkeSasResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsGetIkeSasFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnLinkConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnLinkConnectionsResetConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnLinkConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnLinkConnectionsResetConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnLinkConnectionsResetConnectionFuture.Result. +func (future *VpnLinkConnectionsResetConnectionFuture) result(client VpnLinkConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsResetConnectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnLinkConnectionsResetConnectionFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnLinkProviderProperties list of properties of a link provider. +type VpnLinkProviderProperties struct { + // LinkProviderName - Name of the link provider. + LinkProviderName *string `json:"linkProviderName,omitempty"` + // LinkSpeedInMbps - Link speed. + LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` +} + +// VpnNatRuleMapping vpn NatRule mapping. +type VpnNatRuleMapping struct { + // AddressSpace - Address space for Vpn NatRule mapping. + AddressSpace *string `json:"addressSpace,omitempty"` +} + +// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway. +type VpnPacketCaptureStartParameters struct { + // FilterData - Start Packet capture parameters. + FilterData *string `json:"filterData,omitempty"` +} + +// VpnPacketCaptureStopParameters stop packet capture parameters. +type VpnPacketCaptureStopParameters struct { + // SasURL - SAS url for packet capture on virtual network gateway. + SasURL *string `json:"sasUrl,omitempty"` +} + +// VpnProfileResponse vpn Profile Response for package generation. +type VpnProfileResponse struct { + autorest.Response `json:"-"` + // ProfileURL - URL to the VPN profile. + ProfileURL *string `json:"profileUrl,omitempty"` +} + +// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of +// VpnServerConfiguration. +type VpnServerConfigRadiusClientRootCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // Thumbprint - The Radius client root certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` +} + +// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of +// VpnServerConfiguration. +type VpnServerConfigRadiusServerRootCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` +} + +// VpnServerConfiguration vpnServerConfiguration Resource. +type VpnServerConfiguration struct { + autorest.Response `json:"-"` + // VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration. + *VpnServerConfigurationProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VpnServerConfiguration. +func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vsc.VpnServerConfigurationProperties != nil { + objectMap["properties"] = vsc.VpnServerConfigurationProperties + } + if vsc.ID != nil { + objectMap["id"] = vsc.ID + } + if vsc.Location != nil { + objectMap["location"] = vsc.Location + } + if vsc.Tags != nil { + objectMap["tags"] = vsc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct. +func (vsc *VpnServerConfiguration) 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 vpnServerConfigurationProperties VpnServerConfigurationProperties + err = json.Unmarshal(*v, &vpnServerConfigurationProperties) + if err != nil { + return err + } + vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vsc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vsc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vsc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vsc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vsc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vsc.Tags = tags + } + } + } + + return nil +} + +// VpnServerConfigurationProperties parameters for VpnServerConfiguration. +type VpnServerConfigurationProperties struct { + // Name - The name of the VpnServerConfiguration that is unique within a resource group. + Name *string `json:"name,omitempty"` + // VpnProtocols - VPN protocols for the VpnServerConfiguration. + VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` + // VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration. + VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,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. + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + // RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection. + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` + // RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration. + RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` + // AadAuthenticationParameters - The set of aad vpn authentication parameters. + AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways. + P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties. +func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vscp.Name != nil { + objectMap["name"] = vscp.Name + } + if vscp.VpnProtocols != nil { + objectMap["vpnProtocols"] = vscp.VpnProtocols + } + if vscp.VpnAuthenticationTypes != nil { + objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes + } + if vscp.VpnClientRootCertificates != nil { + objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates + } + if vscp.VpnClientRevokedCertificates != nil { + objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates + } + if vscp.RadiusServerRootCertificates != nil { + objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates + } + if vscp.RadiusClientRootCertificates != nil { + objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates + } + if vscp.VpnClientIpsecPolicies != nil { + objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies + } + if vscp.RadiusServerAddress != nil { + objectMap["radiusServerAddress"] = vscp.RadiusServerAddress + } + if vscp.RadiusServerSecret != nil { + objectMap["radiusServerSecret"] = vscp.RadiusServerSecret + } + if vscp.RadiusServers != nil { + objectMap["radiusServers"] = vscp.RadiusServers + } + if vscp.AadAuthenticationParameters != nil { + objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters + } + return json.Marshal(objectMap) +} + +// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result. +func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) result(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vscr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent { + vscr, err = client.ListResponder(vscr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VpnServerConfigurationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnServerConfigurationsCreateOrUpdateFuture.Result. +func (future *VpnServerConfigurationsCreateOrUpdateFuture) result(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vsc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent { + vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnServerConfigurationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnServerConfigurationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnServerConfigurationsDeleteFuture.Result. +func (future *VpnServerConfigurationsDeleteFuture) result(client VpnServerConfigurationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response. +type VpnServerConfigurationsResponse struct { + autorest.Response `json:"-"` + // VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan. + VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"` +} + +// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of +// VpnServerConfiguration. +type VpnServerConfigVpnClientRevokedCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // Thumbprint - The revoked VPN client certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` +} + +// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of +// VpnServerConfiguration. +type VpnServerConfigVpnClientRootCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` +} + +// VpnSite vpnSite Resource. +type VpnSite struct { + autorest.Response `json:"-"` + // VpnSiteProperties - Properties of the VPN site. + *VpnSiteProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 VpnSite. +func (vs VpnSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vs.VpnSiteProperties != nil { + objectMap["properties"] = vs.VpnSiteProperties + } + if vs.ID != nil { + objectMap["id"] = vs.ID + } + if vs.Location != nil { + objectMap["location"] = vs.Location + } + if vs.Tags != nil { + objectMap["tags"] = vs.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnSite struct. +func (vs *VpnSite) 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 vpnSiteProperties VpnSiteProperties + err = json.Unmarshal(*v, &vpnSiteProperties) + if err != nil { + return err + } + vs.VpnSiteProperties = &vpnSiteProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vs.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vs.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vs.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vs.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vs.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vs.Tags = tags + } + } + } + + return nil +} + +// VpnSiteID vpnSite Resource. +type VpnSiteID struct { + // VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. + VpnSite *string `json:"vpnSite,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteID. +func (vsi VpnSiteID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VpnSiteLink vpnSiteLink Resource. +type VpnSiteLink struct { + autorest.Response `json:"-"` + // VpnSiteLinkProperties - Properties of the VPN site link. + *VpnSiteLinkProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteLink. +func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vsl.VpnSiteLinkProperties != nil { + objectMap["properties"] = vsl.VpnSiteLinkProperties + } + if vsl.Name != nil { + objectMap["name"] = vsl.Name + } + if vsl.ID != nil { + objectMap["id"] = vsl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct. +func (vsl *VpnSiteLink) 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 vpnSiteLinkProperties VpnSiteLinkProperties + err = json.Unmarshal(*v, &vpnSiteLinkProperties) + if err != nil { + return err + } + vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vsl.Etag = &etag + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vsl.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vsl.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vsl.ID = &ID + } + } + } + + return nil +} + +// VpnSiteLinkConnection vpnSiteLinkConnection Resource. +type VpnSiteLinkConnection struct { + autorest.Response `json:"-"` + // VpnSiteLinkConnectionProperties - Properties of the VPN site link connection. + *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteLinkConnection. +func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vslc.VpnSiteLinkConnectionProperties != nil { + objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties + } + if vslc.Name != nil { + objectMap["name"] = vslc.Name + } + if vslc.ID != nil { + objectMap["id"] = vslc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct. +func (vslc *VpnSiteLinkConnection) 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 vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties + err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties) + if err != nil { + return err + } + vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vslc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vslc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vslc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vslc.ID = &ID + } + } + } + + return nil +} + +// VpnSiteLinkConnectionProperties parameters for VpnConnection. +type VpnSiteLinkConnectionProperties struct { + // VpnSiteLink - Id of the connected vpn site link. + VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` + // RoutingWeight - Routing weight for vpn connection. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // VpnLinkConnectionMode - Vpn link connection mode. Possible values include: 'VpnLinkConnectionModeDefault', 'VpnLinkConnectionModeResponderOnly', 'VpnLinkConnectionModeInitiatorOnly' + VpnLinkConnectionMode VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"` + // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' + ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` + // VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1' + VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` + // IngressBytesTransferred - READ-ONLY; Ingress bytes transferred. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // EgressBytesTransferred - READ-ONLY; Egress bytes transferred. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // ConnectionBandwidth - Expected bandwidth in MBPS. + ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` + // SharedKey - SharedKey for the vpn connection. + SharedKey *string `json:"sharedKey,omitempty"` + // EnableBgp - EnableBgp flag. + EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // EnableRateLimiting - EnableBgp flag. + EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` + // UseLocalAzureIPAddress - Use local azure ip to initiate connection. + UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // IngressNatRules - List of ingress NatRules. + IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` + // EgressNatRules - List of egress NatRules. + EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties. +func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vslcp.VpnSiteLink != nil { + objectMap["vpnSiteLink"] = vslcp.VpnSiteLink + } + if vslcp.RoutingWeight != nil { + objectMap["routingWeight"] = vslcp.RoutingWeight + } + if vslcp.VpnLinkConnectionMode != "" { + objectMap["vpnLinkConnectionMode"] = vslcp.VpnLinkConnectionMode + } + if vslcp.ConnectionStatus != "" { + objectMap["connectionStatus"] = vslcp.ConnectionStatus + } + if vslcp.VpnConnectionProtocolType != "" { + objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType + } + if vslcp.ConnectionBandwidth != nil { + objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth + } + if vslcp.SharedKey != nil { + objectMap["sharedKey"] = vslcp.SharedKey + } + if vslcp.EnableBgp != nil { + objectMap["enableBgp"] = vslcp.EnableBgp + } + if vslcp.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors + } + if vslcp.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vslcp.IpsecPolicies + } + if vslcp.EnableRateLimiting != nil { + objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting + } + if vslcp.UseLocalAzureIPAddress != nil { + objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress + } + if vslcp.IngressNatRules != nil { + objectMap["ingressNatRules"] = vslcp.IngressNatRules + } + if vslcp.EgressNatRules != nil { + objectMap["egressNatRules"] = vslcp.EgressNatRules + } + return json.Marshal(objectMap) +} + +// VpnSiteLinkProperties parameters for VpnSite. +type VpnSiteLinkProperties struct { + // LinkProperties - The link provider properties. + LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` + // IPAddress - The ip-address for the vpn-site-link. + IPAddress *string `json:"ipAddress,omitempty"` + // Fqdn - FQDN of vpn-site-link. + Fqdn *string `json:"fqdn,omitempty"` + // BgpProperties - The set of bgp properties. + BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteLinkProperties. +func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vslp.LinkProperties != nil { + objectMap["linkProperties"] = vslp.LinkProperties + } + if vslp.IPAddress != nil { + objectMap["ipAddress"] = vslp.IPAddress + } + if vslp.Fqdn != nil { + objectMap["fqdn"] = vslp.Fqdn + } + if vslp.BgpProperties != nil { + objectMap["bgpProperties"] = vslp.BgpProperties + } + return json.Marshal(objectMap) +} + +// VpnSiteProperties parameters for VpnSite. +type VpnSiteProperties struct { + // VirtualWan - The VirtualWAN to which the vpnSite belongs. + VirtualWan *SubResource `json:"virtualWan,omitempty"` + // DeviceProperties - The device properties. + DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` + // IPAddress - The ip-address for the vpn-site. + IPAddress *string `json:"ipAddress,omitempty"` + // SiteKey - The key for vpn-site that can be used for connections. + SiteKey *string `json:"siteKey,omitempty"` + // AddressSpace - The AddressSpace that contains an array of IP address ranges. + AddressSpace *AddressSpace `json:"addressSpace,omitempty"` + // BgpProperties - The set of bgp properties. + BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // IsSecuritySite - IsSecuritySite flag. + IsSecuritySite *bool `json:"isSecuritySite,omitempty"` + // VpnSiteLinks - List of all vpn site links. + VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` + // O365Policy - Office365 Policy. + O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteProperties. +func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vsp.VirtualWan != nil { + objectMap["virtualWan"] = vsp.VirtualWan + } + if vsp.DeviceProperties != nil { + objectMap["deviceProperties"] = vsp.DeviceProperties + } + if vsp.IPAddress != nil { + objectMap["ipAddress"] = vsp.IPAddress + } + if vsp.SiteKey != nil { + objectMap["siteKey"] = vsp.SiteKey + } + if vsp.AddressSpace != nil { + objectMap["addressSpace"] = vsp.AddressSpace + } + if vsp.BgpProperties != nil { + objectMap["bgpProperties"] = vsp.BgpProperties + } + if vsp.IsSecuritySite != nil { + objectMap["isSecuritySite"] = vsp.IsSecuritySite + } + if vsp.VpnSiteLinks != nil { + objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks + } + if vsp.O365Policy != nil { + objectMap["o365Policy"] = vsp.O365Policy + } + return json.Marshal(objectMap) +} + +// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnSitesConfigurationDownloadFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnSitesConfigurationClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result. +func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnSitesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnSitesClient) (VpnSite, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result. +func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vs.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent { + vs, err = client.CreateOrUpdateResponder(vs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnSitesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VpnSitesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VpnSitesDeleteFuture.Result. +func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// Watcher network watcher in a resource group. +type Watcher struct { + autorest.Response `json:"-"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // WatcherPropertiesFormat - Properties of the network watcher. + *WatcherPropertiesFormat `json:"properties,omitempty"` + // ID - 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 Watcher. +func (w Watcher) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if w.WatcherPropertiesFormat != nil { + objectMap["properties"] = w.WatcherPropertiesFormat + } + if w.ID != nil { + objectMap["id"] = w.ID + } + if w.Location != nil { + objectMap["location"] = w.Location + } + if w.Tags != nil { + objectMap["tags"] = w.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Watcher struct. +func (w *Watcher) 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 "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + w.Etag = &etag + } + case "properties": + if v != nil { + var watcherPropertiesFormat WatcherPropertiesFormat + err = json.Unmarshal(*v, &watcherPropertiesFormat) + if err != nil { + return err + } + w.WatcherPropertiesFormat = &watcherPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + w.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + w.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + w.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + w.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + w.Tags = tags + } + } + } + + return nil +} + +// WatcherListResult response for ListNetworkWatchers API service call. +type WatcherListResult struct { + autorest.Response `json:"-"` + // Value - List of network watcher resources. + Value *[]Watcher `json:"value,omitempty"` +} + +// WatcherPropertiesFormat the network watcher properties. +type WatcherPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for WatcherPropertiesFormat. +func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersCheckConnectivityFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (ConnectivityInformation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersCheckConnectivityFuture.Result. +func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ci.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent { + ci, err = client.CheckConnectivityResponder(ci.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WatchersDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersDeleteFuture.Result. +func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersGetAzureReachabilityReportFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (AzureReachabilityReport, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result. +func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + arr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent { + arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersGetFlowLogStatusFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (FlowLogInformation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetFlowLogStatusFuture.Result. +func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + fli.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent { + fli, err = client.GetFlowLogStatusResponder(fli.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type WatchersGetNetworkConfigurationDiagnosticFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (ConfigurationDiagnosticResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result. +func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cdr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent { + cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WatchersGetNextHopFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (NextHopResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetNextHopFuture.Result. +func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + nhr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent { + nhr, err = client.GetNextHopResponder(nhr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersGetTroubleshootingFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (TroubleshootingResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetTroubleshootingFuture.Result. +func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + tr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture") + 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.GetTroubleshootingResponder(tr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersGetTroubleshootingResultFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (TroubleshootingResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result. +func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + tr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture") + 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.GetTroubleshootingResultResponder(tr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersGetVMSecurityRulesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (SecurityGroupViewResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result. +func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sgvr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent { + sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersListAvailableProvidersFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (AvailableProvidersList, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersListAvailableProvidersFuture.Result. +func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + apl.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent { + apl, err = client.ListAvailableProvidersResponder(apl.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersSetFlowLogConfigurationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (FlowLogInformation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result. +func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + fli.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent { + fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request") + } + } + return +} + +// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WatchersVerifyIPFlowFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WatchersClient) (VerificationIPFlowResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WatchersVerifyIPFlowFuture.Result. +func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vifr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent { + vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request") + } + } + return +} + +// WebApplicationFirewallCustomRule defines contents of a web application rule. +type WebApplicationFirewallCustomRule struct { + // Name - The name of the resource that is unique within a policy. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + Priority *int32 `json:"priority,omitempty"` + // RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid' + RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"` + // MatchConditions - List of match conditions. + MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"` + // Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog' + Action WebApplicationFirewallAction `json:"action,omitempty"` +} + +// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule. +func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafcr.Name != nil { + objectMap["name"] = wafcr.Name + } + if wafcr.Priority != nil { + objectMap["priority"] = wafcr.Priority + } + if wafcr.RuleType != "" { + objectMap["ruleType"] = wafcr.RuleType + } + if wafcr.MatchConditions != nil { + objectMap["matchConditions"] = wafcr.MatchConditions + } + if wafcr.Action != "" { + objectMap["action"] = wafcr.Action + } + return json.Marshal(objectMap) +} + +// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WebApplicationFirewallPoliciesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result. +func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// WebApplicationFirewallPolicy defines web application firewall policy. +type WebApplicationFirewallPolicy struct { + autorest.Response `json:"-"` + // WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy. + *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - 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 WebApplicationFirewallPolicy. +func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil { + objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat + } + if wafp.ID != nil { + objectMap["id"] = wafp.ID + } + if wafp.Location != nil { + objectMap["location"] = wafp.Location + } + if wafp.Tags != nil { + objectMap["tags"] = wafp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct. +func (wafp *WebApplicationFirewallPolicy) 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 webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat + err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat) + if err != nil { + return err + } + wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + wafp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wafp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wafp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wafp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + wafp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wafp.Tags = tags + } + } + } + + return nil +} + +// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It +// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. +type WebApplicationFirewallPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group. + Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult. +func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of +// WebApplicationFirewallPolicy values. +type WebApplicationFirewallPolicyListResultIterator struct { + i int + page WebApplicationFirewallPolicyListResultPage +} + +// 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 *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.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 *WebApplicationFirewallPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WebApplicationFirewallPolicyListResultIterator) 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 WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult { + 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 WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy { + if !iter.page.NotDone() { + return WebApplicationFirewallPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type. +func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator { + return WebApplicationFirewallPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool { + return wafplr.Value == nil || len(*wafplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool { + return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0 +} + +// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wafplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wafplr.NextLink))) +} + +// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values. +type WebApplicationFirewallPolicyListResultPage struct { + fn func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error) + wafplr WebApplicationFirewallPolicyListResult +} + +// 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 *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.wafplr) + if err != nil { + return err + } + page.wafplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *WebApplicationFirewallPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool { + return !page.wafplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult { + return page.wafplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy { + if page.wafplr.IsEmpty() { + return nil + } + return *page.wafplr.Value +} + +// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type. +func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage { + return WebApplicationFirewallPolicyListResultPage{ + fn: getNextPage, + wafplr: cur, + } +} + +// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties. +type WebApplicationFirewallPolicyPropertiesFormat struct { + // PolicySettings - The PolicySettings for policy. + PolicySettings *PolicySettings `json:"policySettings,omitempty"` + // CustomRules - The custom rules inside the policy. + CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"` + // ApplicationGateways - READ-ONLY; A collection of references to application gateways. + ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting' + ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"` + // ManagedRules - Describes the managedRules structure. + ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"` + // HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners. + HTTPListeners *[]SubResource `json:"httpListeners,omitempty"` + // PathBasedRules - READ-ONLY; A collection of references to application gateway path rules. + PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"` +} + +// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat. +func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafppf.PolicySettings != nil { + objectMap["policySettings"] = wafppf.PolicySettings + } + if wafppf.CustomRules != nil { + objectMap["customRules"] = wafppf.CustomRules + } + if wafppf.ManagedRules != nil { + objectMap["managedRules"] = wafppf.ManagedRules + } + return json.Marshal(objectMap) +} diff --git a/services/network/mgmt/2021-03-01/network/natgateways.go b/services/network/mgmt/2021-03-01/network/natgateways.go new file mode 100644 index 000000000000..21aafd2eb61c --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/natgateways.go @@ -0,0 +1,578 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// NatGatewaysClient is the network Client +type NatGatewaysClient struct { + BaseClient +} + +// NewNatGatewaysClient creates an instance of the NatGatewaysClient client. +func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { + return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewNatGatewaysClientWithBaseURI(baseURI string, subscriptionID string) NatGatewaysClient { + return NatGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a nat gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +// parameters - parameters supplied to the create or update nat gateway operation. +func (client NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway) (result NatGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, natGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result NatGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified nat gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName string, natGatewayName string) (result NatGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, natGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, natGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified nat gateway in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +// expand - expands referenced resources. +func (client NatGatewaysClient) Get(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (result NatGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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, natGatewayName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) GetResponder(resp *http.Response) (result NatGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all nat gateways in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client NatGatewaysClient) List(ctx context.Context, resourceGroupName string) (result NatGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.List") + defer func() { + sc := -1 + if result.nglr.Response.Response != nil { + sc = result.nglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.nglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.nglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.nglr.hasNextLink() && result.nglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client NatGatewaysClient) ListPreparer(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 = "2021-03-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.Network/natGateways", 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 NatGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) ListResponder(resp *http.Response) (result NatGatewayListResult, err error) { + err = autorest.Respond( + resp, + 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 NatGatewaysClient) listNextResults(ctx context.Context, lastResults NatGatewayListResult) (result NatGatewayListResult, err error) { + req, err := lastResults.natGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "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, "network.NatGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client NatGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result NatGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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) + return +} + +// ListAll gets all the Nat Gateways in a subscription. +func (client NatGatewaysClient) ListAll(ctx context.Context) (result NatGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.ListAll") + defer func() { + sc := -1 + if result.nglr.Response.Response != nil { + sc = result.nglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.nglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", resp, "Failure sending request") + return + } + + result.nglr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", resp, "Failure responding to request") + return + } + if result.nglr.hasNextLink() && result.nglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client NatGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) ListAllResponder(resp *http.Response) (result NatGatewayListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client NatGatewaysClient) listAllNextResults(ctx context.Context, lastResults NatGatewayListResult) (result NatGatewayListResult, err error) { + req, err := lastResults.natGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client NatGatewaysClient) ListAllComplete(ctx context.Context) (result NatGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates nat gateway tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +// parameters - parameters supplied to update nat gateway tags. +func (client NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject) (result NatGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, natGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/natGateways/{natGatewayName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client NatGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) UpdateTagsResponder(resp *http.Response) (result NatGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/natrules.go b/services/network/mgmt/2021-03-01/network/natrules.go new file mode 100644 index 000000000000..1924bf62f9a2 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/natrules.go @@ -0,0 +1,391 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// NatRulesClient is the network Client +type NatRulesClient struct { + BaseClient +} + +// NewNatRulesClient creates an instance of the NatRulesClient client. +func NewNatRulesClient(subscriptionID string) NatRulesClient { + return NewNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewNatRulesClientWithBaseURI creates an instance of the NatRulesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewNatRulesClientWithBaseURI(baseURI string, subscriptionID string) NatRulesClient { + return NatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +// natRuleParameters - parameters supplied to create or Update a Nat Rule. +func (client NatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VpnGatewayNatRule) (result NatRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client NatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VpnGatewayNatRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + natRuleParameters.Etag = nil + natRuleParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}", pathParameters), + autorest.WithJSON(natRuleParameters), + 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 NatRulesClient) CreateOrUpdateSender(req *http.Request) (future NatRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client NatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VpnGatewayNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a nat rule. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +func (client NatRulesClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string) (result NatRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName, natRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client NatRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}", 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 NatRulesClient) DeleteSender(req *http.Request) (future NatRulesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client NatRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a nat ruleGet. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +func (client NatRulesClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string) (result VpnGatewayNatRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatRulesClient.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, gatewayName, natRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client NatRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}", 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 NatRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client NatRulesClient) GetResponder(resp *http.Response) (result VpnGatewayNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnGateway retrieves all nat rules for a particular virtual wan vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client NatRulesClient) ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnGatewayNatRulesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatRulesClient.ListByVpnGateway") + defer func() { + sc := -1 + if result.lvgnrr.Response.Response != nil { + sc = result.lvgnrr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnGatewayNextResults + req, err := client.ListByVpnGatewayPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "ListByVpnGateway", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnGatewaySender(req) + if err != nil { + result.lvgnrr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "ListByVpnGateway", resp, "Failure sending request") + return + } + + result.lvgnrr, err = client.ListByVpnGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "ListByVpnGateway", resp, "Failure responding to request") + return + } + if result.lvgnrr.hasNextLink() && result.lvgnrr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVpnGatewayPreparer prepares the ListByVpnGateway request. +func (client NatRulesClient) ListByVpnGatewayPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/natRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVpnGatewaySender sends the ListByVpnGateway request. The method will close the +// http.Response Body if it receives an error. +func (client NatRulesClient) ListByVpnGatewaySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always +// closes the http.Response Body. +func (client NatRulesClient) ListByVpnGatewayResponder(resp *http.Response) (result ListVpnGatewayNatRulesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnGatewayNextResults retrieves the next set of results, if any. +func (client NatRulesClient) listByVpnGatewayNextResults(ctx context.Context, lastResults ListVpnGatewayNatRulesResult) (result ListVpnGatewayNatRulesResult, err error) { + req, err := lastResults.listVpnGatewayNatRulesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.NatRulesClient", "listByVpnGatewayNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnGatewaySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.NatRulesClient", "listByVpnGatewayNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatRulesClient", "listByVpnGatewayNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnGatewayComplete enumerates all values, automatically crossing page boundaries as required. +func (client NatRulesClient) ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnGatewayNatRulesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatRulesClient.ListByVpnGateway") + 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.ListByVpnGateway(ctx, resourceGroupName, gatewayName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/networkapi/interfaces.go b/services/network/mgmt/2021-03-01/network/networkapi/interfaces.go new file mode 100644 index 000000000000..ff847af76240 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/networkapi/interfaces.go @@ -0,0 +1,1347 @@ +package networkapi + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/network/mgmt/2021-03-01/network" +) + +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result network.DNSNameAvailabilityResult, err error) + DeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest network.BastionShareableLinkListRequest) (result network.DeleteBastionShareableLinkFuture, err error) + DisconnectActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIds network.SessionIds) (result network.BastionSessionDeleteResultPage, err error) + DisconnectActiveSessionsComplete(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIds network.SessionIds) (result network.BastionSessionDeleteResultIterator, err error) + Generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams network.VirtualWanVpnProfileParameters) (result network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture, err error) + GetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string) (result network.GetActiveSessionsFuture, err error) + GetActiveSessionsComplete(ctx context.Context, resourceGroupName string, bastionHostName string) (result network.GetActiveSessionsAllFuture, err error) + GetBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest network.BastionShareableLinkListRequest) (result network.BastionShareableLinkListResultPage, err error) + GetBastionShareableLinkComplete(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest network.BastionShareableLinkListRequest) (result network.BastionShareableLinkListResultIterator, err error) + PutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest network.BastionShareableLinkListRequest) (result network.PutBastionShareableLinkFuture, err error) + PutBastionShareableLinkComplete(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest network.BastionShareableLinkListRequest) (result network.PutBastionShareableLinkAllFuture, err error) + SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string) (result network.VirtualWanSecurityProviders, err error) +} + +var _ BaseClientAPI = (*network.BaseClient)(nil) + +// ApplicationGatewaysClientAPI contains the set of methods on the ApplicationGatewaysClient type. +type ApplicationGatewaysClientAPI interface { + BackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (result network.ApplicationGatewaysBackendHealthFuture, err error) + BackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest network.ApplicationGatewayOnDemandProbe, expand string) (result network.ApplicationGatewaysBackendHealthOnDemandFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters network.ApplicationGateway) (result network.ApplicationGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewaysDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGateway, err error) + GetSslPredefinedPolicy(ctx context.Context, predefinedPolicyName string) (result network.ApplicationGatewaySslPredefinedPolicy, err error) + List(ctx context.Context, resourceGroupName string) (result network.ApplicationGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.ApplicationGatewayListResultIterator, err error) + ListAll(ctx context.Context) (result network.ApplicationGatewayListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.ApplicationGatewayListResultIterator, err error) + ListAvailableRequestHeaders(ctx context.Context) (result network.ListString, err error) + ListAvailableResponseHeaders(ctx context.Context) (result network.ListString, err error) + ListAvailableServerVariables(ctx context.Context) (result network.ListString, err error) + ListAvailableSslOptions(ctx context.Context) (result network.ApplicationGatewayAvailableSslOptions, err error) + ListAvailableSslPredefinedPolicies(ctx context.Context) (result network.ApplicationGatewayAvailableSslPredefinedPoliciesPage, err error) + ListAvailableSslPredefinedPoliciesComplete(ctx context.Context) (result network.ApplicationGatewayAvailableSslPredefinedPoliciesIterator, err error) + ListAvailableWafRuleSets(ctx context.Context) (result network.ApplicationGatewayAvailableWafRuleSetsResult, err error) + Start(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewaysStartFuture, err error) + Stop(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewaysStopFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters network.TagsObject) (result network.ApplicationGateway, err error) +} + +var _ ApplicationGatewaysClientAPI = (*network.ApplicationGatewaysClient)(nil) + +// ApplicationGatewayPrivateLinkResourcesClientAPI contains the set of methods on the ApplicationGatewayPrivateLinkResourcesClient type. +type ApplicationGatewayPrivateLinkResourcesClientAPI interface { + List(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewayPrivateLinkResourceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewayPrivateLinkResourceListResultIterator, err error) +} + +var _ ApplicationGatewayPrivateLinkResourcesClientAPI = (*network.ApplicationGatewayPrivateLinkResourcesClient)(nil) + +// ApplicationGatewayPrivateEndpointConnectionsClientAPI contains the set of methods on the ApplicationGatewayPrivateEndpointConnectionsClient type. +type ApplicationGatewayPrivateEndpointConnectionsClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string) (result network.ApplicationGatewayPrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string) (result network.ApplicationGatewayPrivateEndpointConnection, err error) + List(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewayPrivateEndpointConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result network.ApplicationGatewayPrivateEndpointConnectionListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters network.ApplicationGatewayPrivateEndpointConnection) (result network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture, err error) +} + +var _ ApplicationGatewayPrivateEndpointConnectionsClientAPI = (*network.ApplicationGatewayPrivateEndpointConnectionsClient)(nil) + +// ApplicationSecurityGroupsClientAPI contains the set of methods on the ApplicationSecurityGroupsClient type. +type ApplicationSecurityGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters network.ApplicationSecurityGroup) (result network.ApplicationSecurityGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result network.ApplicationSecurityGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result network.ApplicationSecurityGroup, err error) + List(ctx context.Context, resourceGroupName string) (result network.ApplicationSecurityGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.ApplicationSecurityGroupListResultIterator, err error) + ListAll(ctx context.Context) (result network.ApplicationSecurityGroupListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.ApplicationSecurityGroupListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters network.TagsObject) (result network.ApplicationSecurityGroup, err error) +} + +var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) + +// AvailableDelegationsClientAPI contains the set of methods on the AvailableDelegationsClient type. +type AvailableDelegationsClientAPI interface { + List(ctx context.Context, location string) (result network.AvailableDelegationsResultPage, err error) + ListComplete(ctx context.Context, location string) (result network.AvailableDelegationsResultIterator, err error) +} + +var _ AvailableDelegationsClientAPI = (*network.AvailableDelegationsClient)(nil) + +// AvailableResourceGroupDelegationsClientAPI contains the set of methods on the AvailableResourceGroupDelegationsClient type. +type AvailableResourceGroupDelegationsClientAPI interface { + List(ctx context.Context, location string, resourceGroupName string) (result network.AvailableDelegationsResultPage, err error) + ListComplete(ctx context.Context, location string, resourceGroupName string) (result network.AvailableDelegationsResultIterator, err error) +} + +var _ AvailableResourceGroupDelegationsClientAPI = (*network.AvailableResourceGroupDelegationsClient)(nil) + +// AvailableServiceAliasesClientAPI contains the set of methods on the AvailableServiceAliasesClient type. +type AvailableServiceAliasesClientAPI interface { + List(ctx context.Context, location string) (result network.AvailableServiceAliasesResultPage, err error) + ListComplete(ctx context.Context, location string) (result network.AvailableServiceAliasesResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string, location string) (result network.AvailableServiceAliasesResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, location string) (result network.AvailableServiceAliasesResultIterator, err error) +} + +var _ AvailableServiceAliasesClientAPI = (*network.AvailableServiceAliasesClient)(nil) + +// AzureFirewallsClientAPI contains the set of methods on the AzureFirewallsClient type. +type AzureFirewallsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters network.AzureFirewall) (result network.AzureFirewallsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, azureFirewallName string) (result network.AzureFirewallsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, azureFirewallName string) (result network.AzureFirewall, err error) + List(ctx context.Context, resourceGroupName string) (result network.AzureFirewallListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.AzureFirewallListResultIterator, err error) + ListAll(ctx context.Context) (result network.AzureFirewallListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.AzureFirewallListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters network.TagsObject) (result network.AzureFirewallsUpdateTagsFuture, err error) +} + +var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) + +// AzureFirewallFqdnTagsClientAPI contains the set of methods on the AzureFirewallFqdnTagsClient type. +type AzureFirewallFqdnTagsClientAPI interface { + ListAll(ctx context.Context) (result network.AzureFirewallFqdnTagListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.AzureFirewallFqdnTagListResultIterator, err error) +} + +var _ AzureFirewallFqdnTagsClientAPI = (*network.AzureFirewallFqdnTagsClient)(nil) + +// WebCategoriesClientAPI contains the set of methods on the WebCategoriesClient type. +type WebCategoriesClientAPI interface { + Get(ctx context.Context, name string, expand string) (result network.AzureWebCategory, err error) + ListBySubscription(ctx context.Context) (result network.AzureWebCategoryListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.AzureWebCategoryListResultIterator, err error) +} + +var _ WebCategoriesClientAPI = (*network.WebCategoriesClient)(nil) + +// BastionHostsClientAPI contains the set of methods on the BastionHostsClient type. +type BastionHostsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters network.BastionHost) (result network.BastionHostsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, bastionHostName string) (result network.BastionHostsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, bastionHostName string) (result network.BastionHost, err error) + List(ctx context.Context) (result network.BastionHostListResultPage, err error) + ListComplete(ctx context.Context) (result network.BastionHostListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.BastionHostListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.BastionHostListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters network.TagsObject) (result network.BastionHostsUpdateTagsFuture, err error) +} + +var _ BastionHostsClientAPI = (*network.BastionHostsClient)(nil) + +// InterfacesClientAPI contains the set of methods on the InterfacesClient type. +type InterfacesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters network.Interface) (result network.InterfacesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result network.Interface, err error) + GetCloudServiceNetworkInterface(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, expand string) (result network.Interface, err error) + GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, err error) + GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (result network.InterfaceIPConfiguration, err error) + GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result network.Interface, err error) + List(ctx context.Context, resourceGroupName string) (result network.InterfaceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.InterfaceListResultIterator, err error) + ListAll(ctx context.Context) (result network.InterfaceListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.InterfaceListResultIterator, err error) + ListCloudServiceNetworkInterfaces(ctx context.Context, resourceGroupName string, cloudServiceName string) (result network.InterfaceListResultPage, err error) + ListCloudServiceNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result network.InterfaceListResultIterator, err error) + ListCloudServiceRoleInstanceNetworkInterfaces(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string) (result network.InterfaceListResultPage, err error) + ListCloudServiceRoleInstanceNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string) (result network.InterfaceListResultIterator, err error) + ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) + ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result network.InterfaceIPConfigurationListResultPage, err error) + ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result network.InterfaceIPConfigurationListResultIterator, err error) + ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result network.InterfaceListResultPage, err error) + ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result network.InterfaceListResultIterator, err error) + ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result network.InterfaceListResultPage, err error) + ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result network.InterfaceListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters network.TagsObject) (result network.Interface, err error) +} + +var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) + +// PublicIPAddressesClientAPI contains the set of methods on the PublicIPAddressesClient type. +type PublicIPAddressesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters network.PublicIPAddress) (result network.PublicIPAddressesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result network.PublicIPAddressesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) + GetCloudServicePublicIPAddress(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) + GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) + List(ctx context.Context, resourceGroupName string) (result network.PublicIPAddressListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.PublicIPAddressListResultIterator, err error) + ListAll(ctx context.Context) (result network.PublicIPAddressListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.PublicIPAddressListResultIterator, err error) + ListCloudServicePublicIPAddresses(ctx context.Context, resourceGroupName string, cloudServiceName string) (result network.PublicIPAddressListResultPage, err error) + ListCloudServicePublicIPAddressesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result network.PublicIPAddressListResultIterator, err error) + ListCloudServiceRoleInstancePublicIPAddresses(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string) (result network.PublicIPAddressListResultPage, err error) + ListCloudServiceRoleInstancePublicIPAddressesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string) (result network.PublicIPAddressListResultIterator, err error) + ListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result network.PublicIPAddressListResultPage, err error) + ListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result network.PublicIPAddressListResultIterator, err error) + ListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result network.PublicIPAddressListResultPage, err error) + ListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result network.PublicIPAddressListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters network.TagsObject) (result network.PublicIPAddress, err error) +} + +var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) + +// CustomIPPrefixesClientAPI contains the set of methods on the CustomIPPrefixesClient type. +type CustomIPPrefixesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters network.CustomIPPrefix) (result network.CustomIPPrefixesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, customIPPrefixName string) (result network.CustomIPPrefixesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, customIPPrefixName string, expand string) (result network.CustomIPPrefix, err error) + List(ctx context.Context, resourceGroupName string) (result network.CustomIPPrefixListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.CustomIPPrefixListResultIterator, err error) + ListAll(ctx context.Context) (result network.CustomIPPrefixListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.CustomIPPrefixListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters network.TagsObject) (result network.CustomIPPrefix, err error) +} + +var _ CustomIPPrefixesClientAPI = (*network.CustomIPPrefixesClient)(nil) + +// DdosCustomPoliciesClientAPI contains the set of methods on the DdosCustomPoliciesClient type. +type DdosCustomPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters network.DdosCustomPolicy) (result network.DdosCustomPoliciesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result network.DdosCustomPoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result network.DdosCustomPolicy, err error) + UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters network.TagsObject) (result network.DdosCustomPolicy, err error) +} + +var _ DdosCustomPoliciesClientAPI = (*network.DdosCustomPoliciesClient)(nil) + +// DdosProtectionPlansClientAPI contains the set of methods on the DdosProtectionPlansClient type. +type DdosProtectionPlansClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters network.DdosProtectionPlan) (result network.DdosProtectionPlansCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result network.DdosProtectionPlansDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result network.DdosProtectionPlan, err error) + List(ctx context.Context) (result network.DdosProtectionPlanListResultPage, err error) + ListComplete(ctx context.Context) (result network.DdosProtectionPlanListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.DdosProtectionPlanListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.DdosProtectionPlanListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters network.TagsObject) (result network.DdosProtectionPlan, err error) +} + +var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) + +// DscpConfigurationClientAPI contains the set of methods on the DscpConfigurationClient type. +type DscpConfigurationClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters network.DscpConfiguration) (result network.DscpConfigurationCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, dscpConfigurationName string) (result network.DscpConfigurationDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, dscpConfigurationName string) (result network.DscpConfiguration, err error) + List(ctx context.Context, resourceGroupName string) (result network.DscpConfigurationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.DscpConfigurationListResultIterator, err error) + ListAll(ctx context.Context) (result network.DscpConfigurationListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.DscpConfigurationListResultIterator, err error) +} + +var _ DscpConfigurationClientAPI = (*network.DscpConfigurationClient)(nil) + +// AvailableEndpointServicesClientAPI contains the set of methods on the AvailableEndpointServicesClient type. +type AvailableEndpointServicesClientAPI interface { + List(ctx context.Context, location string) (result network.EndpointServicesListResultPage, err error) + ListComplete(ctx context.Context, location string) (result network.EndpointServicesListResultIterator, err error) +} + +var _ AvailableEndpointServicesClientAPI = (*network.AvailableEndpointServicesClient)(nil) + +// ExpressRouteCircuitAuthorizationsClientAPI contains the set of methods on the ExpressRouteCircuitAuthorizationsClient type. +type ExpressRouteCircuitAuthorizationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters network.ExpressRouteCircuitAuthorization) (result network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result network.ExpressRouteCircuitAuthorizationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result network.ExpressRouteCircuitAuthorization, err error) + List(ctx context.Context, resourceGroupName string, circuitName string) (result network.AuthorizationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.AuthorizationListResultIterator, err error) +} + +var _ ExpressRouteCircuitAuthorizationsClientAPI = (*network.ExpressRouteCircuitAuthorizationsClient)(nil) + +// ExpressRouteCircuitPeeringsClientAPI contains the set of methods on the ExpressRouteCircuitPeeringsClient type. +type ExpressRouteCircuitPeeringsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters network.ExpressRouteCircuitPeering) (result network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.ExpressRouteCircuitPeeringsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.ExpressRouteCircuitPeering, err error) + List(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitPeeringListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitPeeringListResultIterator, err error) +} + +var _ ExpressRouteCircuitPeeringsClientAPI = (*network.ExpressRouteCircuitPeeringsClient)(nil) + +// ExpressRouteCircuitConnectionsClientAPI contains the set of methods on the ExpressRouteCircuitConnectionsClient type. +type ExpressRouteCircuitConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters network.ExpressRouteCircuitConnection) (result network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result network.ExpressRouteCircuitConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result network.ExpressRouteCircuitConnection, err error) + List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.ExpressRouteCircuitConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.ExpressRouteCircuitConnectionListResultIterator, err error) +} + +var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitConnectionsClient)(nil) + +// PeerExpressRouteCircuitConnectionsClientAPI contains the set of methods on the PeerExpressRouteCircuitConnectionsClient type. +type PeerExpressRouteCircuitConnectionsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result network.PeerExpressRouteCircuitConnection, err error) + List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.PeerExpressRouteCircuitConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.PeerExpressRouteCircuitConnectionListResultIterator, err error) +} + +var _ PeerExpressRouteCircuitConnectionsClientAPI = (*network.PeerExpressRouteCircuitConnectionsClient)(nil) + +// ExpressRouteCircuitsClientAPI contains the set of methods on the ExpressRouteCircuitsClient type. +type ExpressRouteCircuitsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters network.ExpressRouteCircuit) (result network.ExpressRouteCircuitsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuit, err error) + GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result network.ExpressRouteCircuitStats, err error) + GetStats(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitStats, err error) + List(ctx context.Context, resourceGroupName string) (result network.ExpressRouteCircuitListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.ExpressRouteCircuitListResultIterator, err error) + ListAll(ctx context.Context) (result network.ExpressRouteCircuitListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.ExpressRouteCircuitListResultIterator, err error) + ListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result network.ExpressRouteCircuitsListArpTableFuture, err error) + ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result network.ExpressRouteCircuitsListRoutesTableFuture, err error) + ListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result network.ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters network.TagsObject) (result network.ExpressRouteCircuit, err error) +} + +var _ ExpressRouteCircuitsClientAPI = (*network.ExpressRouteCircuitsClient)(nil) + +// ExpressRouteServiceProvidersClientAPI contains the set of methods on the ExpressRouteServiceProvidersClient type. +type ExpressRouteServiceProvidersClientAPI interface { + List(ctx context.Context) (result network.ExpressRouteServiceProviderListResultPage, err error) + ListComplete(ctx context.Context) (result network.ExpressRouteServiceProviderListResultIterator, err error) +} + +var _ ExpressRouteServiceProvidersClientAPI = (*network.ExpressRouteServiceProvidersClient)(nil) + +// ExpressRouteCrossConnectionsClientAPI contains the set of methods on the ExpressRouteCrossConnectionsClient type. +type ExpressRouteCrossConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters network.ExpressRouteCrossConnection) (result network.ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, crossConnectionName string) (result network.ExpressRouteCrossConnection, err error) + List(ctx context.Context) (result network.ExpressRouteCrossConnectionListResultPage, err error) + ListComplete(ctx context.Context) (result network.ExpressRouteCrossConnectionListResultIterator, err error) + ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result network.ExpressRouteCrossConnectionsListArpTableFuture, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ExpressRouteCrossConnectionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ExpressRouteCrossConnectionListResultIterator, err error) + ListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result network.ExpressRouteCrossConnectionsListRoutesTableFuture, err error) + ListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters network.TagsObject) (result network.ExpressRouteCrossConnection, err error) +} + +var _ ExpressRouteCrossConnectionsClientAPI = (*network.ExpressRouteCrossConnectionsClient)(nil) + +// ExpressRouteCrossConnectionPeeringsClientAPI contains the set of methods on the ExpressRouteCrossConnectionPeeringsClient type. +type ExpressRouteCrossConnectionPeeringsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters network.ExpressRouteCrossConnectionPeering) (result network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result network.ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result network.ExpressRouteCrossConnectionPeering, err error) + List(ctx context.Context, resourceGroupName string, crossConnectionName string) (result network.ExpressRouteCrossConnectionPeeringListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, crossConnectionName string) (result network.ExpressRouteCrossConnectionPeeringListIterator, err error) +} + +var _ ExpressRouteCrossConnectionPeeringsClientAPI = (*network.ExpressRouteCrossConnectionPeeringsClient)(nil) + +// ExpressRoutePortsLocationsClientAPI contains the set of methods on the ExpressRoutePortsLocationsClient type. +type ExpressRoutePortsLocationsClientAPI interface { + Get(ctx context.Context, locationName string) (result network.ExpressRoutePortsLocation, err error) + List(ctx context.Context) (result network.ExpressRoutePortsLocationListResultPage, err error) + ListComplete(ctx context.Context) (result network.ExpressRoutePortsLocationListResultIterator, err error) +} + +var _ ExpressRoutePortsLocationsClientAPI = (*network.ExpressRoutePortsLocationsClient)(nil) + +// ExpressRoutePortsClientAPI contains the set of methods on the ExpressRoutePortsClient type. +type ExpressRoutePortsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters network.ExpressRoutePort) (result network.ExpressRoutePortsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, err error) + GenerateLOA(ctx context.Context, resourceGroupName string, expressRoutePortName string, request network.GenerateExpressRoutePortsLOARequest) (result network.GenerateExpressRoutePortsLOAResult, err error) + Get(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePort, err error) + List(ctx context.Context) (result network.ExpressRoutePortListResultPage, err error) + ListComplete(ctx context.Context) (result network.ExpressRoutePortListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ExpressRoutePortListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ExpressRoutePortListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters network.TagsObject) (result network.ExpressRoutePort, err error) +} + +var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) + +// ExpressRouteLinksClientAPI contains the set of methods on the ExpressRouteLinksClient type. +type ExpressRouteLinksClientAPI interface { + Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (result network.ExpressRouteLink, err error) + List(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRouteLinkListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRouteLinkListResultIterator, err error) +} + +var _ ExpressRouteLinksClientAPI = (*network.ExpressRouteLinksClient)(nil) + +// FirewallPoliciesClientAPI contains the set of methods on the FirewallPoliciesClient type. +type FirewallPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters network.FirewallPolicy) (result network.FirewallPoliciesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (result network.FirewallPolicy, err error) + List(ctx context.Context, resourceGroupName string) (result network.FirewallPolicyListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.FirewallPolicyListResultIterator, err error) + ListAll(ctx context.Context) (result network.FirewallPolicyListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.FirewallPolicyListResultIterator, err error) +} + +var _ FirewallPoliciesClientAPI = (*network.FirewallPoliciesClient)(nil) + +// FirewallPolicyRuleCollectionGroupsClientAPI contains the set of methods on the FirewallPolicyRuleCollectionGroupsClient type. +type FirewallPolicyRuleCollectionGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters network.FirewallPolicyRuleCollectionGroup) (result network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) (result network.FirewallPolicyRuleCollectionGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) (result network.FirewallPolicyRuleCollectionGroup, err error) + List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleCollectionGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleCollectionGroupListResultIterator, err error) +} + +var _ FirewallPolicyRuleCollectionGroupsClientAPI = (*network.FirewallPolicyRuleCollectionGroupsClient)(nil) + +// IPAllocationsClientAPI contains the set of methods on the IPAllocationsClient type. +type IPAllocationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, IPAllocationName string, parameters network.IPAllocation) (result network.IPAllocationsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, IPAllocationName string) (result network.IPAllocationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, IPAllocationName string, expand string) (result network.IPAllocation, err error) + List(ctx context.Context) (result network.IPAllocationListResultPage, err error) + ListComplete(ctx context.Context) (result network.IPAllocationListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.IPAllocationListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.IPAllocationListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, IPAllocationName string, parameters network.TagsObject) (result network.IPAllocation, err error) +} + +var _ IPAllocationsClientAPI = (*network.IPAllocationsClient)(nil) + +// IPGroupsClientAPI contains the set of methods on the IPGroupsClient type. +type IPGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters network.IPGroup) (result network.IPGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, IPGroupsName string) (result network.IPGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, IPGroupsName string, expand string) (result network.IPGroup, err error) + List(ctx context.Context) (result network.IPGroupListResultPage, err error) + ListComplete(ctx context.Context) (result network.IPGroupListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.IPGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.IPGroupListResultIterator, err error) + UpdateGroups(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters network.TagsObject) (result network.IPGroup, err error) +} + +var _ IPGroupsClientAPI = (*network.IPGroupsClient)(nil) + +// LoadBalancersClientAPI contains the set of methods on the LoadBalancersClient type. +type LoadBalancersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.LoadBalancer) (result network.LoadBalancersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result network.LoadBalancer, err error) + List(ctx context.Context, resourceGroupName string) (result network.LoadBalancerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.LoadBalancerListResultIterator, err error) + ListAll(ctx context.Context) (result network.LoadBalancerListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.LoadBalancerListResultIterator, err error) + SwapPublicIPAddresses(ctx context.Context, location string, parameters network.LoadBalancerVipSwapRequest) (result network.LoadBalancersSwapPublicIPAddressesFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancer, err error) +} + +var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) + +// LoadBalancerBackendAddressPoolsClientAPI contains the set of methods on the LoadBalancerBackendAddressPoolsClient type. +type LoadBalancerBackendAddressPoolsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters network.BackendAddressPool) (result network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result network.LoadBalancerBackendAddressPoolsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result network.BackendAddressPool, err error) + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerBackendAddressPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerBackendAddressPoolListResultIterator, err error) +} + +var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAddressPoolsClient)(nil) + +// LoadBalancerFrontendIPConfigurationsClientAPI contains the set of methods on the LoadBalancerFrontendIPConfigurationsClient type. +type LoadBalancerFrontendIPConfigurationsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (result network.FrontendIPConfiguration, err error) + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerFrontendIPConfigurationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerFrontendIPConfigurationListResultIterator, err error) +} + +var _ LoadBalancerFrontendIPConfigurationsClientAPI = (*network.LoadBalancerFrontendIPConfigurationsClient)(nil) + +// InboundNatRulesClientAPI contains the set of methods on the InboundNatRulesClient type. +type InboundNatRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters network.InboundNatRule) (result network.InboundNatRulesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (result network.InboundNatRulesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result network.InboundNatRule, err error) + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.InboundNatRuleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.InboundNatRuleListResultIterator, err error) +} + +var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) + +// LoadBalancerLoadBalancingRulesClientAPI contains the set of methods on the LoadBalancerLoadBalancingRulesClient type. +type LoadBalancerLoadBalancingRulesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (result network.LoadBalancingRule, err error) + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerLoadBalancingRuleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerLoadBalancingRuleListResultIterator, err error) +} + +var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalancingRulesClient)(nil) + +// LoadBalancerOutboundRulesClientAPI contains the set of methods on the LoadBalancerOutboundRulesClient type. +type LoadBalancerOutboundRulesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (result network.OutboundRule, err error) + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerOutboundRuleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerOutboundRuleListResultIterator, err error) +} + +var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesClient)(nil) + +// LoadBalancerNetworkInterfacesClientAPI contains the set of methods on the LoadBalancerNetworkInterfacesClient type. +type LoadBalancerNetworkInterfacesClientAPI interface { + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.InterfaceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.InterfaceListResultIterator, err error) +} + +var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInterfacesClient)(nil) + +// LoadBalancerProbesClientAPI contains the set of methods on the LoadBalancerProbesClient type. +type LoadBalancerProbesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (result network.Probe, err error) + List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerProbeListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancerProbeListResultIterator, err error) +} + +var _ LoadBalancerProbesClientAPI = (*network.LoadBalancerProbesClient)(nil) + +// NatGatewaysClientAPI contains the set of methods on the NatGatewaysClient type. +type NatGatewaysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters network.NatGateway) (result network.NatGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, natGatewayName string) (result network.NatGatewaysDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (result network.NatGateway, err error) + List(ctx context.Context, resourceGroupName string) (result network.NatGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.NatGatewayListResultIterator, err error) + ListAll(ctx context.Context) (result network.NatGatewayListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.NatGatewayListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters network.TagsObject) (result network.NatGateway, err error) +} + +var _ NatGatewaysClientAPI = (*network.NatGatewaysClient)(nil) + +// InterfaceIPConfigurationsClientAPI contains the set of methods on the InterfaceIPConfigurationsClient type. +type InterfaceIPConfigurationsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (result network.InterfaceIPConfiguration, err error) + List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfaceIPConfigurationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfaceIPConfigurationListResultIterator, err error) +} + +var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsClient)(nil) + +// InterfaceLoadBalancersClientAPI contains the set of methods on the InterfaceLoadBalancersClient type. +type InterfaceLoadBalancersClientAPI interface { + List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfaceLoadBalancerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfaceLoadBalancerListResultIterator, err error) +} + +var _ InterfaceLoadBalancersClientAPI = (*network.InterfaceLoadBalancersClient)(nil) + +// InterfaceTapConfigurationsClientAPI contains the set of methods on the InterfaceTapConfigurationsClient type. +type InterfaceTapConfigurationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters network.InterfaceTapConfiguration) (result network.InterfaceTapConfigurationsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result network.InterfaceTapConfigurationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result network.InterfaceTapConfiguration, err error) + List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfaceTapConfigurationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfaceTapConfigurationListResultIterator, err error) +} + +var _ InterfaceTapConfigurationsClientAPI = (*network.InterfaceTapConfigurationsClient)(nil) + +// ProfilesClientAPI contains the set of methods on the ProfilesClient type. +type ProfilesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters network.Profile) (result network.Profile, err error) + Delete(ctx context.Context, resourceGroupName string, networkProfileName string) (result network.ProfilesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (result network.Profile, err error) + List(ctx context.Context, resourceGroupName string) (result network.ProfileListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.ProfileListResultIterator, err error) + ListAll(ctx context.Context) (result network.ProfileListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.ProfileListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters network.TagsObject) (result network.Profile, err error) +} + +var _ ProfilesClientAPI = (*network.ProfilesClient)(nil) + +// SecurityGroupsClientAPI contains the set of methods on the SecurityGroupsClient type. +type SecurityGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters network.SecurityGroup) (result network.SecurityGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result network.SecurityGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result network.SecurityGroup, err error) + List(ctx context.Context, resourceGroupName string) (result network.SecurityGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.SecurityGroupListResultIterator, err error) + ListAll(ctx context.Context) (result network.SecurityGroupListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.SecurityGroupListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters network.TagsObject) (result network.SecurityGroup, err error) +} + +var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) + +// SecurityRulesClientAPI contains the set of methods on the SecurityRulesClient type. +type SecurityRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters network.SecurityRule) (result network.SecurityRulesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result network.SecurityRulesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result network.SecurityRule, err error) + List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result network.SecurityRuleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result network.SecurityRuleListResultIterator, err error) +} + +var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) + +// DefaultSecurityRulesClientAPI contains the set of methods on the DefaultSecurityRulesClient type. +type DefaultSecurityRulesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (result network.SecurityRule, err error) + List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result network.SecurityRuleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result network.SecurityRuleListResultIterator, err error) +} + +var _ DefaultSecurityRulesClientAPI = (*network.DefaultSecurityRulesClient)(nil) + +// VirtualAppliancesClientAPI contains the set of methods on the VirtualAppliancesClient type. +type VirtualAppliancesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters network.VirtualAppliance) (result network.VirtualAppliancesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (result network.VirtualAppliancesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, expand string) (result network.VirtualAppliance, err error) + List(ctx context.Context) (result network.VirtualApplianceListResultPage, err error) + ListComplete(ctx context.Context) (result network.VirtualApplianceListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.VirtualApplianceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.VirtualApplianceListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters network.TagsObject) (result network.VirtualAppliance, err error) +} + +var _ VirtualAppliancesClientAPI = (*network.VirtualAppliancesClient)(nil) + +// VirtualApplianceSitesClientAPI contains the set of methods on the VirtualApplianceSitesClient type. +type VirtualApplianceSitesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters network.VirtualApplianceSite) (result network.VirtualApplianceSitesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string) (result network.VirtualApplianceSitesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string) (result network.VirtualApplianceSite, err error) + List(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (result network.VirtualApplianceSiteListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (result network.VirtualApplianceSiteListResultIterator, err error) +} + +var _ VirtualApplianceSitesClientAPI = (*network.VirtualApplianceSitesClient)(nil) + +// VirtualApplianceSkusClientAPI contains the set of methods on the VirtualApplianceSkusClient type. +type VirtualApplianceSkusClientAPI interface { + Get(ctx context.Context, skuName string) (result network.VirtualApplianceSku, err error) + List(ctx context.Context) (result network.VirtualApplianceSkuListResultPage, err error) + ListComplete(ctx context.Context) (result network.VirtualApplianceSkuListResultIterator, err error) +} + +var _ VirtualApplianceSkusClientAPI = (*network.VirtualApplianceSkusClient)(nil) + +// InboundSecurityRuleClientAPI contains the set of methods on the InboundSecurityRuleClient type. +type InboundSecurityRuleClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters network.InboundSecurityRule) (result network.InboundSecurityRuleCreateOrUpdateFuture, err error) +} + +var _ InboundSecurityRuleClientAPI = (*network.InboundSecurityRuleClient)(nil) + +// WatchersClientAPI contains the set of methods on the WatchersClient type. +type WatchersClientAPI interface { + CheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.ConnectivityParameters) (result network.WatchersCheckConnectivityFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.Watcher) (result network.Watcher, err error) + Delete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result network.WatchersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkWatcherName string) (result network.Watcher, err error) + GetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.AzureReachabilityReportParameters) (result network.WatchersGetAzureReachabilityReportFuture, err error) + GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.FlowLogStatusParameters) (result network.WatchersGetFlowLogStatusFuture, err error) + GetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.ConfigurationDiagnosticParameters) (result network.WatchersGetNetworkConfigurationDiagnosticFuture, err error) + GetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.NextHopParameters) (result network.WatchersGetNextHopFuture, err error) + GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.TopologyParameters) (result network.Topology, err error) + GetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.TroubleshootingParameters) (result network.WatchersGetTroubleshootingFuture, err error) + GetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.QueryTroubleshootingParameters) (result network.WatchersGetTroubleshootingResultFuture, err error) + GetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.SecurityGroupViewParameters) (result network.WatchersGetVMSecurityRulesFuture, err error) + List(ctx context.Context, resourceGroupName string) (result network.WatcherListResult, err error) + ListAll(ctx context.Context) (result network.WatcherListResult, err error) + ListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.AvailableProvidersListParameters) (result network.WatchersListAvailableProvidersFuture, err error) + SetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.FlowLogInformation) (result network.WatchersSetFlowLogConfigurationFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.TagsObject) (result network.Watcher, err error) + VerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters network.VerificationIPFlowParameters) (result network.WatchersVerifyIPFlowFuture, err error) +} + +var _ WatchersClientAPI = (*network.WatchersClient)(nil) + +// PacketCapturesClientAPI contains the set of methods on the PacketCapturesClient type. +type PacketCapturesClientAPI interface { + Create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters network.PacketCapture) (result network.PacketCapturesCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result network.PacketCapturesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result network.PacketCaptureResult, err error) + GetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result network.PacketCapturesGetStatusFuture, err error) + List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result network.PacketCaptureListResult, err error) + Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result network.PacketCapturesStopFuture, err error) +} + +var _ PacketCapturesClientAPI = (*network.PacketCapturesClient)(nil) + +// ConnectionMonitorsClientAPI contains the set of methods on the ConnectionMonitorsClient type. +type ConnectionMonitorsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters network.ConnectionMonitor, migrate string) (result network.ConnectionMonitorsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result network.ConnectionMonitorsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result network.ConnectionMonitorResult, err error) + List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result network.ConnectionMonitorListResult, err error) + Query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result network.ConnectionMonitorsQueryFuture, err error) + Start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result network.ConnectionMonitorsStartFuture, err error) + Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result network.ConnectionMonitorsStopFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters network.TagsObject) (result network.ConnectionMonitorResult, err error) +} + +var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(nil) + +// FlowLogsClientAPI contains the set of methods on the FlowLogsClient type. +type FlowLogsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters network.FlowLog) (result network.FlowLogsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) (result network.FlowLogsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) (result network.FlowLog, err error) + List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result network.FlowLogListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result network.FlowLogListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters network.TagsObject) (result network.FlowLog, err error) +} + +var _ FlowLogsClientAPI = (*network.FlowLogsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result network.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result network.OperationListResultIterator, err error) +} + +var _ OperationsClientAPI = (*network.OperationsClient)(nil) + +// PrivateEndpointsClientAPI contains the set of methods on the PrivateEndpointsClient type. +type PrivateEndpointsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters network.PrivateEndpoint) (result network.PrivateEndpointsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, privateEndpointName string) (result network.PrivateEndpointsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (result network.PrivateEndpoint, err error) + List(ctx context.Context, resourceGroupName string) (result network.PrivateEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.PrivateEndpointListResultIterator, err error) + ListBySubscription(ctx context.Context) (result network.PrivateEndpointListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.PrivateEndpointListResultIterator, err error) +} + +var _ PrivateEndpointsClientAPI = (*network.PrivateEndpointsClient)(nil) + +// AvailablePrivateEndpointTypesClientAPI contains the set of methods on the AvailablePrivateEndpointTypesClient type. +type AvailablePrivateEndpointTypesClientAPI interface { + List(ctx context.Context, location string) (result network.AvailablePrivateEndpointTypesResultPage, err error) + ListComplete(ctx context.Context, location string) (result network.AvailablePrivateEndpointTypesResultIterator, err error) + ListByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result network.AvailablePrivateEndpointTypesResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result network.AvailablePrivateEndpointTypesResultIterator, err error) +} + +var _ AvailablePrivateEndpointTypesClientAPI = (*network.AvailablePrivateEndpointTypesClient)(nil) + +// PrivateDNSZoneGroupsClientAPI contains the set of methods on the PrivateDNSZoneGroupsClient type. +type PrivateDNSZoneGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters network.PrivateDNSZoneGroup) (result network.PrivateDNSZoneGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string) (result network.PrivateDNSZoneGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string) (result network.PrivateDNSZoneGroup, err error) + List(ctx context.Context, privateEndpointName string, resourceGroupName string) (result network.PrivateDNSZoneGroupListResultPage, err error) + ListComplete(ctx context.Context, privateEndpointName string, resourceGroupName string) (result network.PrivateDNSZoneGroupListResultIterator, err error) +} + +var _ PrivateDNSZoneGroupsClientAPI = (*network.PrivateDNSZoneGroupsClient)(nil) + +// PrivateLinkServicesClientAPI contains the set of methods on the PrivateLinkServicesClient type. +type PrivateLinkServicesClientAPI interface { + CheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters network.CheckPrivateLinkServiceVisibilityRequest) (result network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) + CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters network.CheckPrivateLinkServiceVisibilityRequest) (result network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters network.PrivateLinkService) (result network.PrivateLinkServicesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serviceName string) (result network.PrivateLinkServicesDeleteFuture, err error) + DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (result network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) + Get(ctx context.Context, resourceGroupName string, serviceName string, expand string) (result network.PrivateLinkService, err error) + GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, expand string) (result network.PrivateEndpointConnection, err error) + List(ctx context.Context, resourceGroupName string) (result network.PrivateLinkServiceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.PrivateLinkServiceListResultIterator, err error) + ListAutoApprovedPrivateLinkServices(ctx context.Context, location string) (result network.AutoApprovedPrivateLinkServicesResultPage, err error) + ListAutoApprovedPrivateLinkServicesComplete(ctx context.Context, location string) (result network.AutoApprovedPrivateLinkServicesResultIterator, err error) + ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result network.AutoApprovedPrivateLinkServicesResultPage, err error) + ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result network.AutoApprovedPrivateLinkServicesResultIterator, err error) + ListBySubscription(ctx context.Context) (result network.PrivateLinkServiceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.PrivateLinkServiceListResultIterator, err error) + ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, serviceName string) (result network.PrivateEndpointConnectionListResultPage, err error) + ListPrivateEndpointConnectionsComplete(ctx context.Context, resourceGroupName string, serviceName string) (result network.PrivateEndpointConnectionListResultIterator, err error) + UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters network.PrivateEndpointConnection) (result network.PrivateEndpointConnection, err error) +} + +var _ PrivateLinkServicesClientAPI = (*network.PrivateLinkServicesClient)(nil) + +// PublicIPPrefixesClientAPI contains the set of methods on the PublicIPPrefixesClient type. +type PublicIPPrefixesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters network.PublicIPPrefix) (result network.PublicIPPrefixesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (result network.PublicIPPrefixesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result network.PublicIPPrefix, err error) + List(ctx context.Context, resourceGroupName string) (result network.PublicIPPrefixListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.PublicIPPrefixListResultIterator, err error) + ListAll(ctx context.Context) (result network.PublicIPPrefixListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.PublicIPPrefixListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters network.TagsObject) (result network.PublicIPPrefix, err error) +} + +var _ PublicIPPrefixesClientAPI = (*network.PublicIPPrefixesClient)(nil) + +// RouteFiltersClientAPI contains the set of methods on the RouteFiltersClient type. +type RouteFiltersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.RouteFilter) (result network.RouteFiltersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, routeFilterName string) (result network.RouteFiltersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (result network.RouteFilter, err error) + List(ctx context.Context) (result network.RouteFilterListResultPage, err error) + ListComplete(ctx context.Context) (result network.RouteFilterListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.RouteFilterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.RouteFilterListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, routeFilterName string, parameters network.TagsObject) (result network.RouteFilter, err error) +} + +var _ RouteFiltersClientAPI = (*network.RouteFiltersClient)(nil) + +// RouteFilterRulesClientAPI contains the set of methods on the RouteFilterRulesClient type. +type RouteFilterRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.RouteFilterRule) (result network.RouteFilterRulesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result network.RouteFilterRulesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result network.RouteFilterRule, err error) + ListByRouteFilter(ctx context.Context, resourceGroupName string, routeFilterName string) (result network.RouteFilterRuleListResultPage, err error) + ListByRouteFilterComplete(ctx context.Context, resourceGroupName string, routeFilterName string) (result network.RouteFilterRuleListResultIterator, err error) +} + +var _ RouteFilterRulesClientAPI = (*network.RouteFilterRulesClient)(nil) + +// RouteTablesClientAPI contains the set of methods on the RouteTablesClient type. +type RouteTablesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters network.RouteTable) (result network.RouteTablesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result network.RouteTablesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (result network.RouteTable, err error) + List(ctx context.Context, resourceGroupName string) (result network.RouteTableListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.RouteTableListResultIterator, err error) + ListAll(ctx context.Context) (result network.RouteTableListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.RouteTableListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters network.TagsObject) (result network.RouteTable, err error) +} + +var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) + +// RoutesClientAPI contains the set of methods on the RoutesClient type. +type RoutesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters network.Route) (result network.RoutesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result network.RoutesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result network.Route, err error) + List(ctx context.Context, resourceGroupName string, routeTableName string) (result network.RouteListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, routeTableName string) (result network.RouteListResultIterator, err error) +} + +var _ RoutesClientAPI = (*network.RoutesClient)(nil) + +// SecurityPartnerProvidersClientAPI contains the set of methods on the SecurityPartnerProvidersClient type. +type SecurityPartnerProvidersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters network.SecurityPartnerProvider) (result network.SecurityPartnerProvidersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string) (result network.SecurityPartnerProvidersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, securityPartnerProviderName string) (result network.SecurityPartnerProvider, err error) + List(ctx context.Context) (result network.SecurityPartnerProviderListResultPage, err error) + ListComplete(ctx context.Context) (result network.SecurityPartnerProviderListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.SecurityPartnerProviderListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.SecurityPartnerProviderListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters network.TagsObject) (result network.SecurityPartnerProvider, err error) +} + +var _ SecurityPartnerProvidersClientAPI = (*network.SecurityPartnerProvidersClient)(nil) + +// BgpServiceCommunitiesClientAPI contains the set of methods on the BgpServiceCommunitiesClient type. +type BgpServiceCommunitiesClientAPI interface { + List(ctx context.Context) (result network.BgpServiceCommunityListResultPage, err error) + ListComplete(ctx context.Context) (result network.BgpServiceCommunityListResultIterator, err error) +} + +var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(nil) + +// ServiceEndpointPoliciesClientAPI contains the set of methods on the ServiceEndpointPoliciesClient type. +type ServiceEndpointPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.ServiceEndpointPolicy) (result network.ServiceEndpointPoliciesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result network.ServiceEndpointPoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (result network.ServiceEndpointPolicy, err error) + List(ctx context.Context) (result network.ServiceEndpointPolicyListResultPage, err error) + ListComplete(ctx context.Context) (result network.ServiceEndpointPolicyListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ServiceEndpointPolicyListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ServiceEndpointPolicyListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPolicy, err error) +} + +var _ ServiceEndpointPoliciesClientAPI = (*network.ServiceEndpointPoliciesClient)(nil) + +// ServiceEndpointPolicyDefinitionsClientAPI contains the set of methods on the ServiceEndpointPolicyDefinitionsClient type. +type ServiceEndpointPolicyDefinitionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions network.ServiceEndpointPolicyDefinition) (result network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result network.ServiceEndpointPolicyDefinitionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result network.ServiceEndpointPolicyDefinition, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result network.ServiceEndpointPolicyDefinitionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result network.ServiceEndpointPolicyDefinitionListResultIterator, err error) +} + +var _ ServiceEndpointPolicyDefinitionsClientAPI = (*network.ServiceEndpointPolicyDefinitionsClient)(nil) + +// ServiceTagsClientAPI contains the set of methods on the ServiceTagsClient type. +type ServiceTagsClientAPI interface { + List(ctx context.Context, location string) (result network.ServiceTagsListResult, err error) +} + +var _ ServiceTagsClientAPI = (*network.ServiceTagsClient)(nil) + +// ServiceTagInformationClientAPI contains the set of methods on the ServiceTagInformationClient type. +type ServiceTagInformationClientAPI interface { + List(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (result network.ServiceTagInformationListResultPage, err error) + ListComplete(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (result network.ServiceTagInformationListResultIterator, err error) +} + +var _ ServiceTagInformationClientAPI = (*network.ServiceTagInformationClient)(nil) + +// UsagesClientAPI contains the set of methods on the UsagesClient type. +type UsagesClientAPI interface { + List(ctx context.Context, location string) (result network.UsagesListResultPage, err error) + ListComplete(ctx context.Context, location string) (result network.UsagesListResultIterator, err error) +} + +var _ UsagesClientAPI = (*network.UsagesClient)(nil) + +// VirtualNetworksClientAPI contains the set of methods on the VirtualNetworksClient type. +type VirtualNetworksClientAPI interface { + CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress string) (result network.IPAddressAvailabilityResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters network.VirtualNetwork) (result network.VirtualNetworksCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.VirtualNetworksDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (result network.VirtualNetwork, err error) + List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkListResultIterator, err error) + ListAll(ctx context.Context) (result network.VirtualNetworkListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.VirtualNetworkListResultIterator, err error) + ListUsage(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.VirtualNetworkListUsageResultPage, err error) + ListUsageComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.VirtualNetworkListUsageResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters network.TagsObject) (result network.VirtualNetwork, err error) +} + +var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) + +// SubnetsClientAPI contains the set of methods on the SubnetsClient type. +type SubnetsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters network.Subnet) (result network.SubnetsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result network.SubnetsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result network.Subnet, err error) + List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.SubnetListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.SubnetListResultIterator, err error) + PrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters network.PrepareNetworkPoliciesRequest) (result network.SubnetsPrepareNetworkPoliciesFuture, err error) + UnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters network.UnprepareNetworkPoliciesRequest) (result network.SubnetsUnprepareNetworkPoliciesFuture, err error) +} + +var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) + +// ResourceNavigationLinksClientAPI contains the set of methods on the ResourceNavigationLinksClient type. +type ResourceNavigationLinksClientAPI interface { + List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result network.ResourceNavigationLinksListResult, err error) +} + +var _ ResourceNavigationLinksClientAPI = (*network.ResourceNavigationLinksClient)(nil) + +// ServiceAssociationLinksClientAPI contains the set of methods on the ServiceAssociationLinksClient type. +type ServiceAssociationLinksClientAPI interface { + List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result network.ServiceAssociationLinksListResult, err error) +} + +var _ ServiceAssociationLinksClientAPI = (*network.ServiceAssociationLinksClient)(nil) + +// VirtualNetworkPeeringsClientAPI contains the set of methods on the VirtualNetworkPeeringsClient type. +type VirtualNetworkPeeringsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters network.VirtualNetworkPeering, syncRemoteAddressSpace network.SyncRemoteAddressSpace) (result network.VirtualNetworkPeeringsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result network.VirtualNetworkPeeringsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result network.VirtualNetworkPeering, err error) + List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.VirtualNetworkPeeringListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.VirtualNetworkPeeringListResultIterator, err error) +} + +var _ VirtualNetworkPeeringsClientAPI = (*network.VirtualNetworkPeeringsClient)(nil) + +// VirtualNetworkGatewaysClientAPI contains the set of methods on the VirtualNetworkGatewaysClient type. +type VirtualNetworkGatewaysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VirtualNetworkGateway) (result network.VirtualNetworkGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysDeleteFuture, err error) + DisconnectVirtualNetworkGatewayVpnConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request network.P2SVpnConnectionRequest) (result network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture, err error) + Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VpnClientParameters) (result network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) + GenerateVpnProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VpnClientParameters) (result network.VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGateway, err error) + GetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) + GetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result network.VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) + GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) + GetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) + GetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) + GetVpnProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) + List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) + ListConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewayListConnectionsResultPage, err error) + ListConnectionsComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewayListConnectionsResultIterator, err error) + Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result network.VirtualNetworkGatewaysResetFuture, err error) + ResetVpnClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) + SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams network.VpnClientIPsecParameters) (result network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) + StartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters *network.VpnPacketCaptureStartParameters) (result network.VirtualNetworkGatewaysStartPacketCaptureFuture, err error) + StopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VpnPacketCaptureStopParameters) (result network.VirtualNetworkGatewaysStopPacketCaptureFuture, err error) + SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.String, err error) + UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.TagsObject) (result network.VirtualNetworkGatewaysUpdateTagsFuture, err error) + VpnDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.VpnDeviceScriptParameters) (result network.String, err error) +} + +var _ VirtualNetworkGatewaysClientAPI = (*network.VirtualNetworkGatewaysClient)(nil) + +// VirtualNetworkGatewayConnectionsClientAPI contains the set of methods on the VirtualNetworkGatewayConnectionsClient type. +type VirtualNetworkGatewayConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.VirtualNetworkGatewayConnection) (result network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, err error) + GetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnectionsGetIkeSasFuture, err error) + GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.ConnectionSharedKey, err error) + List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultIterator, err error) + ResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnectionsResetConnectionFuture, err error) + ResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.ConnectionResetSharedKey) (result network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) + SetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.ConnectionSharedKey) (result network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) + StartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters *network.VpnPacketCaptureStartParameters) (result network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture, err error) + StopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.VpnPacketCaptureStopParameters) (result network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) +} + +var _ VirtualNetworkGatewayConnectionsClientAPI = (*network.VirtualNetworkGatewayConnectionsClient)(nil) + +// LocalNetworkGatewaysClientAPI contains the set of methods on the LocalNetworkGatewaysClient type. +type LocalNetworkGatewaysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters network.LocalNetworkGateway) (result network.LocalNetworkGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result network.LocalNetworkGatewaysDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result network.LocalNetworkGateway, err error) + List(ctx context.Context, resourceGroupName string) (result network.LocalNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.LocalNetworkGatewayListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters network.TagsObject) (result network.LocalNetworkGateway, err error) +} + +var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) + +// VirtualNetworkGatewayNatRulesClientAPI contains the set of methods on the VirtualNetworkGatewayNatRulesClient type. +type VirtualNetworkGatewayNatRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters network.VirtualNetworkGatewayNatRule) (result network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (result network.VirtualNetworkGatewayNatRulesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (result network.VirtualNetworkGatewayNatRule, err error) + ListByVirtualNetworkGateway(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.ListVirtualNetworkGatewayNatRulesResultPage, err error) + ListByVirtualNetworkGatewayComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.ListVirtualNetworkGatewayNatRulesResultIterator, err error) +} + +var _ VirtualNetworkGatewayNatRulesClientAPI = (*network.VirtualNetworkGatewayNatRulesClient)(nil) + +// VirtualNetworkTapsClientAPI contains the set of methods on the VirtualNetworkTapsClient type. +type VirtualNetworkTapsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters network.VirtualNetworkTap) (result network.VirtualNetworkTapsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, tapName string) (result network.VirtualNetworkTapsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, tapName string) (result network.VirtualNetworkTap, err error) + ListAll(ctx context.Context) (result network.VirtualNetworkTapListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.VirtualNetworkTapListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkTapListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkTapListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters network.TagsObject) (result network.VirtualNetworkTap, err error) +} + +var _ VirtualNetworkTapsClientAPI = (*network.VirtualNetworkTapsClient)(nil) + +// VirtualRoutersClientAPI contains the set of methods on the VirtualRoutersClient type. +type VirtualRoutersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters network.VirtualRouter) (result network.VirtualRoutersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualRouterName string) (result network.VirtualRoutersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualRouterName string, expand string) (result network.VirtualRouter, err error) + List(ctx context.Context) (result network.VirtualRouterListResultPage, err error) + ListComplete(ctx context.Context) (result network.VirtualRouterListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.VirtualRouterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.VirtualRouterListResultIterator, err error) +} + +var _ VirtualRoutersClientAPI = (*network.VirtualRoutersClient)(nil) + +// VirtualRouterPeeringsClientAPI contains the set of methods on the VirtualRouterPeeringsClient type. +type VirtualRouterPeeringsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters network.VirtualRouterPeering) (result network.VirtualRouterPeeringsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string) (result network.VirtualRouterPeeringsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string) (result network.VirtualRouterPeering, err error) + List(ctx context.Context, resourceGroupName string, virtualRouterName string) (result network.VirtualRouterPeeringListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualRouterName string) (result network.VirtualRouterPeeringListResultIterator, err error) +} + +var _ VirtualRouterPeeringsClientAPI = (*network.VirtualRouterPeeringsClient)(nil) + +// VirtualWansClientAPI contains the set of methods on the VirtualWansClient type. +type VirtualWansClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters network.VirtualWAN) (result network.VirtualWansCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result network.VirtualWansDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result network.VirtualWAN, err error) + List(ctx context.Context) (result network.ListVirtualWANsResultPage, err error) + ListComplete(ctx context.Context) (result network.ListVirtualWANsResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ListVirtualWANsResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ListVirtualWANsResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters network.TagsObject) (result network.VirtualWAN, err error) +} + +var _ VirtualWansClientAPI = (*network.VirtualWansClient)(nil) + +// VpnSitesClientAPI contains the set of methods on the VpnSitesClient type. +type VpnSitesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters network.VpnSite) (result network.VpnSitesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result network.VpnSitesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, vpnSiteName string) (result network.VpnSite, err error) + List(ctx context.Context) (result network.ListVpnSitesResultPage, err error) + ListComplete(ctx context.Context) (result network.ListVpnSitesResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ListVpnSitesResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ListVpnSitesResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters network.TagsObject) (result network.VpnSite, err error) +} + +var _ VpnSitesClientAPI = (*network.VpnSitesClient)(nil) + +// VpnSiteLinksClientAPI contains the set of methods on the VpnSiteLinksClient type. +type VpnSiteLinksClientAPI interface { + Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (result network.VpnSiteLink, err error) + ListByVpnSite(ctx context.Context, resourceGroupName string, vpnSiteName string) (result network.ListVpnSiteLinksResultPage, err error) + ListByVpnSiteComplete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result network.ListVpnSiteLinksResultIterator, err error) +} + +var _ VpnSiteLinksClientAPI = (*network.VpnSiteLinksClient)(nil) + +// VpnSitesConfigurationClientAPI contains the set of methods on the VpnSitesConfigurationClient type. +type VpnSitesConfigurationClientAPI interface { + Download(ctx context.Context, resourceGroupName string, virtualWANName string, request network.GetVpnSitesConfigurationRequest) (result network.VpnSitesConfigurationDownloadFuture, err error) +} + +var _ VpnSitesConfigurationClientAPI = (*network.VpnSitesConfigurationClient)(nil) + +// VpnServerConfigurationsClientAPI contains the set of methods on the VpnServerConfigurationsClient type. +type VpnServerConfigurationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters network.VpnServerConfiguration) (result network.VpnServerConfigurationsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result network.VpnServerConfigurationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result network.VpnServerConfiguration, err error) + List(ctx context.Context) (result network.ListVpnServerConfigurationsResultPage, err error) + ListComplete(ctx context.Context) (result network.ListVpnServerConfigurationsResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ListVpnServerConfigurationsResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ListVpnServerConfigurationsResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters network.TagsObject) (result network.VpnServerConfiguration, err error) +} + +var _ VpnServerConfigurationsClientAPI = (*network.VpnServerConfigurationsClient)(nil) + +// VirtualHubsClientAPI contains the set of methods on the VirtualHubsClient type. +type VirtualHubsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters network.VirtualHub) (result network.VirtualHubsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.VirtualHubsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.VirtualHub, err error) + GetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, effectiveRoutesParameters *network.EffectiveRoutesParameters) (result network.VirtualHubsGetEffectiveVirtualHubRoutesFuture, err error) + List(ctx context.Context) (result network.ListVirtualHubsResultPage, err error) + ListComplete(ctx context.Context) (result network.ListVirtualHubsResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ListVirtualHubsResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ListVirtualHubsResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters network.TagsObject) (result network.VirtualHub, err error) +} + +var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) + +// HubVirtualNetworkConnectionsClientAPI contains the set of methods on the HubVirtualNetworkConnectionsClient type. +type HubVirtualNetworkConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters network.HubVirtualNetworkConnection) (result network.HubVirtualNetworkConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result network.HubVirtualNetworkConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result network.HubVirtualNetworkConnection, err error) + List(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListHubVirtualNetworkConnectionsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListHubVirtualNetworkConnectionsResultIterator, err error) +} + +var _ HubVirtualNetworkConnectionsClientAPI = (*network.HubVirtualNetworkConnectionsClient)(nil) + +// VpnGatewaysClientAPI contains the set of methods on the VpnGatewaysClient type. +type VpnGatewaysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.VpnGateway) (result network.VpnGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result network.VpnGatewaysDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, gatewayName string) (result network.VpnGateway, err error) + List(ctx context.Context) (result network.ListVpnGatewaysResultPage, err error) + ListComplete(ctx context.Context) (result network.ListVpnGatewaysResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ListVpnGatewaysResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ListVpnGatewaysResultIterator, err error) + Reset(ctx context.Context, resourceGroupName string, gatewayName string) (result network.VpnGatewaysResetFuture, err error) + StartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, parameters *network.VpnGatewayPacketCaptureStartParameters) (result network.VpnGatewaysStartPacketCaptureFuture, err error) + StopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, parameters *network.VpnGatewayPacketCaptureStopParameters) (result network.VpnGatewaysStopPacketCaptureFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) +} + +var _ VpnGatewaysClientAPI = (*network.VpnGatewaysClient)(nil) + +// VpnLinkConnectionsClientAPI contains the set of methods on the VpnLinkConnectionsClient type. +type VpnLinkConnectionsClientAPI interface { + GetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result network.VpnLinkConnectionsGetIkeSasFuture, err error) + ListByVpnConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result network.ListVpnSiteLinkConnectionsResultPage, err error) + ListByVpnConnectionComplete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result network.ListVpnSiteLinkConnectionsResultIterator, err error) + ResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result network.VpnLinkConnectionsResetConnectionFuture, err error) +} + +var _ VpnLinkConnectionsClientAPI = (*network.VpnLinkConnectionsClient)(nil) + +// VpnConnectionsClientAPI contains the set of methods on the VpnConnectionsClient type. +type VpnConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters network.VpnConnection) (result network.VpnConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result network.VpnConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result network.VpnConnection, err error) + ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result network.ListVpnConnectionsResultPage, err error) + ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result network.ListVpnConnectionsResultIterator, err error) + StartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, parameters *network.VpnConnectionPacketCaptureStartParameters) (result network.VpnConnectionsStartPacketCaptureFuture, err error) + StopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, parameters *network.VpnConnectionPacketCaptureStopParameters) (result network.VpnConnectionsStopPacketCaptureFuture, err error) +} + +var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) + +// VpnSiteLinkConnectionsClientAPI contains the set of methods on the VpnSiteLinkConnectionsClient type. +type VpnSiteLinkConnectionsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result network.VpnSiteLinkConnection, err error) +} + +var _ VpnSiteLinkConnectionsClientAPI = (*network.VpnSiteLinkConnectionsClient)(nil) + +// NatRulesClientAPI contains the set of methods on the NatRulesClient type. +type NatRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters network.VpnGatewayNatRule) (result network.NatRulesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string) (result network.NatRulesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string) (result network.VpnGatewayNatRule, err error) + ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result network.ListVpnGatewayNatRulesResultPage, err error) + ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result network.ListVpnGatewayNatRulesResultIterator, err error) +} + +var _ NatRulesClientAPI = (*network.NatRulesClient)(nil) + +// P2sVpnGatewaysClientAPI contains the set of methods on the P2sVpnGatewaysClient type. +type P2sVpnGatewaysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.P2SVpnGateway) (result network.P2sVpnGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result network.P2sVpnGatewaysDeleteFuture, err error) + DisconnectP2sVpnConnections(ctx context.Context, resourceGroupName string, p2sVpnGatewayName string, request network.P2SVpnConnectionRequest) (result network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture, err error) + GenerateVpnProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters network.P2SVpnProfileParameters) (result network.P2sVpnGatewaysGenerateVpnProfileFuture, err error) + Get(ctx context.Context, resourceGroupName string, gatewayName string) (result network.P2SVpnGateway, err error) + GetP2sVpnConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string) (result network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) + GetP2sVpnConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request network.P2SVpnConnectionHealthRequest) (result network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) + List(ctx context.Context) (result network.ListP2SVpnGatewaysResultPage, err error) + ListComplete(ctx context.Context) (result network.ListP2SVpnGatewaysResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ListP2SVpnGatewaysResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result network.ListP2SVpnGatewaysResultIterator, err error) + Reset(ctx context.Context, resourceGroupName string, gatewayName string) (result network.P2SVpnGatewaysResetFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) +} + +var _ P2sVpnGatewaysClientAPI = (*network.P2sVpnGatewaysClient)(nil) + +// VpnServerConfigurationsAssociatedWithVirtualWanClientAPI contains the set of methods on the VpnServerConfigurationsAssociatedWithVirtualWanClient type. +type VpnServerConfigurationsAssociatedWithVirtualWanClientAPI interface { + List(ctx context.Context, resourceGroupName string, virtualWANName string) (result network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) +} + +var _ VpnServerConfigurationsAssociatedWithVirtualWanClientAPI = (*network.VpnServerConfigurationsAssociatedWithVirtualWanClient)(nil) + +// VirtualHubRouteTableV2sClientAPI contains the set of methods on the VirtualHubRouteTableV2sClient type. +type VirtualHubRouteTableV2sClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters network.VirtualHubRouteTableV2) (result network.VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result network.VirtualHubRouteTableV2sDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result network.VirtualHubRouteTableV2, err error) + List(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListVirtualHubRouteTableV2sResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListVirtualHubRouteTableV2sResultIterator, err error) +} + +var _ VirtualHubRouteTableV2sClientAPI = (*network.VirtualHubRouteTableV2sClient)(nil) + +// ExpressRouteGatewaysClientAPI contains the set of methods on the ExpressRouteGatewaysClient type. +type ExpressRouteGatewaysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters network.ExpressRouteGateway) (result network.ExpressRouteGatewaysCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result network.ExpressRouteGatewaysDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result network.ExpressRouteGateway, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result network.ExpressRouteGatewayList, err error) + ListBySubscription(ctx context.Context) (result network.ExpressRouteGatewayList, err error) + UpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters network.TagsObject) (result network.ExpressRouteGatewaysUpdateTagsFuture, err error) +} + +var _ ExpressRouteGatewaysClientAPI = (*network.ExpressRouteGatewaysClient)(nil) + +// ExpressRouteConnectionsClientAPI contains the set of methods on the ExpressRouteConnectionsClient type. +type ExpressRouteConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters network.ExpressRouteConnection) (result network.ExpressRouteConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result network.ExpressRouteConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result network.ExpressRouteConnection, err error) + List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result network.ExpressRouteConnectionList, err error) +} + +var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient)(nil) + +// VirtualHubBgpConnectionClientAPI contains the set of methods on the VirtualHubBgpConnectionClient type. +type VirtualHubBgpConnectionClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters network.BgpConnection) (result network.VirtualHubBgpConnectionCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result network.VirtualHubBgpConnectionDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result network.BgpConnection, err error) +} + +var _ VirtualHubBgpConnectionClientAPI = (*network.VirtualHubBgpConnectionClient)(nil) + +// VirtualHubBgpConnectionsClientAPI contains the set of methods on the VirtualHubBgpConnectionsClient type. +type VirtualHubBgpConnectionsClientAPI interface { + List(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListVirtualHubBgpConnectionResultsPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListVirtualHubBgpConnectionResultsIterator, err error) + ListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string) (result network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture, err error) + ListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string) (result network.VirtualHubBgpConnectionsListLearnedRoutesFuture, err error) +} + +var _ VirtualHubBgpConnectionsClientAPI = (*network.VirtualHubBgpConnectionsClient)(nil) + +// VirtualHubIPConfigurationClientAPI contains the set of methods on the VirtualHubIPConfigurationClient type. +type VirtualHubIPConfigurationClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string, parameters network.HubIPConfiguration) (result network.VirtualHubIPConfigurationCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string) (result network.VirtualHubIPConfigurationDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string) (result network.HubIPConfiguration, err error) + List(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListVirtualHubIPConfigurationResultsPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListVirtualHubIPConfigurationResultsIterator, err error) +} + +var _ VirtualHubIPConfigurationClientAPI = (*network.VirtualHubIPConfigurationClient)(nil) + +// HubRouteTablesClientAPI contains the set of methods on the HubRouteTablesClient type. +type HubRouteTablesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters network.HubRouteTable) (result network.HubRouteTablesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result network.HubRouteTablesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result network.HubRouteTable, err error) + List(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListHubRouteTablesResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result network.ListHubRouteTablesResultIterator, err error) +} + +var _ HubRouteTablesClientAPI = (*network.HubRouteTablesClient)(nil) + +// WebApplicationFirewallPoliciesClientAPI contains the set of methods on the WebApplicationFirewallPoliciesClient type. +type WebApplicationFirewallPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters network.WebApplicationFirewallPolicy) (result network.WebApplicationFirewallPolicy, err error) + Delete(ctx context.Context, resourceGroupName string, policyName string) (result network.WebApplicationFirewallPoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, policyName string) (result network.WebApplicationFirewallPolicy, err error) + List(ctx context.Context, resourceGroupName string) (result network.WebApplicationFirewallPolicyListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.WebApplicationFirewallPolicyListResultIterator, err error) + ListAll(ctx context.Context) (result network.WebApplicationFirewallPolicyListResultPage, err error) + ListAllComplete(ctx context.Context) (result network.WebApplicationFirewallPolicyListResultIterator, err error) +} + +var _ WebApplicationFirewallPoliciesClientAPI = (*network.WebApplicationFirewallPoliciesClient)(nil) diff --git a/services/network/mgmt/2021-03-01/network/operations.go b/services/network/mgmt/2021-03-01/network/operations.go new file mode 100644 index 000000000000..8c660d212d1b --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/operations.go @@ -0,0 +1,140 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 network Client +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 using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Network 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, "network.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, "network.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.olr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", resp, "Failure responding to request") + return + } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Network/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) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// 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, + 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, "network.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, "network.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.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/network/mgmt/2021-03-01/network/p2svpngateways.go b/services/network/mgmt/2021-03-01/network/p2svpngateways.go new file mode 100644 index 000000000000..780ea063574a --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/p2svpngateways.go @@ -0,0 +1,977 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// P2sVpnGatewaysClient is the network Client +type P2sVpnGatewaysClient struct { + BaseClient +} + +// NewP2sVpnGatewaysClient creates an instance of the P2sVpnGatewaysClient client. +func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { + return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewP2sVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnGatewaysClient { + return P2sVpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. +// Parameters: +// resourceGroupName - the resource group name of the P2SVpnGateway. +// gatewayName - the name of the gateway. +// p2SVpnGatewayParameters - parameters supplied to create or Update a virtual wan p2s vpn gateway. +func (client P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (result P2sVpnGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + p2SVpnGatewayParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", pathParameters), + autorest.WithJSON(p2SVpnGatewayParameters), + 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 P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a virtual wan p2s vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the P2SVpnGateway. +// gatewayName - the name of the gateway. +func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}", 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 P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisconnectP2sVpnConnections disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// p2sVpnGatewayName - the name of the P2S Vpn Gateway. +// request - the parameters are supplied to disconnect p2s vpn connections. +func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnections(ctx context.Context, resourceGroupName string, p2sVpnGatewayName string, request P2SVpnConnectionRequest) (result P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.DisconnectP2sVpnConnections") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DisconnectP2sVpnConnectionsPreparer(ctx, resourceGroupName, p2sVpnGatewayName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "DisconnectP2sVpnConnections", nil, "Failure preparing request") + return + } + + result, err = client.DisconnectP2sVpnConnectionsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "DisconnectP2sVpnConnections", nil, "Failure sending request") + return + } + + return +} + +// DisconnectP2sVpnConnectionsPreparer prepares the DisconnectP2sVpnConnections request. +func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsPreparer(ctx context.Context, resourceGroupName string, p2sVpnGatewayName string, request P2SVpnConnectionRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "p2sVpnGatewayName": autorest.Encode("path", p2sVpnGatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisconnectP2sVpnConnectionsSender sends the DisconnectP2sVpnConnections request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsSender(req *http.Request) (future P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DisconnectP2sVpnConnectionsResponder handles the response to the DisconnectP2sVpnConnections request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// GenerateVpnProfile generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the P2SVpnGateway. +// parameters - parameters supplied to the generate P2SVpnGateway VPN client package operation. +func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (result P2sVpnGatewaysGenerateVpnProfileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GenerateVpnProfile") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, gatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request") + return + } + + result, err = client.GenerateVpnProfileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request") + return + } + + return +} + +// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request. +func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}/generatevpnprofile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GenerateVpnProfileResponder handles the response to the GenerateVpnProfile request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GenerateVpnProfileResponder(resp *http.Response) (result VpnProfileResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get retrieves the details of a virtual wan p2s vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the P2SVpnGateway. +// gatewayName - the name of the gateway. +func (client P2sVpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result P2SVpnGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}", 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 P2sVpnGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GetResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetP2sVpnConnectionHealth gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the +// specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the P2SVpnGateway. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealth") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetP2sVpnConnectionHealthPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure preparing request") + return + } + + result, err = client.GetP2sVpnConnectionHealthSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure sending request") + return + } + + return +} + +// GetP2sVpnConnectionHealthPreparer prepares the GetP2sVpnConnectionHealth request. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetP2sVpnConnectionHealthSender sends the GetP2sVpnConnectionHealth request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetP2sVpnConnectionHealthResponder handles the response to the GetP2sVpnConnectionHealth request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetP2sVpnConnectionHealthDetailed gets the sas url to get the connection health detail of P2S clients of the virtual +// wan P2SVpnGateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the P2SVpnGateway. +// request - request parameters supplied to get p2s vpn connections detailed health. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVpnConnectionHealthRequest) (result P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealthDetailed") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetP2sVpnConnectionHealthDetailedPreparer(ctx, resourceGroupName, gatewayName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", nil, "Failure preparing request") + return + } + + result, err = client.GetP2sVpnConnectionHealthDetailedSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", nil, "Failure sending request") + return + } + + return +} + +// GetP2sVpnConnectionHealthDetailedPreparer prepares the GetP2sVpnConnectionHealthDetailed request. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedPreparer(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVpnConnectionHealthRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetP2sVpnConnectionHealthDetailedSender sends the GetP2sVpnConnectionHealthDetailed request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetP2sVpnConnectionHealthDetailedResponder handles the response to the GetP2sVpnConnectionHealthDetailed request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedResponder(resp *http.Response) (result P2SVpnConnectionHealth, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the P2SVpnGateways in a subscription. +func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnGatewaysResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.List") + defer func() { + sc := -1 + if result.lpvgr.Response.Response != nil { + sc = result.lpvgr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lpvgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.lpvgr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.lpvgr.hasNextLink() && result.lpvgr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways", 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 P2sVpnGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) ListResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + 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 P2sVpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) { + req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "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, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client P2sVpnGatewaysClient) ListComplete(ctx context.Context) (result ListP2SVpnGatewaysResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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 lists all the P2SVpnGateways in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the P2SVpnGateway. +func (client P2sVpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lpvgr.Response.Response != nil { + sc = result.lpvgr.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, "network.P2sVpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lpvgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lpvgr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lpvgr.hasNextLink() && result.lpvgr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client P2sVpnGatewaysClient) 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 = "2021-03-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.Network/p2svpnGateways", 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 P2sVpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + 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 P2sVpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) { + req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "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, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client P2sVpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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 +} + +// Reset resets the primary of the p2s vpn gateway in the specified resource group. +// Parameters: +// resourceGroupName - the resource group name of the P2SVpnGateway. +// gatewayName - the name of the gateway. +func (client P2sVpnGatewaysClient) Reset(ctx context.Context, resourceGroupName string, gatewayName string) (result P2SVpnGatewaysResetFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.Reset") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Reset", nil, "Failure preparing request") + return + } + + result, err = client.ResetSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Reset", nil, "Failure sending request") + return + } + + return +} + +// ResetPreparer prepares the Reset request. +func (client P2sVpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}/reset", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetSender sends the Reset request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) ResetSender(req *http.Request) (future P2SVpnGatewaysResetFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetResponder handles the response to the Reset request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) ResetResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates virtual wan p2s vpn gateway tags. +// Parameters: +// resourceGroupName - the resource group name of the P2SVpnGateway. +// gatewayName - the name of the gateway. +// p2SVpnGatewayParameters - parameters supplied to update a virtual wan p2s vpn gateway tags. +func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (result P2sVpnGatewaysUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/p2svpnGateways/{gatewayName}", pathParameters), + autorest.WithJSON(p2SVpnGatewayParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/packetcaptures.go b/services/network/mgmt/2021-03-01/network/packetcaptures.go new file mode 100644 index 000000000000..0e75d92f4379 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/packetcaptures.go @@ -0,0 +1,528 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PacketCapturesClient is the network Client +type PacketCapturesClient struct { + BaseClient +} + +// NewPacketCapturesClient creates an instance of the PacketCapturesClient client. +func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { + return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient { + return PacketCapturesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create and start a packet capture on the specified VM. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// packetCaptureName - the name of the packet capture session. +// parameters - parameters that define the create packet capture operation. +func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (result PacketCapturesCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.PacketCaptureParameters", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.PacketCaptureParameters.Target", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.PacketCaptureParameters.BytesToCapturePerPacket", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PacketCaptureParameters.BytesToCapturePerPacket", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.PacketCaptureParameters.BytesToCapturePerPacket", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.PacketCaptureParameters.TotalBytesPerSession", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PacketCaptureParameters.TotalBytesPerSession", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.PacketCaptureParameters.TotalBytesPerSession", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.PacketCaptureParameters.TimeLimitInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PacketCaptureParameters.TimeLimitInSeconds", Name: validation.InclusiveMaximum, Rule: int64(18000), Chain: nil}, + {Target: "parameters.PacketCaptureParameters.TimeLimitInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.PacketCaptureParameters.StorageLocation", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.PacketCapturesClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "packetCaptureName": autorest.Encode("path", packetCaptureName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", pathParameters), + autorest.WithJSON(parameters), + 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 PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) CreateResponder(resp *http.Response) (result PacketCaptureResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified packet capture session. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// packetCaptureName - the name of the packet capture session. +func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "packetCaptureName": autorest.Encode("path", packetCaptureName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", 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 PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a packet capture session by name. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// packetCaptureName - the name of the packet capture session. +func (client PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCaptureResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.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, networkWatcherName, packetCaptureName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "packetCaptureName": autorest.Encode("path", packetCaptureName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", 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 PacketCapturesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) GetResponder(resp *http.Response) (result PacketCaptureResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStatus query the status of a running packet capture session. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the Network Watcher resource. +// packetCaptureName - the name given to the packet capture session. +func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesGetStatusFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.GetStatus") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetStatusPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure preparing request") + return + } + + result, err = client.GetStatusSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure sending request") + return + } + + return +} + +// GetStatusPreparer prepares the GetStatus request. +func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "packetCaptureName": autorest.Encode("path", packetCaptureName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetStatusSender sends the GetStatus request. The method will close the +// http.Response Body if it receives an error. +func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetStatusResponder handles the response to the GetStatus request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) GetStatusResponder(resp *http.Response) (result PacketCaptureQueryStatusResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all packet capture sessions within the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the Network Watcher resource. +func (client PacketCapturesClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result PacketCaptureListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.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, resourceGroupName, networkWatcherName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/packetCaptures", 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 PacketCapturesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) ListResponder(resp *http.Response) (result PacketCaptureListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Stop stops a specified packet capture session. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// packetCaptureName - the name of the packet capture session. +func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesStopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Stop") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure preparing request") + return + } + + result, err = client.StopSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure sending request") + return + } + + return +} + +// StopPreparer prepares the Stop request. +func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "packetCaptureName": autorest.Encode("path", packetCaptureName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopSender sends the Stop request. The method will close the +// http.Response Body if it receives an error. +func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopResponder handles the response to the Stop request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2021-03-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2021-03-01/network/peerexpressroutecircuitconnections.go new file mode 100644 index 000000000000..23fcac91ede6 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/peerexpressroutecircuitconnections.go @@ -0,0 +1,233 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PeerExpressRouteCircuitConnectionsClient is the network Client +type PeerExpressRouteCircuitConnectionsClient struct { + BaseClient +} + +// NewPeerExpressRouteCircuitConnectionsClient creates an instance of the PeerExpressRouteCircuitConnectionsClient +// client. +func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpressRouteCircuitConnectionsClient { + return NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the +// PeerExpressRouteCircuitConnectionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PeerExpressRouteCircuitConnectionsClient { + return PeerExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified Peer Express Route Circuit Connection from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// connectionName - the name of the peer express route circuit connection. +func (client PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result PeerExpressRouteCircuitConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.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, circuitName, peeringName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "connectionName": autorest.Encode("path", connectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}", 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 PeerExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PeerExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result PeerExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all global reach peer connections associated with a private peering in an express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +// peeringName - the name of the peering. +func (client PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.List") + defer func() { + sc := -1 + if result.percclr.Response.Response != nil { + sc = result.percclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.percclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.percclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.percclr.hasNextLink() && result.percclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections", 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 PeerExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PeerExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result PeerExpressRouteCircuitConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 PeerExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults PeerExpressRouteCircuitConnectionListResult) (result PeerExpressRouteCircuitConnectionListResult, err error) { + req, err := lastResults.peerExpressRouteCircuitConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "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, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PeerExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.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, circuitName, peeringName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/privatednszonegroups.go b/services/network/mgmt/2021-03-01/network/privatednszonegroups.go new file mode 100644 index 000000000000..ac33ce1868a9 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/privatednszonegroups.go @@ -0,0 +1,391 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateDNSZoneGroupsClient is the network Client +type PrivateDNSZoneGroupsClient struct { + BaseClient +} + +// NewPrivateDNSZoneGroupsClient creates an instance of the PrivateDNSZoneGroupsClient client. +func NewPrivateDNSZoneGroupsClient(subscriptionID string) PrivateDNSZoneGroupsClient { + return NewPrivateDNSZoneGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateDNSZoneGroupsClientWithBaseURI creates an instance of the PrivateDNSZoneGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPrivateDNSZoneGroupsClientWithBaseURI(baseURI string, subscriptionID string) PrivateDNSZoneGroupsClient { + return PrivateDNSZoneGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a private dns zone group in the specified private endpoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// privateEndpointName - the name of the private endpoint. +// privateDNSZoneGroupName - the name of the private dns zone group. +// parameters - parameters supplied to the create or update private dns zone group operation. +func (client PrivateDNSZoneGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup) (result PrivateDNSZoneGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateDNSZoneGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateDnsZoneGroupName": autorest.Encode("path", privateDNSZoneGroupName), + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}", 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 PrivateDNSZoneGroupsClient) CreateOrUpdateSender(req *http.Request) (future PrivateDNSZoneGroupsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateDNSZoneGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateDNSZoneGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified private dns zone group. +// Parameters: +// resourceGroupName - the name of the resource group. +// privateEndpointName - the name of the private endpoint. +// privateDNSZoneGroupName - the name of the private dns zone group. +func (client PrivateDNSZoneGroupsClient) Delete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string) (result PrivateDNSZoneGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateDNSZoneGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateDnsZoneGroupName": autorest.Encode("path", privateDNSZoneGroupName), + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}", 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 PrivateDNSZoneGroupsClient) DeleteSender(req *http.Request) (future PrivateDNSZoneGroupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateDNSZoneGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the private dns zone group resource by specified private dns zone group name. +// Parameters: +// resourceGroupName - the name of the resource group. +// privateEndpointName - the name of the private endpoint. +// privateDNSZoneGroupName - the name of the private dns zone group. +func (client PrivateDNSZoneGroupsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string) (result PrivateDNSZoneGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupsClient.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, privateEndpointName, privateDNSZoneGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateDNSZoneGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateDnsZoneGroupName": autorest.Encode("path", privateDNSZoneGroupName), + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}", 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 PrivateDNSZoneGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateDNSZoneGroupsClient) GetResponder(resp *http.Response) (result PrivateDNSZoneGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all private dns zone groups in a private endpoint. +// Parameters: +// privateEndpointName - the name of the private endpoint. +// resourceGroupName - the name of the resource group. +func (client PrivateDNSZoneGroupsClient) List(ctx context.Context, privateEndpointName string, resourceGroupName string) (result PrivateDNSZoneGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupsClient.List") + defer func() { + sc := -1 + if result.pdzglr.Response.Response != nil { + sc = result.pdzglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, privateEndpointName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pdzglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "List", resp, "Failure sending request") + return + } + + result.pdzglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.pdzglr.hasNextLink() && result.pdzglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateDNSZoneGroupsClient) ListPreparer(ctx context.Context, privateEndpointName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups", 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 PrivateDNSZoneGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateDNSZoneGroupsClient) ListResponder(resp *http.Response) (result PrivateDNSZoneGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateDNSZoneGroupsClient) listNextResults(ctx context.Context, lastResults PrivateDNSZoneGroupListResult) (result PrivateDNSZoneGroupListResult, err error) { + req, err := lastResults.privateDNSZoneGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "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, "network.PrivateDNSZoneGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateDNSZoneGroupsClient) ListComplete(ctx context.Context, privateEndpointName string, resourceGroupName string) (result PrivateDNSZoneGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupsClient.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, privateEndpointName, resourceGroupName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/privateendpoints.go b/services/network/mgmt/2021-03-01/network/privateendpoints.go new file mode 100644 index 000000000000..4372a786d6ff --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/privateendpoints.go @@ -0,0 +1,500 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateEndpointsClient is the network Client +type PrivateEndpointsClient struct { + BaseClient +} + +// NewPrivateEndpointsClient creates an instance of the PrivateEndpointsClient client. +func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { + return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPrivateEndpointsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointsClient { + return PrivateEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an private endpoint in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// privateEndpointName - the name of the private endpoint. +// parameters - parameters supplied to the create or update private endpoint operation. +func (client PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint) (result PrivateEndpointsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateEndpointName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", 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 PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified private endpoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// privateEndpointName - the name of the private endpoint. +func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupName string, privateEndpointName string) (result PrivateEndpointsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, privateEndpointName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateEndpoints/{privateEndpointName}", 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 PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified private endpoint by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// privateEndpointName - the name of the private endpoint. +// expand - expands referenced resources. +func (client PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (result PrivateEndpoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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, privateEndpointName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/privateEndpoints/{privateEndpointName}", 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 PrivateEndpointsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) GetResponder(resp *http.Response) (result PrivateEndpoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all private endpoints in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client PrivateEndpointsClient) List(ctx context.Context, resourceGroupName string) (result PrivateEndpointListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.List") + defer func() { + sc := -1 + if result.pelr.Response.Response != nil { + sc = result.pelr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pelr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", resp, "Failure sending request") + return + } + + result.pelr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", resp, "Failure responding to request") + return + } + if result.pelr.hasNextLink() && result.pelr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateEndpointsClient) ListPreparer(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 = "2021-03-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.Network/privateEndpoints", 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 PrivateEndpointsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) ListResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateEndpointsClient) listNextResults(ctx context.Context, lastResults PrivateEndpointListResult) (result PrivateEndpointListResult, err error) { + req, err := lastResults.privateEndpointListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "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, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string) (result PrivateEndpointListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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) + return +} + +// ListBySubscription gets all private endpoints in a subscription. +func (client PrivateEndpointsClient) ListBySubscription(ctx context.Context) (result PrivateEndpointListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.ListBySubscription") + defer func() { + sc := -1 + if result.pelr.Response.Response != nil { + sc = result.pelr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.pelr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.pelr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.pelr.hasNextLink() && result.pelr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints", 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 PrivateEndpointsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateEndpointsClient) listBySubscriptionNextResults(ctx context.Context, lastResults PrivateEndpointListResult) (result PrivateEndpointListResult, err error) { + req, err := lastResults.privateEndpointListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "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, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context) (result PrivateEndpointListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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 +} diff --git a/services/network/mgmt/2021-03-01/network/privatelinkservices.go b/services/network/mgmt/2021-03-01/network/privatelinkservices.go new file mode 100644 index 000000000000..e955818338c0 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/privatelinkservices.go @@ -0,0 +1,1261 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateLinkServicesClient is the network Client +type PrivateLinkServicesClient struct { + BaseClient +} + +// NewPrivateLinkServicesClient creates an instance of the PrivateLinkServicesClient client. +func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClient { + return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPrivateLinkServicesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkServicesClient { + return PrivateLinkServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckPrivateLinkServiceVisibility checks whether the subscription is visible to private link service. +// Parameters: +// location - the location of the domain name. +// parameters - the request body of CheckPrivateLinkService API call. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest) (result PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckPrivateLinkServiceVisibilityPreparer(ctx, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure preparing request") + return + } + + result, err = client.CheckPrivateLinkServiceVisibilitySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure sending request") + return + } + + return +} + +// CheckPrivateLinkServiceVisibilityPreparer prepares the CheckPrivateLinkServiceVisibility request. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPreparer(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/checkPrivateLinkServiceVisibility", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckPrivateLinkServiceVisibilitySender sends the CheckPrivateLinkServiceVisibility request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CheckPrivateLinkServiceVisibilityResponder handles the response to the CheckPrivateLinkServiceVisibility request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityResponder(resp *http.Response) (result PrivateLinkServiceVisibility, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CheckPrivateLinkServiceVisibilityByResourceGroup checks whether the subscription is visible to private link service +// in the specified resource group. +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +// parameters - the request body of CheckPrivateLinkService API call. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest) (result PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckPrivateLinkServiceVisibilityByResourceGroupPreparer(ctx, location, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure preparing request") + return + } + + result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure sending request") + return + } + + return +} + +// CheckPrivateLinkServiceVisibilityByResourceGroupPreparer prepares the CheckPrivateLinkServiceVisibilityByResourceGroup request. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/checkPrivateLinkServiceVisibility", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckPrivateLinkServiceVisibilityByResourceGroupSender sends the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CheckPrivateLinkServiceVisibilityByResourceGroupResponder handles the response to the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupResponder(resp *http.Response) (result PrivateLinkServiceVisibility, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates an private link service in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// parameters - parameters supplied to the create or update private link service operation. +func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService) (result PrivateLinkServicesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", 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 PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateLinkService, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified private link service. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateLinkServicesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateLinkServices/{serviceName}", 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 PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeletePrivateEndpointConnection delete private end point connection for a private link service in a subscription. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// peConnectionName - the name of the private end point connection. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (result PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.DeletePrivateEndpointConnection") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request") + return + } + + result, err = client.DeletePrivateEndpointConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure sending request") + return + } + + return +} + +// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peConnectionName": autorest.Encode("path", peConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified private link service by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// expand - expands referenced resources. +func (client PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, expand string) (result PrivateLinkService, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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, serviceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/privateLinkServices/{serviceName}", 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 PrivateLinkServicesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) GetResponder(resp *http.Response) (result PrivateLinkService, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPrivateEndpointConnection get the specific private end point connection by specific private link service in the +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// peConnectionName - the name of the private end point connection. +// expand - expands referenced resources. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, expand string) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.GetPrivateEndpointConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", nil, "Failure preparing request") + return + } + + resp, err := client.GetPrivateEndpointConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", resp, "Failure sending request") + return + } + + result, err = client.GetPrivateEndpointConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", resp, "Failure responding to request") + return + } + + return +} + +// GetPrivateEndpointConnectionPreparer prepares the GetPrivateEndpointConnection request. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peConnectionName": autorest.Encode("path", peConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPrivateEndpointConnectionSender sends the GetPrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetPrivateEndpointConnectionResponder handles the response to the GetPrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all private link services in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client PrivateLinkServicesClient) List(ctx context.Context, resourceGroupName string) (result PrivateLinkServiceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.List") + defer func() { + sc := -1 + if result.plslr.Response.Response != nil { + sc = result.plslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", resp, "Failure sending request") + return + } + + result.plslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", resp, "Failure responding to request") + return + } + if result.plslr.hasNextLink() && result.plslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateLinkServicesClient) ListPreparer(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 = "2021-03-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.Network/privateLinkServices", 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 PrivateLinkServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListResponder(resp *http.Response) (result PrivateLinkServiceListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateLinkServicesClient) listNextResults(ctx context.Context, lastResults PrivateLinkServiceListResult) (result PrivateLinkServiceListResult, err error) { + req, err := lastResults.privateLinkServiceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "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, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PrivateLinkServiceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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) + return +} + +// ListAutoApprovedPrivateLinkServices returns all of the private link service ids that can be linked to a Private +// Endpoint with auto approved in this subscription in this region. +// Parameters: +// location - the location of the domain name. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(ctx context.Context, location string) (result AutoApprovedPrivateLinkServicesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices") + defer func() { + sc := -1 + if result.aaplsr.Response.Response != nil { + sc = result.aaplsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAutoApprovedPrivateLinkServicesNextResults + req, err := client.ListAutoApprovedPrivateLinkServicesPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", nil, "Failure preparing request") + return + } + + resp, err := client.ListAutoApprovedPrivateLinkServicesSender(req) + if err != nil { + result.aaplsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", resp, "Failure sending request") + return + } + + result.aaplsr, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", resp, "Failure responding to request") + return + } + if result.aaplsr.hasNextLink() && result.aaplsr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAutoApprovedPrivateLinkServicesPreparer prepares the ListAutoApprovedPrivateLinkServices request. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAutoApprovedPrivateLinkServicesSender sends the ListAutoApprovedPrivateLinkServices request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAutoApprovedPrivateLinkServicesResponder handles the response to the ListAutoApprovedPrivateLinkServices request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesResponder(resp *http.Response) (result AutoApprovedPrivateLinkServicesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAutoApprovedPrivateLinkServicesNextResults retrieves the next set of results, if any. +func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesNextResults(ctx context.Context, lastResults AutoApprovedPrivateLinkServicesResult) (result AutoApprovedPrivateLinkServicesResult, err error) { + req, err := lastResults.autoApprovedPrivateLinkServicesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAutoApprovedPrivateLinkServicesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAutoApprovedPrivateLinkServicesComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesComplete(ctx context.Context, location string) (result AutoApprovedPrivateLinkServicesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices") + 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.ListAutoApprovedPrivateLinkServices(ctx, location) + return +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroup returns all of the private link service ids that can be linked to +// a Private Endpoint with auto approved in this subscription in this region. +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result AutoApprovedPrivateLinkServicesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup") + defer func() { + sc := -1 + if result.aaplsr.Response.Response != nil { + sc = result.aaplsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAutoApprovedPrivateLinkServicesByResourceGroupNextResults + req, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer(ctx, location, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req) + if err != nil { + result.aaplsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", resp, "Failure sending request") + return + } + + result.aaplsr, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", resp, "Failure responding to request") + return + } + if result.aaplsr.hasNextLink() && result.aaplsr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer prepares the ListAutoApprovedPrivateLinkServicesByResourceGroup request. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/locations/{location}/autoApprovedPrivateLinkServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupSender sends the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupResponder handles the response to the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp *http.Response) (result AutoApprovedPrivateLinkServicesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAutoApprovedPrivateLinkServicesByResourceGroupNextResults retrieves the next set of results, if any. +func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupNextResults(ctx context.Context, lastResults AutoApprovedPrivateLinkServicesResult) (result AutoApprovedPrivateLinkServicesResult, err error) { + req, err := lastResults.autoApprovedPrivateLinkServicesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result AutoApprovedPrivateLinkServicesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup") + 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.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, location, resourceGroupName) + return +} + +// ListBySubscription gets all private link service in a subscription. +func (client PrivateLinkServicesClient) ListBySubscription(ctx context.Context) (result PrivateLinkServiceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListBySubscription") + defer func() { + sc := -1 + if result.plslr.Response.Response != nil { + sc = result.plslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.plslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.plslr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.plslr.hasNextLink() && result.plslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices", 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 PrivateLinkServicesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateLinkServiceListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateLinkServicesClient) listBySubscriptionNextResults(ctx context.Context, lastResults PrivateLinkServiceListResult) (result PrivateLinkServiceListResult, err error) { + req, err := lastResults.privateLinkServiceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "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, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListBySubscriptionComplete(ctx context.Context) (result PrivateLinkServiceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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 +} + +// ListPrivateEndpointConnections gets all private end point connections for a specific private link service. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListPrivateEndpointConnections") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listPrivateEndpointConnectionsNextResults + req, err := client.ListPrivateEndpointConnectionsPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", nil, "Failure preparing request") + return + } + + resp, err := client.ListPrivateEndpointConnectionsSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListPrivateEndpointConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", resp, "Failure responding to request") + return + } + if result.peclr.hasNextLink() && result.peclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPrivateEndpointConnectionsPreparer prepares the ListPrivateEndpointConnections request. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/privateLinkServices/{serviceName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPrivateEndpointConnectionsSender sends the ListPrivateEndpointConnections request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListPrivateEndpointConnectionsResponder handles the response to the ListPrivateEndpointConnections request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listPrivateEndpointConnectionsNextResults retrieves the next set of results, if any. +func (client PrivateLinkServicesClient) listPrivateEndpointConnectionsNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListPrivateEndpointConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListPrivateEndpointConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListPrivateEndpointConnectionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsComplete(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListPrivateEndpointConnections") + 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.ListPrivateEndpointConnections(ctx, resourceGroupName, serviceName) + return +} + +// UpdatePrivateEndpointConnection approve or reject private end point connection for a private link service in a +// subscription. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// peConnectionName - the name of the private end point connection. +// parameters - parameters supplied to approve or reject the private end point connection. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.UpdatePrivateEndpointConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", nil, "Failure preparing request") + return + } + + resp, err := client.UpdatePrivateEndpointConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure sending request") + return + } + + result, err = client.UpdatePrivateEndpointConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePrivateEndpointConnectionPreparer prepares the UpdatePrivateEndpointConnection request. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peConnectionName": autorest.Encode("path", peConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Type = nil + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdatePrivateEndpointConnectionSender sends the UpdatePrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdatePrivateEndpointConnectionResponder handles the response to the UpdatePrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/profiles.go b/services/network/mgmt/2021-03-01/network/profiles.go new file mode 100644 index 000000000000..1e1826a8cff8 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/profiles.go @@ -0,0 +1,576 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ProfilesClient is the network Client +type ProfilesClient struct { + BaseClient +} + +// NewProfilesClient creates an instance of the ProfilesClient client. +func NewProfilesClient(subscriptionID string) ProfilesClient { + return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient { + return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a network profile. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkProfileName - the name of the network profile. +// parameters - parameters supplied to the create or update network profile operation. +func (client ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (result Profile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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, networkProfileName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkProfileName": autorest.Encode("path", networkProfileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified network profile. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkProfileName - the name of the NetworkProfile. +func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName string, networkProfileName string) (result ProfilesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkProfileName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkProfileName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkProfileName": autorest.Encode("path", networkProfileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified network profile in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkProfileName - the name of the public IP prefix. +// expand - expands referenced resources. +func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (result Profile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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, networkProfileName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkProfileName": autorest.Encode("path", networkProfileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all network profiles in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ProfilesClient) List(ctx context.Context, resourceGroupName string) (result ProfileListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.List") + defer func() { + sc := -1 + if result.plr.Response.Response != nil { + sc = result.plr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", resp, "Failure sending request") + return + } + + result.plr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", resp, "Failure responding to request") + return + } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ProfilesClient) ListPreparer(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 = "2021-03-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.Network/networkProfiles", 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 ProfilesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProfilesClient) ListResponder(resp *http.Response) (result ProfileListResult, err error) { + err = autorest.Respond( + resp, + 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 ProfilesClient) listNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) { + req, err := lastResults.profileListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "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, "network.ProfilesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProfilesClient) ListComplete(ctx context.Context, resourceGroupName string) (result ProfileListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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) + return +} + +// ListAll gets all the network profiles in a subscription. +func (client ProfilesClient) ListAll(ctx context.Context) (result ProfileListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll") + defer func() { + sc := -1 + if result.plr.Response.Response != nil { + sc = result.plr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.plr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", resp, "Failure sending request") + return + } + + result.plr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client ProfilesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client ProfilesClient) ListAllResponder(resp *http.Response) (result ProfileListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client ProfilesClient) listAllNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) { + req, err := lastResults.profileListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProfilesClient) ListAllComplete(ctx context.Context) (result ProfileListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates network profile tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkProfileName - the name of the network profile. +// parameters - parameters supplied to update network profile tags. +func (client ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (result Profile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkProfileName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkProfileName": autorest.Encode("path", networkProfileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkProfiles/{networkProfileName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ProfilesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ProfilesClient) UpdateTagsResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/publicipaddresses.go b/services/network/mgmt/2021-03-01/network/publicipaddresses.go new file mode 100644 index 000000000000..25d49d59de02 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/publicipaddresses.go @@ -0,0 +1,1256 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PublicIPAddressesClient is the network Client +type PublicIPAddressesClient struct { + BaseClient +} + +// NewPublicIPAddressesClient creates an instance of the PublicIPAddressesClient client. +func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { + return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient { + return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a static or dynamic public IP address. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPAddressName - the name of the public IP address. +// parameters - parameters supplied to the create or update public IP address operation. +func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (result PublicIPAddressesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.PublicIPAddressesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPAddressName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", 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 PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified public IP address. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPAddressName - the name of the public IP address. +func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result PublicIPAddressesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPAddressName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/publicIPAddresses/{publicIpAddressName}", 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 PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified public IP address in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPAddressName - the name of the public IP address. +// expand - expands referenced resources. +func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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, publicIPAddressName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/publicIPAddresses/{publicIpAddressName}", 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 PublicIPAddressesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) GetResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCloudServicePublicIPAddress get the specified public IP address in a cloud service. +// Parameters: +// resourceGroupName - the name of the resource group. +// cloudServiceName - the name of the cloud service. +// roleInstanceName - the role instance name. +// networkInterfaceName - the name of the network interface. +// IPConfigurationName - the name of the IP configuration. +// publicIPAddressName - the name of the public IP Address. +// expand - expands referenced resources. +func (client PublicIPAddressesClient) GetCloudServicePublicIPAddress(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.GetCloudServicePublicIPAddress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetCloudServicePublicIPAddressPreparer(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetCloudServicePublicIPAddress", nil, "Failure preparing request") + return + } + + resp, err := client.GetCloudServicePublicIPAddressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetCloudServicePublicIPAddress", resp, "Failure sending request") + return + } + + result, err = client.GetCloudServicePublicIPAddressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetCloudServicePublicIPAddress", resp, "Failure responding to request") + return + } + + return +} + +// GetCloudServicePublicIPAddressPreparer prepares the GetCloudServicePublicIPAddress request. +func (client PublicIPAddressesClient) GetCloudServicePublicIPAddressPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCloudServicePublicIPAddressSender sends the GetCloudServicePublicIPAddress request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) GetCloudServicePublicIPAddressSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetCloudServicePublicIPAddressResponder handles the response to the GetCloudServicePublicIPAddress request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) GetCloudServicePublicIPAddressResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVirtualMachineScaleSetPublicIPAddress get the specified public IP address in a virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +// virtualmachineIndex - the virtual machine index. +// networkInterfaceName - the name of the network interface. +// IPConfigurationName - the name of the IP configuration. +// publicIPAddressName - the name of the public IP Address. +// expand - expands referenced resources. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVirtualMachineScaleSetPublicIPAddressPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", nil, "Failure preparing request") + return + } + + resp, err := client.GetVirtualMachineScaleSetPublicIPAddressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure sending request") + return + } + + result, err = client.GetVirtualMachineScaleSetPublicIPAddressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure responding to request") + return + } + + return +} + +// GetVirtualMachineScaleSetPublicIPAddressPreparer prepares the GetVirtualMachineScaleSetPublicIPAddress request. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-01" + 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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVirtualMachineScaleSetPublicIPAddressSender sends the GetVirtualMachineScaleSetPublicIPAddress request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetVirtualMachineScaleSetPublicIPAddressResponder handles the response to the GetVirtualMachineScaleSetPublicIPAddress request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all public IP addresses in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.List") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure sending request") + return + } + + result.pialr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PublicIPAddressesClient) ListPreparer(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 = "2021-03-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.Network/publicIPAddresses", 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 PublicIPAddressesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + 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 PublicIPAddressesClient) listNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "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, "network.PublicIPAddressesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPAddressesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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) + return +} + +// ListAll gets all the public IP addresses in a subscription. +func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.pialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure sending request") + return + } + + result.pialr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListAllResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) listAllNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPAddressesClient) ListAllComplete(ctx context.Context) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListCloudServicePublicIPAddresses gets information about all public IP addresses on a cloud service level. +// Parameters: +// resourceGroupName - the name of the resource group. +// cloudServiceName - the name of the cloud service. +func (client PublicIPAddressesClient) ListCloudServicePublicIPAddresses(ctx context.Context, resourceGroupName string, cloudServiceName string) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListCloudServicePublicIPAddresses") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listCloudServicePublicIPAddressesNextResults + req, err := client.ListCloudServicePublicIPAddressesPreparer(ctx, resourceGroupName, cloudServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListCloudServicePublicIPAddresses", nil, "Failure preparing request") + return + } + + resp, err := client.ListCloudServicePublicIPAddressesSender(req) + if err != nil { + result.pialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListCloudServicePublicIPAddresses", resp, "Failure sending request") + return + } + + result.pialr, err = client.ListCloudServicePublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListCloudServicePublicIPAddresses", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListCloudServicePublicIPAddressesPreparer prepares the ListCloudServicePublicIPAddresses request. +func (client PublicIPAddressesClient) ListCloudServicePublicIPAddressesPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/publicipaddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCloudServicePublicIPAddressesSender sends the ListCloudServicePublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListCloudServicePublicIPAddressesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListCloudServicePublicIPAddressesResponder handles the response to the ListCloudServicePublicIPAddresses request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListCloudServicePublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listCloudServicePublicIPAddressesNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) listCloudServicePublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listCloudServicePublicIPAddressesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListCloudServicePublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listCloudServicePublicIPAddressesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListCloudServicePublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listCloudServicePublicIPAddressesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListCloudServicePublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPAddressesClient) ListCloudServicePublicIPAddressesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListCloudServicePublicIPAddresses") + 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.ListCloudServicePublicIPAddresses(ctx, resourceGroupName, cloudServiceName) + return +} + +// ListCloudServiceRoleInstancePublicIPAddresses gets information about all public IP addresses in a role instance IP +// configuration in a cloud service. +// Parameters: +// resourceGroupName - the name of the resource group. +// cloudServiceName - the name of the cloud service. +// roleInstanceName - the name of role instance. +// networkInterfaceName - the network interface name. +// IPConfigurationName - the IP configuration name. +func (client PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddresses(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listCloudServiceRoleInstancePublicIPAddressesNextResults + req, err := client.ListCloudServiceRoleInstancePublicIPAddressesPreparer(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, IPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListCloudServiceRoleInstancePublicIPAddresses", nil, "Failure preparing request") + return + } + + resp, err := client.ListCloudServiceRoleInstancePublicIPAddressesSender(req) + if err != nil { + result.pialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListCloudServiceRoleInstancePublicIPAddresses", resp, "Failure sending request") + return + } + + result.pialr, err = client.ListCloudServiceRoleInstancePublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListCloudServiceRoleInstancePublicIPAddresses", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListCloudServiceRoleInstancePublicIPAddressesPreparer prepares the ListCloudServiceRoleInstancePublicIPAddresses request. +func (client PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddressesPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cloudServiceName": autorest.Encode("path", cloudServiceName), + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "roleInstanceName": autorest.Encode("path", roleInstanceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCloudServiceRoleInstancePublicIPAddressesSender sends the ListCloudServiceRoleInstancePublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddressesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListCloudServiceRoleInstancePublicIPAddressesResponder handles the response to the ListCloudServiceRoleInstancePublicIPAddresses request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listCloudServiceRoleInstancePublicIPAddressesNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listCloudServiceRoleInstancePublicIPAddressesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListCloudServiceRoleInstancePublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listCloudServiceRoleInstancePublicIPAddressesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListCloudServiceRoleInstancePublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listCloudServiceRoleInstancePublicIPAddressesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListCloudServiceRoleInstancePublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddressesComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses") + 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.ListCloudServiceRoleInstancePublicIPAddresses(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, IPConfigurationName) + return +} + +// ListVirtualMachineScaleSetPublicIPAddresses gets information about all public IP addresses on a virtual machine +// scale set level. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listVirtualMachineScaleSetPublicIPAddressesNextResults + req, err := client.ListVirtualMachineScaleSetPublicIPAddressesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetPublicIPAddressesSender(req) + if err != nil { + result.pialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure sending request") + return + } + + result.pialr, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListVirtualMachineScaleSetPublicIPAddressesPreparer prepares the ListVirtualMachineScaleSetPublicIPAddresses request. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVirtualMachineScaleSetPublicIPAddressesSender sends the ListVirtualMachineScaleSetPublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVirtualMachineScaleSetPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetPublicIPAddresses request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listVirtualMachineScaleSetPublicIPAddressesNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListVirtualMachineScaleSetPublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListVirtualMachineScaleSetPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses") + 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.ListVirtualMachineScaleSetPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName) + return +} + +// ListVirtualMachineScaleSetVMPublicIPAddresses gets information about all public IP addresses in a virtual machine IP +// configuration in a virtual machine scale set. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualMachineScaleSetName - the name of the virtual machine scale set. +// virtualmachineIndex - the virtual machine index. +// networkInterfaceName - the network interface name. +// IPConfigurationName - the IP configuration name. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listVirtualMachineScaleSetVMPublicIPAddressesNextResults + req, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesSender(req) + if err != nil { + result.pialr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure sending request") + return + } + + result.pialr, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesPreparer prepares the ListVirtualMachineScaleSetVMPublicIPAddresses request. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2018-10-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.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesSender sends the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listVirtualMachineScaleSetVMPublicIPAddressesNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses") + 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.ListVirtualMachineScaleSetVMPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName) + return +} + +// UpdateTags updates public IP address tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPAddressName - the name of the public IP address. +// parameters - parameters supplied to update public IP address tags. +func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (result PublicIPAddress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPAddressName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/publicIPAddresses/{publicIpAddressName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) UpdateTagsResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/publicipprefixes.go b/services/network/mgmt/2021-03-01/network/publicipprefixes.go new file mode 100644 index 000000000000..9d3729543896 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/publicipprefixes.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PublicIPPrefixesClient is the network Client +type PublicIPPrefixesClient struct { + BaseClient +} + +// NewPublicIPPrefixesClient creates an instance of the PublicIPPrefixesClient client. +func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { + return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient { + return PublicIPPrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a static or dynamic public IP prefix. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPPrefixName - the name of the public IP prefix. +// parameters - parameters supplied to the create or update public IP prefix operation. +func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (result PublicIPPrefixesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPPrefixName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPPrefix, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified public IP prefix. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPPrefixName - the name of the PublicIpPrefix. +func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (result PublicIPPrefixesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPPrefixName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified public IP prefix in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPPrefixName - the name of the public IP prefix. +// expand - expands referenced resources. +func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result PublicIPPrefix, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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, publicIPPrefixName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) GetResponder(resp *http.Response) (result PublicIPPrefix, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all public IP prefixes in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client PublicIPPrefixesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.List") + defer func() { + sc := -1 + if result.piplr.Response.Response != nil { + sc = result.piplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.piplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure sending request") + return + } + + result.piplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure responding to request") + return + } + if result.piplr.hasNextLink() && result.piplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PublicIPPrefixesClient) ListPreparer(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 = "2021-03-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.Network/publicIPPrefixes", 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 PublicIPPrefixesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) ListResponder(resp *http.Response) (result PublicIPPrefixListResult, err error) { + err = autorest.Respond( + resp, + 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 PublicIPPrefixesClient) listNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) { + req, err := lastResults.publicIPPrefixListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "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, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPPrefixesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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) + return +} + +// ListAll gets all the public IP prefixes in a subscription. +func (client PublicIPPrefixesClient) ListAll(ctx context.Context) (result PublicIPPrefixListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll") + defer func() { + sc := -1 + if result.piplr.Response.Response != nil { + sc = result.piplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.piplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure sending request") + return + } + + result.piplr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.piplr.hasNextLink() && result.piplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPPrefixesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) ListAllResponder(resp *http.Response) (result PublicIPPrefixListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client PublicIPPrefixesClient) listAllNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) { + req, err := lastResults.publicIPPrefixListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (result PublicIPPrefixListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates public IP prefix tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPPrefixName - the name of the public IP prefix. +// parameters - parameters supplied to update public IP prefix tags. +func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefix, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPPrefixName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) UpdateTagsResponder(resp *http.Response) (result PublicIPPrefix, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/resourcenavigationlinks.go b/services/network/mgmt/2021-03-01/network/resourcenavigationlinks.go new file mode 100644 index 000000000000..e6d8cd28dea1 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/resourcenavigationlinks.go @@ -0,0 +1,110 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ResourceNavigationLinksClient is the network Client +type ResourceNavigationLinksClient struct { + BaseClient +} + +// NewResourceNavigationLinksClient creates an instance of the ResourceNavigationLinksClient client. +func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationLinksClient { + return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { + return ResourceNavigationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of resource navigation links for a subnet. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +func (client ResourceNavigationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ResourceNavigationLinksListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceNavigationLinksClient.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, resourceGroupName, virtualNetworkName, subnetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks", 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 ResourceNavigationLinksClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ResourceNavigationLinksClient) ListResponder(resp *http.Response) (result ResourceNavigationLinksListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/routefilterrules.go b/services/network/mgmt/2021-03-01/network/routefilterrules.go new file mode 100644 index 000000000000..f97305a6b028 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/routefilterrules.go @@ -0,0 +1,401 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RouteFilterRulesClient is the network Client +type RouteFilterRulesClient struct { + BaseClient +} + +// NewRouteFilterRulesClient creates an instance of the RouteFilterRulesClient client. +func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { + return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient { + return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a route in the specified route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +// ruleName - the name of the route filter rule. +// routeFilterRuleParameters - parameters supplied to the create or update route filter rule operation. +func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (result RouteFilterRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: routeFilterRuleParameters, + Constraints: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.RouteFilterRuleType", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.Communities", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.RouteFilterRulesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + routeFilterRuleParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters), + autorest.WithJSON(routeFilterRuleParameters), + 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 RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilterRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified rule from a route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +// ruleName - the name of the rule. +func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName, ruleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", 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 RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified rule from a route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +// ruleName - the name of the rule. +func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.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, routeFilterName, ruleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", 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 RouteFilterRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) GetResponder(resp *http.Response) (result RouteFilterRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByRouteFilter gets all RouteFilterRules in a route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter") + defer func() { + sc := -1 + if result.rfrlr.Response.Response != nil { + sc = result.rfrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByRouteFilterNextResults + req, err := client.ListByRouteFilterPreparer(ctx, resourceGroupName, routeFilterName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", nil, "Failure preparing request") + return + } + + resp, err := client.ListByRouteFilterSender(req) + if err != nil { + result.rfrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure sending request") + return + } + + result.rfrlr, err = client.ListByRouteFilterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure responding to request") + return + } + if result.rfrlr.hasNextLink() && result.rfrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByRouteFilterPreparer prepares the ListByRouteFilter request. +func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeFilters/{routeFilterName}/routeFilterRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByRouteFilterSender sends the ListByRouteFilter request. The method will close the +// http.Response Body if it receives an error. +func (client RouteFilterRulesClient) ListByRouteFilterSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByRouteFilterResponder handles the response to the ListByRouteFilter request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) ListByRouteFilterResponder(resp *http.Response) (result RouteFilterRuleListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByRouteFilterNextResults retrieves the next set of results, if any. +func (client RouteFilterRulesClient) listByRouteFilterNextResults(ctx context.Context, lastResults RouteFilterRuleListResult) (result RouteFilterRuleListResult, err error) { + req, err := lastResults.routeFilterRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByRouteFilterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByRouteFilterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByRouteFilterComplete enumerates all values, automatically crossing page boundaries as required. +func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter") + 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.ListByRouteFilter(ctx, resourceGroupName, routeFilterName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/routefilters.go b/services/network/mgmt/2021-03-01/network/routefilters.go new file mode 100644 index 000000000000..5d7e427f6a4e --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/routefilters.go @@ -0,0 +1,578 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RouteFiltersClient is the network Client +type RouteFiltersClient struct { + BaseClient +} + +// NewRouteFiltersClient creates an instance of the RouteFiltersClient client. +func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { + return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) RouteFiltersClient { + return RouteFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a route filter in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +// routeFilterParameters - parameters supplied to the create or update route filter operation. +func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (result RouteFiltersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + routeFilterParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", pathParameters), + autorest.WithJSON(routeFilterParameters), + 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 RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilter, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFiltersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeFilters/{routeFilterName}", 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 RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +// expand - expands referenced express route bgp peering resources. +func (client RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (result RouteFilter, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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, routeFilterName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/routeFilters/{routeFilterName}", 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 RouteFiltersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) GetResponder(resp *http.Response) (result RouteFilter, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all route filters in a subscription. +func (client RouteFiltersClient) List(ctx context.Context) (result RouteFilterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.List") + defer func() { + sc := -1 + if result.rflr.Response.Response != nil { + sc = result.rflr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure sending request") + return + } + + result.rflr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure responding to request") + return + } + if result.rflr.hasNextLink() && result.rflr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters", 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 RouteFiltersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) ListResponder(resp *http.Response) (result RouteFilterListResult, err error) { + err = autorest.Respond( + resp, + 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 RouteFiltersClient) listNextResults(ctx context.Context, lastResults RouteFilterListResult) (result RouteFilterListResult, err error) { + req, err := lastResults.routeFilterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "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, "network.RouteFiltersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RouteFiltersClient) ListComplete(ctx context.Context) (result RouteFilterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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 route filters in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client RouteFiltersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result RouteFilterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.rflr.Response.Response != nil { + sc = result.rflr.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, "network.RouteFiltersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.rflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.rflr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.rflr.hasNextLink() && result.rflr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client RouteFiltersClient) 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 = "2021-03-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.Network/routeFilters", 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 RouteFiltersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) ListByResourceGroupResponder(resp *http.Response) (result RouteFilterListResult, err error) { + err = autorest.Respond( + resp, + 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 RouteFiltersClient) listByResourceGroupNextResults(ctx context.Context, lastResults RouteFilterListResult) (result RouteFilterListResult, err error) { + req, err := lastResults.routeFilterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "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, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result RouteFilterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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 +} + +// UpdateTags updates tags of a route filter. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeFilterName - the name of the route filter. +// parameters - parameters supplied to update route filter tags. +func (client RouteFiltersClient) UpdateTags(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject) (result RouteFilter, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, routeFilterName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client RouteFiltersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeFilterName": autorest.Encode("path", routeFilterName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeFilters/{routeFilterName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client RouteFiltersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) UpdateTagsResponder(resp *http.Response) (result RouteFilter, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/routes.go b/services/network/mgmt/2021-03-01/network/routes.go new file mode 100644 index 000000000000..e183ab15c8a2 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/routes.go @@ -0,0 +1,390 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RoutesClient is the network Client +type RoutesClient struct { + BaseClient +} + +// NewRoutesClient creates an instance of the RoutesClient client. +func NewRoutesClient(subscriptionID string) RoutesClient { + return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesClient { + return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a route in the specified route table. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +// routeName - the name of the route. +// routeParameters - parameters supplied to the create or update route operation. +func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (result RoutesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, routeName, routeParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeName": autorest.Encode("path", routeName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + routeParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", pathParameters), + autorest.WithJSON(routeParameters), + 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 RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result Route, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified route from a route table. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +// routeName - the name of the route. +func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result RoutesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName, routeName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeName": autorest.Encode("path", routeName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeTables/{routeTableName}/routes/{routeName}", 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 RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RoutesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified route from a route table. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +// routeName - the name of the route. +func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result Route, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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, routeTableName, routeName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeName": autorest.Encode("path", routeName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeTables/{routeTableName}/routes/{routeName}", 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 RoutesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RoutesClient) GetResponder(resp *http.Response) (result Route, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all routes in a route table. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +func (client RoutesClient) List(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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, resourceGroupName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "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, "network.RoutesClient", "List", resp, "Failure sending request") + return + } + + result.rlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", resp, "Failure responding to request") + return + } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeTables/{routeTableName}/routes", 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 RoutesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RoutesClient) ListResponder(resp *http.Response) (result RouteListResult, err error) { + err = autorest.Respond( + resp, + 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 RoutesClient) listNextResults(ctx context.Context, lastResults RouteListResult) (result RouteListResult, err error) { + req, err := lastResults.routeListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RoutesClient", "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, "network.RoutesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RoutesClient) ListComplete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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, routeTableName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/routetables.go b/services/network/mgmt/2021-03-01/network/routetables.go new file mode 100644 index 000000000000..d11117989d00 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/routetables.go @@ -0,0 +1,578 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RouteTablesClient is the network Client +type RouteTablesClient struct { + BaseClient +} + +// NewRouteTablesClient creates an instance of the RouteTablesClient client. +func NewRouteTablesClient(subscriptionID string) RouteTablesClient { + return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) RouteTablesClient { + return RouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or updates a route table in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +// parameters - parameters supplied to the create or update route table operation. +func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (result RouteTablesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", 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 RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteTable, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified route table. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteTablesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeTables/{routeTableName}", 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 RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified route table. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +// expand - expands referenced resources. +func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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, routeTableName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/routeTables/{routeTableName}", 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 RouteTablesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) GetResponder(resp *http.Response) (result RouteTable, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all route tables in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client RouteTablesClient) List(ctx context.Context, resourceGroupName string) (result RouteTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.List") + defer func() { + sc := -1 + if result.rtlr.Response.Response != nil { + sc = result.rtlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rtlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure sending request") + return + } + + result.rtlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure responding to request") + return + } + if result.rtlr.hasNextLink() && result.rtlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client RouteTablesClient) ListPreparer(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 = "2021-03-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.Network/routeTables", 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 RouteTablesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) ListResponder(resp *http.Response) (result RouteTableListResult, err error) { + err = autorest.Respond( + resp, + 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 RouteTablesClient) listNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) { + req, err := lastResults.routeTableListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "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, "network.RouteTablesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RouteTablesClient) ListComplete(ctx context.Context, resourceGroupName string) (result RouteTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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) + return +} + +// ListAll gets all route tables in a subscription. +func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll") + defer func() { + sc := -1 + if result.rtlr.Response.Response != nil { + sc = result.rtlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.rtlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure sending request") + return + } + + result.rtlr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.rtlr.hasNextLink() && result.rtlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client RouteTablesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) ListAllResponder(resp *http.Response) (result RouteTableListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client RouteTablesClient) listAllNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) { + req, err := lastResults.routeTableListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result RouteTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates a route table tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// routeTableName - the name of the route table. +// parameters - parameters supplied to update route table tags. +func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (result RouteTable, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, routeTableName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/routeTables/{routeTableName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) UpdateTagsResponder(resp *http.Response) (result RouteTable, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/securitygroups.go b/services/network/mgmt/2021-03-01/network/securitygroups.go new file mode 100644 index 000000000000..033ecad25d94 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/securitygroups.go @@ -0,0 +1,578 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SecurityGroupsClient is the network Client +type SecurityGroupsClient struct { + BaseClient +} + +// NewSecurityGroupsClient creates an instance of the SecurityGroupsClient client. +func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { + return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) SecurityGroupsClient { + return SecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a network security group in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// parameters - parameters supplied to the create or update network security group operation. +func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (result SecurityGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified network security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified network security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// expand - expands referenced resources. +func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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, networkSecurityGroupName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) GetResponder(resp *http.Response) (result SecurityGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all network security groups in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.List") + defer func() { + sc := -1 + if result.sglr.Response.Response != nil { + sc = result.sglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.sglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure sending request") + return + } + + result.sglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.sglr.hasNextLink() && result.sglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SecurityGroupsClient) ListPreparer(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 = "2021-03-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.Network/networkSecurityGroups", 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 SecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) ListResponder(resp *http.Response) (result SecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 SecurityGroupsClient) listNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { + req, err := lastResults.securityGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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, "network.SecurityGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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) + return +} + +// ListAll gets all network security groups in a subscription. +func (client SecurityGroupsClient) ListAll(ctx context.Context) (result SecurityGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll") + defer func() { + sc := -1 + if result.sglr.Response.Response != nil { + sc = result.sglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.sglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure sending request") + return + } + + result.sglr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.sglr.hasNextLink() && result.sglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client SecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) ListAllResponder(resp *http.Response) (result SecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client SecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { + req, err := lastResults.securityGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result SecurityGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll") + 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.ListAll(ctx) + return +} + +// UpdateTags updates a network security group tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// parameters - parameters supplied to update network security group tags. +func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result SecurityGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/securitypartnerproviders.go b/services/network/mgmt/2021-03-01/network/securitypartnerproviders.go new file mode 100644 index 000000000000..233c5f83bf41 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/securitypartnerproviders.go @@ -0,0 +1,575 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SecurityPartnerProvidersClient is the network Client +type SecurityPartnerProvidersClient struct { + BaseClient +} + +// NewSecurityPartnerProvidersClient creates an instance of the SecurityPartnerProvidersClient client. +func NewSecurityPartnerProvidersClient(subscriptionID string) SecurityPartnerProvidersClient { + return NewSecurityPartnerProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSecurityPartnerProvidersClientWithBaseURI creates an instance of the SecurityPartnerProvidersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSecurityPartnerProvidersClientWithBaseURI(baseURI string, subscriptionID string) SecurityPartnerProvidersClient { + return SecurityPartnerProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Security Partner Provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// securityPartnerProviderName - the name of the Security Partner Provider. +// parameters - parameters supplied to the create or update Security Partner Provider operation. +func (client SecurityPartnerProvidersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider) (result SecurityPartnerProvidersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, securityPartnerProviderName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SecurityPartnerProvidersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityPartnerProviderName": autorest.Encode("path", securityPartnerProviderName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}", 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 SecurityPartnerProvidersClient) CreateOrUpdateSender(req *http.Request) (future SecurityPartnerProvidersCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SecurityPartnerProvidersClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityPartnerProvider, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Security Partner Provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// securityPartnerProviderName - the name of the Security Partner Provider. +func (client SecurityPartnerProvidersClient) Delete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string) (result SecurityPartnerProvidersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, securityPartnerProviderName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SecurityPartnerProvidersClient) DeletePreparer(ctx context.Context, resourceGroupName string, securityPartnerProviderName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityPartnerProviderName": autorest.Encode("path", securityPartnerProviderName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/securityPartnerProviders/{securityPartnerProviderName}", 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 SecurityPartnerProvidersClient) DeleteSender(req *http.Request) (future SecurityPartnerProvidersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SecurityPartnerProvidersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Security Partner Provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// securityPartnerProviderName - the name of the Security Partner Provider. +func (client SecurityPartnerProvidersClient) Get(ctx context.Context, resourceGroupName string, securityPartnerProviderName string) (result SecurityPartnerProvider, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.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, securityPartnerProviderName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SecurityPartnerProvidersClient) GetPreparer(ctx context.Context, resourceGroupName string, securityPartnerProviderName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityPartnerProviderName": autorest.Encode("path", securityPartnerProviderName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/securityPartnerProviders/{securityPartnerProviderName}", 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 SecurityPartnerProvidersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityPartnerProvidersClient) GetResponder(resp *http.Response) (result SecurityPartnerProvider, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the Security Partner Providers in a subscription. +func (client SecurityPartnerProvidersClient) List(ctx context.Context) (result SecurityPartnerProviderListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.List") + defer func() { + sc := -1 + if result.spplr.Response.Response != nil { + sc = result.spplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.spplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "List", resp, "Failure sending request") + return + } + + result.spplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "List", resp, "Failure responding to request") + return + } + if result.spplr.hasNextLink() && result.spplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SecurityPartnerProvidersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders", 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 SecurityPartnerProvidersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SecurityPartnerProvidersClient) ListResponder(resp *http.Response) (result SecurityPartnerProviderListResult, err error) { + err = autorest.Respond( + resp, + 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 SecurityPartnerProvidersClient) listNextResults(ctx context.Context, lastResults SecurityPartnerProviderListResult) (result SecurityPartnerProviderListResult, err error) { + req, err := lastResults.securityPartnerProviderListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "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, "network.SecurityPartnerProvidersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SecurityPartnerProvidersClient) ListComplete(ctx context.Context) (result SecurityPartnerProviderListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.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 lists all Security Partner Providers in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client SecurityPartnerProvidersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SecurityPartnerProviderListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.spplr.Response.Response != nil { + sc = result.spplr.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, "network.SecurityPartnerProvidersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.spplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.spplr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.spplr.hasNextLink() && result.spplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SecurityPartnerProvidersClient) 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 = "2021-03-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.Network/securityPartnerProviders", 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 SecurityPartnerProvidersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SecurityPartnerProvidersClient) ListByResourceGroupResponder(resp *http.Response) (result SecurityPartnerProviderListResult, err error) { + err = autorest.Respond( + resp, + 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 SecurityPartnerProvidersClient) listByResourceGroupNextResults(ctx context.Context, lastResults SecurityPartnerProviderListResult) (result SecurityPartnerProviderListResult, err error) { + req, err := lastResults.securityPartnerProviderListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "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, "network.SecurityPartnerProvidersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SecurityPartnerProvidersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SecurityPartnerProviderListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.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 +} + +// UpdateTags updates tags of a Security Partner Provider resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// securityPartnerProviderName - the name of the Security Partner Provider. +// parameters - parameters supplied to update Security Partner Provider tags. +func (client SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject) (result SecurityPartnerProvider, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProvidersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, securityPartnerProviderName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client SecurityPartnerProvidersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityPartnerProviderName": autorest.Encode("path", securityPartnerProviderName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/securityPartnerProviders/{securityPartnerProviderName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client SecurityPartnerProvidersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client SecurityPartnerProvidersClient) UpdateTagsResponder(resp *http.Response) (result SecurityPartnerProvider, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/securityrules.go b/services/network/mgmt/2021-03-01/network/securityrules.go new file mode 100644 index 000000000000..0c83e7df5e99 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/securityrules.go @@ -0,0 +1,390 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SecurityRulesClient is the network Client +type SecurityRulesClient struct { + BaseClient +} + +// NewSecurityRulesClient creates an instance of the SecurityRulesClient client. +func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { + return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient { + return SecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a security rule in the specified network security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// securityRuleName - the name of the security rule. +// securityRuleParameters - parameters supplied to the create or update network security rule operation. +func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (result SecurityRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityRuleName": autorest.Encode("path", securityRuleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + securityRuleParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", pathParameters), + autorest.WithJSON(securityRuleParameters), + 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 SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified network security rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// securityRuleName - the name of the security rule. +func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityRuleName": autorest.Encode("path", securityRuleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", 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 SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the specified network security rule. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +// securityRuleName - the name of the security rule. +func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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, networkSecurityGroupName, securityRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityRuleName": autorest.Encode("path", securityRuleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", 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 SecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all security rules in a network security group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkSecurityGroupName - the name of the network security group. +func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.List") + defer func() { + sc := -1 + if result.srlr.Response.Response != nil { + sc = result.srlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.srlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure sending request") + return + } + + result.srlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure responding to request") + return + } + if result.srlr.hasNextLink() && result.srlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules", 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 SecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, err error) { + err = autorest.Respond( + resp, + 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 SecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { + req, err := lastResults.securityRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.SecurityRulesClient", "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, "network.SecurityRulesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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, networkSecurityGroupName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/serviceassociationlinks.go b/services/network/mgmt/2021-03-01/network/serviceassociationlinks.go new file mode 100644 index 000000000000..321fc47a9602 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/serviceassociationlinks.go @@ -0,0 +1,110 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ServiceAssociationLinksClient is the network Client +type ServiceAssociationLinksClient struct { + BaseClient +} + +// NewServiceAssociationLinksClient creates an instance of the ServiceAssociationLinksClient client. +func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationLinksClient { + return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { + return ServiceAssociationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of service association links for a subnet. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +func (client ServiceAssociationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ServiceAssociationLinksListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceAssociationLinksClient.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, resourceGroupName, virtualNetworkName, subnetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks", 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 ServiceAssociationLinksClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceAssociationLinksClient) ListResponder(resp *http.Response) (result ServiceAssociationLinksListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/serviceendpointpolicies.go b/services/network/mgmt/2021-03-01/network/serviceendpointpolicies.go new file mode 100644 index 000000000000..bc6f8f7aaf3f --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/serviceendpointpolicies.go @@ -0,0 +1,580 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ServiceEndpointPoliciesClient is the network Client +type ServiceEndpointPoliciesClient struct { + BaseClient +} + +// NewServiceEndpointPoliciesClient creates an instance of the ServiceEndpointPoliciesClient client. +func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoliciesClient { + return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewServiceEndpointPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPoliciesClient { + return ServiceEndpointPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a service Endpoint Policies. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy. +// parameters - parameters supplied to the create or update service endpoint policy operation. +func (client ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (result ServiceEndpointPoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Kind = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified service endpoint policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy. +func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified service Endpoint Policies in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy. +// expand - expands referenced resources. +func (client ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (result ServiceEndpointPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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, serviceEndpointPolicyName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the service endpoint policies in a subscription. +func (client ServiceEndpointPoliciesClient) List(ctx context.Context) (result ServiceEndpointPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.List") + defer func() { + sc := -1 + if result.seplr.Response.Response != nil { + sc = result.seplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.seplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.seplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.seplr.hasNextLink() && result.seplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies", 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 ServiceEndpointPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) ListResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 ServiceEndpointPoliciesClient) listNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) { + req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "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, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceEndpointPoliciesClient) ListComplete(ctx context.Context) (result ServiceEndpointPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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 service endpoint Policies in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.seplr.Response.Response != nil { + sc = result.seplr.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, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.seplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.seplr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.seplr.hasNextLink() && result.seplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ServiceEndpointPoliciesClient) 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 = "2021-03-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.Network/serviceEndpointPolicies", 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 ServiceEndpointPoliciesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 ServiceEndpointPoliciesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) { + req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "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, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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 +} + +// UpdateTags updates tags of a service endpoint policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy. +// parameters - parameters supplied to update service endpoint policy tags. +func (client ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (result ServiceEndpointPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ServiceEndpointPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceEndpointPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) UpdateTagsResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2021-03-01/network/serviceendpointpolicydefinitions.go new file mode 100644 index 000000000000..ee911df8a3d6 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/serviceendpointpolicydefinitions.go @@ -0,0 +1,392 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ServiceEndpointPolicyDefinitionsClient is the network Client +type ServiceEndpointPolicyDefinitionsClient struct { + BaseClient +} + +// NewServiceEndpointPolicyDefinitionsClient creates an instance of the ServiceEndpointPolicyDefinitionsClient client. +func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEndpointPolicyDefinitionsClient { + return NewServiceEndpointPolicyDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the +// ServiceEndpointPolicyDefinitionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPolicyDefinitionsClient { + return ServiceEndpointPolicyDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a service endpoint policy definition in the specified service endpoint policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy. +// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name. +// serviceEndpointPolicyDefinitions - parameters supplied to the create or update service endpoint policy +// operation. +func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (result ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + serviceEndpointPolicyDefinitions.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", pathParameters), + autorest.WithJSON(serviceEndpointPolicyDefinitions), + 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 ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified ServiceEndpoint policy definitions. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the Service Endpoint Policy. +// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition. +func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinitionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", 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 ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the specified service endpoint policy definitions from service endpoint policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy name. +// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name. +func (client ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", 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 ServiceEndpointPolicyDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup gets all service endpoint policy definitions in a service end point policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceEndpointPolicyName - the name of the service endpoint policy name. +func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.sepdlr.Response.Response != nil { + sc = result.sepdlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, serviceEndpointPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.sepdlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.sepdlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.sepdlr.hasNextLink() && result.sepdlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions", 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 ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyDefinitionListResult, err error) { + err = autorest.Respond( + resp, + 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 ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyDefinitionListResult) (result ServiceEndpointPolicyDefinitionListResult, err error) { + req, err := lastResults.serviceEndpointPolicyDefinitionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "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, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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, serviceEndpointPolicyName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/servicetaginformation.go b/services/network/mgmt/2021-03-01/network/servicetaginformation.go new file mode 100644 index 000000000000..7b069f0a2b4f --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/servicetaginformation.go @@ -0,0 +1,158 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ServiceTagInformationClient is the network Client +type ServiceTagInformationClient struct { + BaseClient +} + +// NewServiceTagInformationClient creates an instance of the ServiceTagInformationClient client. +func NewServiceTagInformationClient(subscriptionID string) ServiceTagInformationClient { + return NewServiceTagInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceTagInformationClientWithBaseURI creates an instance of the ServiceTagInformationClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewServiceTagInformationClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagInformationClient { + return ServiceTagInformationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of service tag information resources with pagination. +// Parameters: +// location - the location that will be used as a reference for cloud (not as a filter based on location, you +// will get the list of service tags with prefix details across all regions but limited to the cloud that your +// subscription belongs to). +// noAddressPrefixes - do not return address prefixes for the tag(s). +// tagName - return tag information for a particular tag. +func (client ServiceTagInformationClient) List(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (result ServiceTagInformationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationClient.List") + defer func() { + sc := -1 + if result.stilr.Response.Response != nil { + sc = result.stilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location, noAddressPrefixes, tagName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.stilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "List", resp, "Failure sending request") + return + } + + result.stilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "List", resp, "Failure responding to request") + return + } + if result.stilr.hasNextLink() && result.stilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceTagInformationClient) ListPreparer(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if noAddressPrefixes != nil { + queryParameters["noAddressPrefixes"] = autorest.Encode("query", *noAddressPrefixes) + } + if len(tagName) > 0 { + queryParameters["tagName"] = autorest.Encode("query", tagName) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails", 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 ServiceTagInformationClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceTagInformationClient) ListResponder(resp *http.Response) (result ServiceTagInformationListResult, err error) { + err = autorest.Respond( + resp, + 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 ServiceTagInformationClient) listNextResults(ctx context.Context, lastResults ServiceTagInformationListResult) (result ServiceTagInformationListResult, err error) { + req, err := lastResults.serviceTagInformationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "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, "network.ServiceTagInformationClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceTagInformationClient) ListComplete(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (result ServiceTagInformationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationClient.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, location, noAddressPrefixes, tagName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/servicetags.go b/services/network/mgmt/2021-03-01/network/servicetags.go new file mode 100644 index 000000000000..82cb11f46413 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/servicetags.go @@ -0,0 +1,107 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ServiceTagsClient is the network Client +type ServiceTagsClient struct { + BaseClient +} + +// NewServiceTagsClient creates an instance of the ServiceTagsClient client. +func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { + return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewServiceTagsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagsClient { + return ServiceTagsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of service tag information resources. +// Parameters: +// location - the location that will be used as a reference for version (not as a filter based on location, you +// will get the list of service tags with prefix details across all regions but limited to the cloud that your +// subscription belongs to). +func (client ServiceTagsClient) List(ctx context.Context, location string) (result ServiceTagsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagsClient.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, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceTagsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags", 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 ServiceTagsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceTagsClient) ListResponder(resp *http.Response) (result ServiceTagsListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/subnets.go b/services/network/mgmt/2021-03-01/network/subnets.go new file mode 100644 index 000000000000..df069a6e5b84 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/subnets.go @@ -0,0 +1,560 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SubnetsClient is the network Client +type SubnetsClient struct { + BaseClient +} + +// NewSubnetsClient creates an instance of the SubnetsClient client. +func NewSubnetsClient(subscriptionID string) SubnetsClient { + return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsClient { + return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a subnet in the specified virtual network. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +// subnetParameters - parameters supplied to the create or update subnet operation. +func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (result SubnetsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + subnetParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", pathParameters), + autorest.WithJSON(subnetParameters), + 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 SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result Subnet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified subnet. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result SubnetsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", 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 SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SubnetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified subnet by virtual network and resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +// expand - expands referenced resources. +func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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, virtualNetworkName, subnetName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-01" + 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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", 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 SubnetsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all subnets in a virtual network. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +func (client SubnetsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.List") + defer func() { + sc := -1 + if result.slr.Response.Response != nil { + sc = result.slr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.slr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure sending request") + return + } + + result.slr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure responding to request") + return + } + if result.slr.hasNextLink() && result.slr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/subnets", 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 SubnetsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SubnetsClient) ListResponder(resp *http.Response) (result SubnetListResult, err error) { + err = autorest.Respond( + resp, + 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 SubnetsClient) listNextResults(ctx context.Context, lastResults SubnetListResult) (result SubnetListResult, err error) { + req, err := lastResults.subnetListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.SubnetsClient", "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, "network.SubnetsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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, virtualNetworkName) + return +} + +// PrepareNetworkPolicies prepares a subnet by applying network intent policies. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +// prepareNetworkPoliciesRequestParameters - parameters supplied to prepare subnet by applying network intent +// policies. +func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (result SubnetsPrepareNetworkPoliciesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.PrepareNetworkPolicies") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PrepareNetworkPoliciesPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure preparing request") + return + } + + result, err = client.PrepareNetworkPoliciesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure sending request") + return + } + + return +} + +// PrepareNetworkPoliciesPreparer prepares the PrepareNetworkPolicies request. +func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies", pathParameters), + autorest.WithJSON(prepareNetworkPoliciesRequestParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PrepareNetworkPoliciesSender sends the PrepareNetworkPolicies request. The method will close the +// http.Response Body if it receives an error. +func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PrepareNetworkPoliciesResponder handles the response to the PrepareNetworkPolicies request. The method always +// closes the http.Response Body. +func (client SubnetsClient) PrepareNetworkPoliciesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// UnprepareNetworkPolicies unprepares a subnet by removing network intent policies. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +// unprepareNetworkPoliciesRequestParameters - parameters supplied to unprepare subnet to remove network intent +// policies. +func (client SubnetsClient) UnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest) (result SubnetsUnprepareNetworkPoliciesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.UnprepareNetworkPolicies") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UnprepareNetworkPoliciesPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", nil, "Failure preparing request") + return + } + + result, err = client.UnprepareNetworkPoliciesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", nil, "Failure sending request") + return + } + + return +} + +// UnprepareNetworkPoliciesPreparer prepares the UnprepareNetworkPolicies request. +func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies", pathParameters), + autorest.WithJSON(unprepareNetworkPoliciesRequestParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnprepareNetworkPoliciesSender sends the UnprepareNetworkPolicies request. The method will close the +// http.Response Body if it receives an error. +func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UnprepareNetworkPoliciesResponder handles the response to the UnprepareNetworkPolicies request. The method always +// closes the http.Response Body. +func (client SubnetsClient) UnprepareNetworkPoliciesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2021-03-01/network/usages.go b/services/network/mgmt/2021-03-01/network/usages.go new file mode 100644 index 000000000000..59ec078b8b69 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/usages.go @@ -0,0 +1,154 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// UsagesClient is the network Client +type UsagesClient struct { + BaseClient +} + +// NewUsagesClient creates an instance of the UsagesClient client. +func NewUsagesClient(subscriptionID string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list network usages for a subscription. +// Parameters: +// location - the location where resource usage is queried. +func (client UsagesClient) List(ctx context.Context, location string) (result UsagesListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List") + defer func() { + sc := -1 + if result.ulr.Response.Response != nil { + sc = result.ulr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._ ]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.UsagesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ulr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure sending request") + return + } + + result.ulr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure responding to request") + return + } + if result.ulr.hasNextLink() && result.ulr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client UsagesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages", 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 UsagesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client UsagesClient) ListResponder(resp *http.Response) (result UsagesListResult, err error) { + err = autorest.Respond( + resp, + 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 UsagesClient) listNextResults(ctx context.Context, lastResults UsagesListResult) (result UsagesListResult, err error) { + req, err := lastResults.usagesListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.UsagesClient", "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, "network.UsagesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client UsagesClient) ListComplete(ctx context.Context, location string) (result UsagesListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.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, location) + return +} diff --git a/services/network/mgmt/2021-03-01/network/version.go b/services/network/mgmt/2021-03-01/network/version.go new file mode 100644 index 000000000000..b93ad07b0881 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/version.go @@ -0,0 +1,19 @@ +package network + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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() + " network/2021-03-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/network/mgmt/2021-03-01/network/virtualappliances.go b/services/network/mgmt/2021-03-01/network/virtualappliances.go new file mode 100644 index 000000000000..81ecd33aafd9 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualappliances.go @@ -0,0 +1,591 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualAppliancesClient is the network Client +type VirtualAppliancesClient struct { + BaseClient +} + +// NewVirtualAppliancesClient creates an instance of the VirtualAppliancesClient client. +func NewVirtualAppliancesClient(subscriptionID string) VirtualAppliancesClient { + return NewVirtualAppliancesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualAppliancesClientWithBaseURI creates an instance of the VirtualAppliancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewVirtualAppliancesClientWithBaseURI(baseURI string, subscriptionID string) VirtualAppliancesClient { + return VirtualAppliancesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Network Virtual Appliance. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of Network Virtual Appliance. +// parameters - parameters supplied to the create or update Network Virtual Appliance. +func (client VirtualAppliancesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance) (result VirtualAppliancesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualAppliancePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualAppliancePropertiesFormat.VirtualApplianceAsn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualAppliancePropertiesFormat.VirtualApplianceAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualAppliancePropertiesFormat.VirtualApplianceAsn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualAppliancesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkVirtualApplianceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualAppliancesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}", 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 VirtualAppliancesClient) CreateOrUpdateSender(req *http.Request) (future VirtualAppliancesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualAppliancesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualAppliance, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Network Virtual Appliance. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of Network Virtual Appliance. +func (client VirtualAppliancesClient) Delete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (result VirtualAppliancesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkVirtualApplianceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualAppliancesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkVirtualAppliances/{networkVirtualApplianceName}", 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 VirtualAppliancesClient) DeleteSender(req *http.Request) (future VirtualAppliancesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualAppliancesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Network Virtual Appliance. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of Network Virtual Appliance. +// expand - expands referenced resources. +func (client VirtualAppliancesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, expand string) (result VirtualAppliance, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.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, networkVirtualApplianceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualAppliancesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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.Network/networkVirtualAppliances/{networkVirtualApplianceName}", 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 VirtualAppliancesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualAppliancesClient) GetResponder(resp *http.Response) (result VirtualAppliance, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all Network Virtual Appliances in a subscription. +func (client VirtualAppliancesClient) List(ctx context.Context) (result VirtualApplianceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.List") + defer func() { + sc := -1 + if result.valr.Response.Response != nil { + sc = result.valr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.valr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "List", resp, "Failure sending request") + return + } + + result.valr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "List", resp, "Failure responding to request") + return + } + if result.valr.hasNextLink() && result.valr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualAppliancesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances", 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 VirtualAppliancesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualAppliancesClient) ListResponder(resp *http.Response) (result VirtualApplianceListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualAppliancesClient) listNextResults(ctx context.Context, lastResults VirtualApplianceListResult) (result VirtualApplianceListResult, err error) { + req, err := lastResults.virtualApplianceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "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, "network.VirtualAppliancesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualAppliancesClient) ListComplete(ctx context.Context) (result VirtualApplianceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.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 lists all Network Virtual Appliances in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualAppliancesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualApplianceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.valr.Response.Response != nil { + sc = result.valr.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, "network.VirtualAppliancesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.valr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.valr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.valr.hasNextLink() && result.valr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualAppliancesClient) 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 = "2021-03-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.Network/networkVirtualAppliances", 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 VirtualAppliancesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualAppliancesClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualApplianceListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualAppliancesClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualApplianceListResult) (result VirtualApplianceListResult, err error) { + req, err := lastResults.virtualApplianceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "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, "network.VirtualAppliancesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualAppliancesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualApplianceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.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 +} + +// UpdateTags updates a Network Virtual Appliance. +// Parameters: +// resourceGroupName - the resource group name of Network Virtual Appliance. +// networkVirtualApplianceName - the name of Network Virtual Appliance being updated. +// parameters - parameters supplied to Update Network Virtual Appliance Tags. +func (client VirtualAppliancesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject) (result VirtualAppliance, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualAppliancesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkVirtualApplianceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualAppliancesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkVirtualAppliances/{networkVirtualApplianceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualAppliancesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualAppliancesClient) UpdateTagsResponder(resp *http.Response) (result VirtualAppliance, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualappliancesites.go b/services/network/mgmt/2021-03-01/network/virtualappliancesites.go new file mode 100644 index 000000000000..6d41f87a6721 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualappliancesites.go @@ -0,0 +1,392 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualApplianceSitesClient is the network Client +type VirtualApplianceSitesClient struct { + BaseClient +} + +// NewVirtualApplianceSitesClient creates an instance of the VirtualApplianceSitesClient client. +func NewVirtualApplianceSitesClient(subscriptionID string) VirtualApplianceSitesClient { + return NewVirtualApplianceSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualApplianceSitesClientWithBaseURI creates an instance of the VirtualApplianceSitesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualApplianceSitesClientWithBaseURI(baseURI string, subscriptionID string) VirtualApplianceSitesClient { + return VirtualApplianceSitesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Network Virtual Appliance Site. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of the Network Virtual Appliance. +// siteName - the name of the site. +// parameters - parameters supplied to the create or update Network Virtual Appliance Site operation. +func (client VirtualApplianceSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite) (result VirtualApplianceSitesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSitesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualApplianceSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteName": autorest.Encode("path", siteName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", 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 VirtualApplianceSitesClient) CreateOrUpdateSender(req *http.Request) (future VirtualApplianceSitesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualApplianceSitesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualApplianceSite, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified site from a Virtual Appliance. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of the Network Virtual Appliance. +// siteName - the name of the site. +func (client VirtualApplianceSitesClient) Delete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string) (result VirtualApplianceSitesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSitesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkVirtualApplianceName, siteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualApplianceSitesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteName": autorest.Encode("path", siteName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", 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 VirtualApplianceSitesClient) DeleteSender(req *http.Request) (future VirtualApplianceSitesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualApplianceSitesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Virtual Appliance Site. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of the Network Virtual Appliance. +// siteName - the name of the site. +func (client VirtualApplianceSitesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string) (result VirtualApplianceSite, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSitesClient.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, networkVirtualApplianceName, siteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualApplianceSitesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteName": autorest.Encode("path", siteName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}", 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 VirtualApplianceSitesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualApplianceSitesClient) GetResponder(resp *http.Response) (result VirtualApplianceSite, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkVirtualApplianceName - the name of the Network Virtual Appliance. +func (client VirtualApplianceSitesClient) List(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (result VirtualApplianceSiteListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSitesClient.List") + defer func() { + sc := -1 + if result.vaslr.Response.Response != nil { + sc = result.vaslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, networkVirtualApplianceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vaslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "List", resp, "Failure sending request") + return + } + + result.vaslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "List", resp, "Failure responding to request") + return + } + if result.vaslr.hasNextLink() && result.vaslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualApplianceSitesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkVirtualApplianceName": autorest.Encode("path", networkVirtualApplianceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites", 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 VirtualApplianceSitesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualApplianceSitesClient) ListResponder(resp *http.Response) (result VirtualApplianceSiteListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualApplianceSitesClient) listNextResults(ctx context.Context, lastResults VirtualApplianceSiteListResult) (result VirtualApplianceSiteListResult, err error) { + req, err := lastResults.virtualApplianceSiteListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "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, "network.VirtualApplianceSitesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualApplianceSitesClient) ListComplete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string) (result VirtualApplianceSiteListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSitesClient.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, networkVirtualApplianceName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualapplianceskus.go b/services/network/mgmt/2021-03-01/network/virtualapplianceskus.go new file mode 100644 index 000000000000..2ca7ccffcce1 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualapplianceskus.go @@ -0,0 +1,219 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualApplianceSkusClient is the network Client +type VirtualApplianceSkusClient struct { + BaseClient +} + +// NewVirtualApplianceSkusClient creates an instance of the VirtualApplianceSkusClient client. +func NewVirtualApplianceSkusClient(subscriptionID string) VirtualApplianceSkusClient { + return NewVirtualApplianceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualApplianceSkusClientWithBaseURI creates an instance of the VirtualApplianceSkusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewVirtualApplianceSkusClientWithBaseURI(baseURI string, subscriptionID string) VirtualApplianceSkusClient { + return VirtualApplianceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves a single available sku for network virtual appliance. +// Parameters: +// skuName - name of the Sku. +func (client VirtualApplianceSkusClient) Get(ctx context.Context, skuName string) (result VirtualApplianceSku, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkusClient.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, skuName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualApplianceSkusClient) GetPreparer(ctx context.Context, skuName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "skuName": autorest.Encode("path", skuName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}", 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 VirtualApplianceSkusClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualApplianceSkusClient) GetResponder(resp *http.Response) (result VirtualApplianceSku, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all SKUs available for a virtual appliance. +func (client VirtualApplianceSkusClient) List(ctx context.Context) (result VirtualApplianceSkuListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkusClient.List") + defer func() { + sc := -1 + if result.vaslr.Response.Response != nil { + sc = result.vaslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vaslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "List", resp, "Failure sending request") + return + } + + result.vaslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "List", resp, "Failure responding to request") + return + } + if result.vaslr.hasNextLink() && result.vaslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualApplianceSkusClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus", 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 VirtualApplianceSkusClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualApplianceSkusClient) ListResponder(resp *http.Response) (result VirtualApplianceSkuListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualApplianceSkusClient) listNextResults(ctx context.Context, lastResults VirtualApplianceSkuListResult) (result VirtualApplianceSkuListResult, err error) { + req, err := lastResults.virtualApplianceSkuListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "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, "network.VirtualApplianceSkusClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualApplianceSkusClient) ListComplete(ctx context.Context) (result VirtualApplianceSkuListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkusClient.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/network/mgmt/2021-03-01/network/virtualhubbgpconnection.go b/services/network/mgmt/2021-03-01/network/virtualhubbgpconnection.go new file mode 100644 index 000000000000..8c201aa8ba5c --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualhubbgpconnection.go @@ -0,0 +1,287 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualHubBgpConnectionClient is the network Client +type VirtualHubBgpConnectionClient struct { + BaseClient +} + +// NewVirtualHubBgpConnectionClient creates an instance of the VirtualHubBgpConnectionClient client. +func NewVirtualHubBgpConnectionClient(subscriptionID string) VirtualHubBgpConnectionClient { + return NewVirtualHubBgpConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubBgpConnectionClientWithBaseURI creates an instance of the VirtualHubBgpConnectionClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualHubBgpConnectionClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubBgpConnectionClient { + return VirtualHubBgpConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing +// VirtualHubBgpConnection. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the connection. +// parameters - parameters of Bgp connection. +func (client VirtualHubBgpConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection) (result VirtualHubBgpConnectionCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BgpConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BgpConnectionProperties.PeerAsn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BgpConnectionProperties.PeerAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.BgpConnectionProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualHubBgpConnectionClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, connectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualHubBgpConnectionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}", 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 VirtualHubBgpConnectionClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubBgpConnectionCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubBgpConnectionClient) CreateOrUpdateResponder(resp *http.Response) (result BgpConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualHubBgpConnection. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHubBgpConnection. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the connection. +func (client VirtualHubBgpConnectionClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result VirtualHubBgpConnectionDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualHubBgpConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}", 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 VirtualHubBgpConnectionClient) DeleteSender(req *http.Request) (future VirtualHubBgpConnectionDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubBgpConnectionClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a Virtual Hub Bgp Connection. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the connection. +func (client VirtualHubBgpConnectionClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result BgpConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionClient.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, virtualHubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualHubBgpConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}", 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 VirtualHubBgpConnectionClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubBgpConnectionClient) GetResponder(resp *http.Response) (result BgpConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualhubbgpconnections.go b/services/network/mgmt/2021-03-01/network/virtualhubbgpconnections.go new file mode 100644 index 000000000000..8a8d7b1c5ee3 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualhubbgpconnections.go @@ -0,0 +1,310 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualHubBgpConnectionsClient is the network Client +type VirtualHubBgpConnectionsClient struct { + BaseClient +} + +// NewVirtualHubBgpConnectionsClient creates an instance of the VirtualHubBgpConnectionsClient client. +func NewVirtualHubBgpConnectionsClient(subscriptionID string) VirtualHubBgpConnectionsClient { + return NewVirtualHubBgpConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubBgpConnectionsClientWithBaseURI creates an instance of the VirtualHubBgpConnectionsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewVirtualHubBgpConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubBgpConnectionsClient { + return VirtualHubBgpConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List retrieves the details of all VirtualHubBgpConnections. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubBgpConnectionsClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubBgpConnectionResultsPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionsClient.List") + defer func() { + sc := -1 + if result.lvhbcr.Response.Response != nil { + sc = result.lvhbcr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvhbcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.lvhbcr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.lvhbcr.hasNextLink() && result.lvhbcr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualHubBgpConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/bgpConnections", 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 VirtualHubBgpConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubBgpConnectionsClient) ListResponder(resp *http.Response) (result ListVirtualHubBgpConnectionResults, err error) { + err = autorest.Respond( + resp, + 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 VirtualHubBgpConnectionsClient) listNextResults(ctx context.Context, lastResults ListVirtualHubBgpConnectionResults) (result ListVirtualHubBgpConnectionResults, err error) { + req, err := lastResults.listVirtualHubBgpConnectionResultsPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "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, "network.VirtualHubBgpConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubBgpConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubBgpConnectionResultsIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionsClient.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, virtualHubName) + return +} + +// ListAdvertisedRoutes retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. +// Parameters: +// resourceGroupName - the name of the resource group. +// hubName - the name of the virtual hub. +// connectionName - the name of the virtual hub bgp connection. +func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string) (result VirtualHubBgpConnectionsListAdvertisedRoutesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionsClient.ListAdvertisedRoutes") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAdvertisedRoutesPreparer(ctx, resourceGroupName, hubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListAdvertisedRoutes", nil, "Failure preparing request") + return + } + + result, err = client.ListAdvertisedRoutesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListAdvertisedRoutes", nil, "Failure sending request") + return + } + + return +} + +// ListAdvertisedRoutesPreparer prepares the ListAdvertisedRoutes request. +func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutesPreparer(ctx context.Context, resourceGroupName string, hubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "hubName": autorest.Encode("path", hubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAdvertisedRoutesSender sends the ListAdvertisedRoutes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutesSender(req *http.Request) (future VirtualHubBgpConnectionsListAdvertisedRoutesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListAdvertisedRoutesResponder handles the response to the ListAdvertisedRoutes request. The method always +// closes the http.Response Body. +func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutesResponder(resp *http.Response) (result PeerRouteList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListLearnedRoutes retrieves a list of routes the virtual hub bgp connection has learned. +// Parameters: +// resourceGroupName - the name of the resource group. +// hubName - the name of the virtual hub. +// connectionName - the name of the virtual hub bgp connection. +func (client VirtualHubBgpConnectionsClient) ListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string) (result VirtualHubBgpConnectionsListLearnedRoutesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubBgpConnectionsClient.ListLearnedRoutes") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListLearnedRoutesPreparer(ctx, resourceGroupName, hubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListLearnedRoutes", nil, "Failure preparing request") + return + } + + result, err = client.ListLearnedRoutesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListLearnedRoutes", nil, "Failure sending request") + return + } + + return +} + +// ListLearnedRoutesPreparer prepares the ListLearnedRoutes request. +func (client VirtualHubBgpConnectionsClient) ListLearnedRoutesPreparer(ctx context.Context, resourceGroupName string, hubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "hubName": autorest.Encode("path", hubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListLearnedRoutesSender sends the ListLearnedRoutes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubBgpConnectionsClient) ListLearnedRoutesSender(req *http.Request) (future VirtualHubBgpConnectionsListLearnedRoutesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListLearnedRoutesResponder handles the response to the ListLearnedRoutes request. The method always +// closes the http.Response Body. +func (client VirtualHubBgpConnectionsClient) ListLearnedRoutesResponder(resp *http.Response) (result PeerRouteList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualhubipconfiguration.go b/services/network/mgmt/2021-03-01/network/virtualhubipconfiguration.go new file mode 100644 index 000000000000..1a088ecc6d67 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualhubipconfiguration.go @@ -0,0 +1,411 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualHubIPConfigurationClient is the network Client +type VirtualHubIPConfigurationClient struct { + BaseClient +} + +// NewVirtualHubIPConfigurationClient creates an instance of the VirtualHubIPConfigurationClient client. +func NewVirtualHubIPConfigurationClient(subscriptionID string) VirtualHubIPConfigurationClient { + return NewVirtualHubIPConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubIPConfigurationClientWithBaseURI creates an instance of the VirtualHubIPConfigurationClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewVirtualHubIPConfigurationClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubIPConfigurationClient { + return VirtualHubIPConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing +// VirtualHubIpConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// IPConfigName - the name of the ipconfig. +// parameters - hub Ip Configuration parameters. +func (client VirtualHubIPConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string, parameters HubIPConfiguration) (result VirtualHubIPConfigurationCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubIPConfigurationClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualHubIPConfigurationClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, IPConfigName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualHubIPConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string, parameters HubIPConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigName": autorest.Encode("path", IPConfigName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}", 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 VirtualHubIPConfigurationClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubIPConfigurationCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubIPConfigurationClient) CreateOrUpdateResponder(resp *http.Response) (result HubIPConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualHubIpConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHubBgpConnection. +// virtualHubName - the name of the VirtualHub. +// IPConfigName - the name of the ipconfig. +func (client VirtualHubIPConfigurationClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string) (result VirtualHubIPConfigurationDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubIPConfigurationClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, IPConfigName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualHubIPConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigName": autorest.Encode("path", IPConfigName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}", 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 VirtualHubIPConfigurationClient) DeleteSender(req *http.Request) (future VirtualHubIPConfigurationDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubIPConfigurationClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a Virtual Hub Ip configuration. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// IPConfigName - the name of the ipconfig. +func (client VirtualHubIPConfigurationClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string) (result HubIPConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubIPConfigurationClient.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, virtualHubName, IPConfigName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualHubIPConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, IPConfigName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigName": autorest.Encode("path", IPConfigName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}", 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 VirtualHubIPConfigurationClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubIPConfigurationClient) GetResponder(resp *http.Response) (result HubIPConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all VirtualHubIpConfigurations. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubIPConfigurationClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubIPConfigurationResultsPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubIPConfigurationClient.List") + defer func() { + sc := -1 + if result.lvhicr.Response.Response != nil { + sc = result.lvhicr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvhicr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "List", resp, "Failure sending request") + return + } + + result.lvhicr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "List", resp, "Failure responding to request") + return + } + if result.lvhicr.hasNextLink() && result.lvhicr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualHubIPConfigurationClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/ipConfigurations", 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 VirtualHubIPConfigurationClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubIPConfigurationClient) ListResponder(resp *http.Response) (result ListVirtualHubIPConfigurationResults, err error) { + err = autorest.Respond( + resp, + 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 VirtualHubIPConfigurationClient) listNextResults(ctx context.Context, lastResults ListVirtualHubIPConfigurationResults) (result ListVirtualHubIPConfigurationResults, err error) { + req, err := lastResults.listVirtualHubIPConfigurationResultsPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "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, "network.VirtualHubIPConfigurationClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubIPConfigurationClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubIPConfigurationResultsIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubIPConfigurationClient.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, virtualHubName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualhubroutetablev2s.go b/services/network/mgmt/2021-03-01/network/virtualhubroutetablev2s.go new file mode 100644 index 000000000000..ecec82af773c --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualhubroutetablev2s.go @@ -0,0 +1,392 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualHubRouteTableV2sClient is the network Client +type VirtualHubRouteTableV2sClient struct { + BaseClient +} + +// NewVirtualHubRouteTableV2sClient creates an instance of the VirtualHubRouteTableV2sClient client. +func NewVirtualHubRouteTableV2sClient(subscriptionID string) VirtualHubRouteTableV2sClient { + return NewVirtualHubRouteTableV2sClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubRouteTableV2sClientWithBaseURI creates an instance of the VirtualHubRouteTableV2sClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualHubRouteTableV2sClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubRouteTableV2sClient { + return VirtualHubRouteTableV2sClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing +// VirtualHubRouteTableV2. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the VirtualHubRouteTableV2. +// virtualHubRouteTableV2Parameters - parameters supplied to create or update VirtualHubRouteTableV2. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2) (result VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + virtualHubRouteTableV2Parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", pathParameters), + autorest.WithJSON(virtualHubRouteTableV2Parameters), + 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 VirtualHubRouteTableV2sClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHubRouteTableV2, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualHubRouteTableV2. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHubRouteTableV2. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the VirtualHubRouteTableV2. +func (client VirtualHubRouteTableV2sClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result VirtualHubRouteTableV2sDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualHubRouteTableV2sClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", 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 VirtualHubRouteTableV2sClient) DeleteSender(req *http.Request) (future VirtualHubRouteTableV2sDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VirtualHubRouteTableV2. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHubRouteTableV2. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the VirtualHubRouteTableV2. +func (client VirtualHubRouteTableV2sClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result VirtualHubRouteTableV2, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.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, virtualHubName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualHubRouteTableV2sClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", 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 VirtualHubRouteTableV2sClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) GetResponder(resp *http.Response) (result VirtualHubRouteTableV2, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all VirtualHubRouteTableV2s. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubRouteTableV2sClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubRouteTableV2sResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.List") + defer func() { + sc := -1 + if result.lvhrtvr.Response.Response != nil { + sc = result.lvhrtvr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvhrtvr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", resp, "Failure sending request") + return + } + + result.lvhrtvr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", resp, "Failure responding to request") + return + } + if result.lvhrtvr.hasNextLink() && result.lvhrtvr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualHubRouteTableV2sClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/routeTables", 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 VirtualHubRouteTableV2sClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) ListResponder(resp *http.Response) (result ListVirtualHubRouteTableV2sResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualHubRouteTableV2sClient) listNextResults(ctx context.Context, lastResults ListVirtualHubRouteTableV2sResult) (result ListVirtualHubRouteTableV2sResult, err error) { + req, err := lastResults.listVirtualHubRouteTableV2sResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "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, "network.VirtualHubRouteTableV2sClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubRouteTableV2sClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubRouteTableV2sResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.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, virtualHubName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualhubs.go b/services/network/mgmt/2021-03-01/network/virtualhubs.go new file mode 100644 index 000000000000..2b80914b7ad1 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualhubs.go @@ -0,0 +1,671 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualHubsClient is the network Client +type VirtualHubsClient struct { + BaseClient +} + +// NewVirtualHubsClient creates an instance of the VirtualHubsClient client. +func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { + return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualHubsClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubsClient { + return VirtualHubsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// virtualHubParameters - parameters supplied to create or update VirtualHub. +func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (result VirtualHubsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: virtualHubParameters, + Constraints: []validation.Constraint{{Target: "virtualHubParameters.VirtualHubProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "virtualHubParameters.VirtualHubProperties.VirtualRouterAsn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "virtualHubParameters.VirtualHubProperties.VirtualRouterAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "virtualHubParameters.VirtualHubProperties.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualHubsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + virtualHubParameters.Etag = nil + virtualHubParameters.Kind = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", pathParameters), + autorest.WithJSON(virtualHubParameters), + 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 VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHubsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHub, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) GetResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetEffectiveVirtualHubRoutes gets the effective routes configured for the Virtual Hub resource or the specified +// resource . +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// effectiveRoutesParameters - parameters supplied to get the effective routes for a specific resource. +func (client VirtualHubsClient) GetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, effectiveRoutesParameters *EffectiveRoutesParameters) (result VirtualHubsGetEffectiveVirtualHubRoutesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.GetEffectiveVirtualHubRoutes") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetEffectiveVirtualHubRoutesPreparer(ctx, resourceGroupName, virtualHubName, effectiveRoutesParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "GetEffectiveVirtualHubRoutes", nil, "Failure preparing request") + return + } + + result, err = client.GetEffectiveVirtualHubRoutesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "GetEffectiveVirtualHubRoutes", nil, "Failure sending request") + return + } + + return +} + +// GetEffectiveVirtualHubRoutesPreparer prepares the GetEffectiveVirtualHubRoutes request. +func (client VirtualHubsClient) GetEffectiveVirtualHubRoutesPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, effectiveRoutesParameters *EffectiveRoutesParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}/effectiveRoutes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if effectiveRoutesParameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(effectiveRoutesParameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetEffectiveVirtualHubRoutesSender sends the GetEffectiveVirtualHubRoutes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubsClient) GetEffectiveVirtualHubRoutesSender(req *http.Request) (future VirtualHubsGetEffectiveVirtualHubRoutesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetEffectiveVirtualHubRoutesResponder handles the response to the GetEffectiveVirtualHubRoutes request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) GetEffectiveVirtualHubRoutesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// List lists all the VirtualHubs in a subscription. +func (client VirtualHubsClient) List(ctx context.Context) (result ListVirtualHubsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.List") + defer func() { + sc := -1 + if result.lvhr.Response.Response != nil { + sc = result.lvhr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvhr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure sending request") + return + } + + result.lvhr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure responding to request") + return + } + if result.lvhr.hasNextLink() && result.lvhr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs", 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 VirtualHubsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) ListResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualHubsClient) listNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) { + req, err := lastResults.listVirtualHubsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "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, "network.VirtualHubsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubsClient) ListComplete(ctx context.Context) (result ListVirtualHubsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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 lists all the VirtualHubs in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +func (client VirtualHubsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lvhr.Response.Response != nil { + sc = result.lvhr.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, "network.VirtualHubsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvhr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvhr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvhr.hasNextLink() && result.lvhr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualHubsClient) 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 = "2021-03-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.Network/virtualHubs", 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 VirtualHubsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualHubsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) { + req, err := lastResults.listVirtualHubsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "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, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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 +} + +// UpdateTags updates VirtualHub tags. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// virtualHubParameters - parameters supplied to update VirtualHub tags. +func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHub, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-03-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.Network/virtualHubs/{virtualHubName}", pathParameters), + autorest.WithJSON(virtualHubParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) UpdateTagsResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2021-03-01/network/virtualnetworkgatewayconnections.go new file mode 100644 index 000000000000..9583948be0e0 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualnetworkgatewayconnections.go @@ -0,0 +1,1086 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualNetworkGatewayConnectionsClient is the network Client +type VirtualNetworkGatewayConnectionsClient struct { + BaseClient +} + +// NewVirtualNetworkGatewayConnectionsClient creates an instance of the VirtualNetworkGatewayConnectionsClient client. +func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNetworkGatewayConnectionsClient { + return NewVirtualNetworkGatewayConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the +// VirtualNetworkGatewayConnectionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayConnectionsClient { + return VirtualNetworkGatewayConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a virtual network gateway connection in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. +// parameters - parameters supplied to the create or update virtual network gateway connection operation. +func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (result VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}, + }}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}, + }}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", 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 VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified virtual network Gateway connection. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. +func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}", 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 VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified virtual network gateway connection by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. +func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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, virtualNetworkGatewayConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}", 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 VirtualNetworkGatewayConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetIkeSas lists IKE Security Associations for the virtual network gateway connection in the specified resource +// group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway Connection. +func (client VirtualNetworkGatewayConnectionsClient) GetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsGetIkeSasFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.GetIkeSas") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetIkeSasPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetIkeSas", nil, "Failure preparing request") + return + } + + result, err = client.GetIkeSasSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetIkeSas", nil, "Failure sending request") + return + } + + return +} + +// GetIkeSasPreparer prepares the GetIkeSas request. +func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetIkeSasSender sends the GetIkeSas request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasSender(req *http.Request) (future VirtualNetworkGatewayConnectionsGetIkeSasFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetIkeSasResponder handles the response to the GetIkeSas request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSharedKey the Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified +// virtual network gateway connection shared key through Network resource provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the virtual network gateway connection shared key name. +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKey, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.GetSharedKey") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", nil, "Failure preparing request") + return + } + + resp, err := client.GetSharedKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure sending request") + return + } + + result, err = client.GetSharedKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure responding to request") + return + } + + return +} + +// GetSharedKeyPreparer prepares the GetSharedKey request. +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSharedKeySender sends the GetSharedKey request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetSharedKeyResponder handles the response to the GetSharedKey request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections +// created. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.List") + defer func() { + sc := -1 + if result.vngclr.Response.Response != nil { + sc = result.vngclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vngclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.vngclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.vngclr.hasNextLink() && result.vngclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(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 = "2021-03-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.Network/connections", 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 VirtualNetworkGatewayConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualNetworkGatewayConnectionsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) { + req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "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, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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) + return +} + +// ResetConnection resets the virtual network gateway connection specified. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway Connection. +func (client VirtualNetworkGatewayConnectionsClient) ResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsResetConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.ResetConnection") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetConnectionPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetConnection", nil, "Failure preparing request") + return + } + + result, err = client.ResetConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetConnection", nil, "Failure sending request") + return + } + + return +} + +// ResetConnectionPreparer prepares the ResetConnection request. +func (client VirtualNetworkGatewayConnectionsClient) ResetConnectionPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetConnectionSender sends the ResetConnection request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) ResetConnectionSender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetConnectionFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetConnectionResponder handles the response to the ResetConnection request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) ResetConnectionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResetSharedKey the VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway +// connection shared key for passed virtual network gateway connection in the specified resource group through Network +// resource provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the virtual network gateway connection reset shared key Name. +// parameters - parameters supplied to the begin reset virtual network gateway connection shared key operation +// through network resource provider. +func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (result VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.ResetSharedKey") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {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: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) + } + + req, err := client.ResetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure preparing request") + return + } + + result, err = client.ResetSharedKeySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure sending request") + return + } + + return +} + +// ResetSharedKeyPreparer prepares the ResetSharedKey request. +func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetSharedKeySender sends the ResetSharedKey request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetSharedKeyResponder handles the response to the ResetSharedKey request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(resp *http.Response) (result ConnectionResetSharedKey, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetSharedKey the Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection +// shared key for passed virtual network gateway connection in the specified resource group through Network resource +// provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the virtual network gateway connection name. +// parameters - parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation +// throughNetwork resource provider. +func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (result VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.SetSharedKey") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", err.Error()) + } + + req, err := client.SetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure preparing request") + return + } + + result, err = client.SetSharedKeySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure sending request") + return + } + + return +} + +// SetSharedKeyPreparer prepares the SetSharedKey request. +func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetSharedKeySender sends the SetSharedKey request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// SetSharedKeyResponder handles the response to the SetSharedKey request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StartPacketCapture starts packet capture on virtual network gateway connection in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. +// parameters - virtual network gateway packet capture parameters supplied to start packet capture on gateway +// connection. +func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters *VpnPacketCaptureStartParameters) (result VirtualNetworkGatewayConnectionsStartPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.StartPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPacketCapturePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StartPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StartPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StartPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StartPacketCapturePreparer prepares the StartPacketCapture request. +func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapturePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters *VpnPacketCaptureStartParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartPacketCaptureSender sends the StartPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewayConnectionsStartPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartPacketCaptureResponder handles the response to the StartPacketCapture request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StopPacketCapture stops packet capture on virtual network gateway connection in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway Connection. +// parameters - virtual network gateway packet capture parameters supplied to stop packet capture on gateway +// connection. +func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnPacketCaptureStopParameters) (result VirtualNetworkGatewayConnectionsStopPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.StopPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPacketCapturePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StopPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StopPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StopPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StopPacketCapturePreparer prepares the StopPacketCapture request. +func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapturePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnPacketCaptureStopParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopPacketCaptureSender sends the StopPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewayConnectionsStopPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopPacketCaptureResponder handles the response to the StopPacketCapture request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates a virtual network gateway connection tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. +// parameters - parameters supplied to update virtual network gateway connection tags. +func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (result VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualnetworkgatewaynatrules.go b/services/network/mgmt/2021-03-01/network/virtualnetworkgatewaynatrules.go new file mode 100644 index 000000000000..8ecbb5e2cbdc --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualnetworkgatewaynatrules.go @@ -0,0 +1,393 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualNetworkGatewayNatRulesClient is the network Client +type VirtualNetworkGatewayNatRulesClient struct { + BaseClient +} + +// NewVirtualNetworkGatewayNatRulesClient creates an instance of the VirtualNetworkGatewayNatRulesClient client. +func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string) VirtualNetworkGatewayNatRulesClient { + return NewVirtualNetworkGatewayNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkGatewayNatRulesClientWithBaseURI creates an instance of the VirtualNetworkGatewayNatRulesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewVirtualNetworkGatewayNatRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayNatRulesClient { + return VirtualNetworkGatewayNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the +// existing nat rules. +// Parameters: +// resourceGroupName - the resource group name of the Virtual Network Gateway. +// virtualNetworkGatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +// natRuleParameters - parameters supplied to create or Update a Nat Rule. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule) (result VirtualNetworkGatewayNatRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + natRuleParameters.Etag = nil + natRuleParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", pathParameters), + autorest.WithJSON(natRuleParameters), + 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 VirtualNetworkGatewayNatRulesClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayNatRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGatewayNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a nat rule. +// Parameters: +// resourceGroupName - the resource group name of the Virtual Network Gateway. +// virtualNetworkGatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +func (client VirtualNetworkGatewayNatRulesClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (result VirtualNetworkGatewayNatRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkGatewayNatRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", 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 VirtualNetworkGatewayNatRulesClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayNatRulesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a nat rule. +// Parameters: +// resourceGroupName - the resource group name of the Virtual Network Gateway. +// virtualNetworkGatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +func (client VirtualNetworkGatewayNatRulesClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (result VirtualNetworkGatewayNatRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.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, virtualNetworkGatewayName, natRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkGatewayNatRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", 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 VirtualNetworkGatewayNatRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkGatewayNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVirtualNetworkGateway retrieves all nat rules for a particular virtual network gateway. +// Parameters: +// resourceGroupName - the resource group name of the virtual network gateway. +// virtualNetworkGatewayName - the name of the gateway. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGateway(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result ListVirtualNetworkGatewayNatRulesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway") + defer func() { + sc := -1 + if result.lvngnrr.Response.Response != nil { + sc = result.lvngnrr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVirtualNetworkGatewayNextResults + req, err := client.ListByVirtualNetworkGatewayPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "ListByVirtualNetworkGateway", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVirtualNetworkGatewaySender(req) + if err != nil { + result.lvngnrr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "ListByVirtualNetworkGateway", resp, "Failure sending request") + return + } + + result.lvngnrr, err = client.ListByVirtualNetworkGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "ListByVirtualNetworkGateway", resp, "Failure responding to request") + return + } + if result.lvngnrr.hasNextLink() && result.lvngnrr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVirtualNetworkGatewayPreparer prepares the ListByVirtualNetworkGateway request. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewayPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVirtualNetworkGatewaySender sends the ListByVirtualNetworkGateway request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewaySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVirtualNetworkGatewayResponder handles the response to the ListByVirtualNetworkGateway request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewayResponder(resp *http.Response) (result ListVirtualNetworkGatewayNatRulesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVirtualNetworkGatewayNextResults retrieves the next set of results, if any. +func (client VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayNextResults(ctx context.Context, lastResults ListVirtualNetworkGatewayNatRulesResult) (result ListVirtualNetworkGatewayNatRulesResult, err error) { + req, err := lastResults.listVirtualNetworkGatewayNatRulesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "listByVirtualNetworkGatewayNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVirtualNetworkGatewaySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "listByVirtualNetworkGatewayNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVirtualNetworkGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "listByVirtualNetworkGatewayNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVirtualNetworkGatewayComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewayComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result ListVirtualNetworkGatewayNatRulesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway") + 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.ListByVirtualNetworkGateway(ctx, resourceGroupName, virtualNetworkGatewayName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualnetworkgateways.go b/services/network/mgmt/2021-03-01/network/virtualnetworkgateways.go new file mode 100644 index 000000000000..009a5d247d69 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualnetworkgateways.go @@ -0,0 +1,1893 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualNetworkGatewaysClient is the network Client +type VirtualNetworkGatewaysClient struct { + BaseClient +} + +// NewVirtualNetworkGatewaysClient creates an instance of the VirtualNetworkGatewaysClient client. +func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewaysClient { + return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewaysClient { + return VirtualNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a virtual network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// parameters - parameters supplied to create or update virtual network gateway operation. +func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (result VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkGatewaysClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", 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 VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified virtual network gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", 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 VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisconnectVirtualNetworkGatewayVpnConnections disconnect vpn connections of virtual network gateway in the specified +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// request - the parameters are supplied to disconnect vpn connections. +func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVpnConnectionRequest) (result VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVpnConnections") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DisconnectVirtualNetworkGatewayVpnConnectionsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "DisconnectVirtualNetworkGatewayVpnConnections", nil, "Failure preparing request") + return + } + + result, err = client.DisconnectVirtualNetworkGatewayVpnConnectionsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "DisconnectVirtualNetworkGatewayVpnConnections", nil, "Failure sending request") + return + } + + return +} + +// DisconnectVirtualNetworkGatewayVpnConnectionsPreparer prepares the DisconnectVirtualNetworkGatewayVpnConnections request. +func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnectionsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVpnConnectionRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisconnectVirtualNetworkGatewayVpnConnectionsSender sends the DisconnectVirtualNetworkGatewayVpnConnections request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnectionsSender(req *http.Request) (future VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DisconnectVirtualNetworkGatewayVpnConnectionsResponder handles the response to the DisconnectVirtualNetworkGatewayVpnConnections request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnectionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Generatevpnclientpackage generates VPN client package for P2S client of the virtual network gateway in the specified +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// parameters - parameters supplied to the generate virtual network gateway VPN client package operation. +func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Generatevpnclientpackage") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GeneratevpnclientpackagePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request") + return + } + + result, err = client.GeneratevpnclientpackageSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure sending request") + return + } + + return +} + +// GeneratevpnclientpackagePreparer prepares the Generatevpnclientpackage request. +func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GeneratevpnclientpackageSender sends the Generatevpnclientpackage request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GeneratevpnclientpackageResponder handles the response to the Generatevpnclientpackage request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GenerateVpnProfile generates VPN profile for P2S client of the virtual network gateway in the specified resource +// group. Used for IKEV2 and radius based authentication. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// parameters - parameters supplied to the generate virtual network gateway VPN client package operation. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GenerateVpnProfile") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request") + return + } + + result, err = client.GenerateVpnProfileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request") + return + } + + return +} + +// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GenerateVpnProfileResponder handles the response to the GenerateVpnProfile request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the specified virtual network gateway by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", 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 VirtualNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAdvertisedRoutes this operation retrieves a list of routes the virtual network gateway is advertising to the +// specified peer. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// peer - the IP address of the peer. +func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetAdvertisedRoutes") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetAdvertisedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure preparing request") + return + } + + result, err = client.GetAdvertisedRoutesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure sending request") + return + } + + return +} + +// GetAdvertisedRoutesPreparer prepares the GetAdvertisedRoutes request. +func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "peer": autorest.Encode("query", peer), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetAdvertisedRoutesResponder handles the response to the GetAdvertisedRoutes request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetBgpPeerStatus the GetBgpPeerStatus operation retrieves the status of all BGP peers. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// peer - the IP address of the peer to retrieve the status of. +func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetBgpPeerStatus") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetBgpPeerStatusPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure preparing request") + return + } + + result, err = client.GetBgpPeerStatusSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure sending request") + return + } + + return +} + +// GetBgpPeerStatusPreparer prepares the GetBgpPeerStatus request. +func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(peer) > 0 { + queryParameters["peer"] = autorest.Encode("query", peer) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetBgpPeerStatusResponder handles the response to the GetBgpPeerStatus request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusResponder(resp *http.Response) (result BgpPeerStatusListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetLearnedRoutes this operation retrieves a list of routes the virtual network gateway has learned, including routes +// learned from BGP peers. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetLearnedRoutes") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetLearnedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure preparing request") + return + } + + result, err = client.GetLearnedRoutesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure sending request") + return + } + + return +} + +// GetLearnedRoutesPreparer prepares the GetLearnedRoutes request. +func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetLearnedRoutesResponder handles the response to the GetLearnedRoutes request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVpnclientConnectionHealth get VPN client connection health detail per P2S client connection of the virtual +// network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVpnclientConnectionHealthPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure preparing request") + return + } + + result, err = client.GetVpnclientConnectionHealthSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure sending request") + return + } + + return +} + +// GetVpnclientConnectionHealthPreparer prepares the GetVpnclientConnectionHealth request. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVpnclientConnectionHealthSender sends the GetVpnclientConnectionHealth request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetVpnclientConnectionHealthResponder handles the response to the GetVpnclientConnectionHealth request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthResponder(resp *http.Response) (result VpnClientConnectionHealthDetailListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVpnclientIpsecParameters the Get VpnclientIpsecParameters operation retrieves information about the vpnclient +// ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource +// provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the virtual network gateway name. +func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientIpsecParameters") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure preparing request") + return + } + + result, err = client.GetVpnclientIpsecParametersSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure sending request") + return + } + + return +} + +// GetVpnclientIpsecParametersPreparer prepares the GetVpnclientIpsecParameters request. +func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVpnclientIpsecParametersSender sends the GetVpnclientIpsecParameters request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetVpnclientIpsecParametersResponder handles the response to the GetVpnclientIpsecParameters request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersResponder(resp *http.Response) (result VpnClientIPsecParameters, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVpnProfilePackageURL gets pre-generated VPN profile for P2S client of the virtual network gateway in the +// specified resource group. The profile needs to be generated first using generateVpnProfile. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnProfilePackageURL") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVpnProfilePackageURLPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure preparing request") + return + } + + result, err = client.GetVpnProfilePackageURLSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure sending request") + return + } + + return +} + +// GetVpnProfilePackageURLPreparer prepares the GetVpnProfilePackageURL request. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVpnProfilePackageURLSender sends the GetVpnProfilePackageURL request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetVpnProfilePackageURLResponder handles the response to the GetVpnProfilePackageURL request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all virtual network gateways by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.List") + defer func() { + sc := -1 + if result.vnglr.Response.Response != nil { + sc = result.vnglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vnglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.vnglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.vnglr.hasNextLink() && result.vnglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualNetworkGatewaysClient) ListPreparer(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 = "2021-03-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.Network/virtualNetworkGateways", 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 VirtualNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) { + req, err := lastResults.virtualNetworkGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "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, "network.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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) + return +} + +// ListConnections gets all the connections in a virtual network gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ListConnections") + defer func() { + sc := -1 + if result.vnglcr.Response.Response != nil { + sc = result.vnglcr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listConnectionsNextResults + req, err := client.ListConnectionsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", nil, "Failure preparing request") + return + } + + resp, err := client.ListConnectionsSender(req) + if err != nil { + result.vnglcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure sending request") + return + } + + result.vnglcr, err = client.ListConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure responding to request") + return + } + if result.vnglcr.hasNextLink() && result.vnglcr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListConnectionsPreparer prepares the ListConnections request. +func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListConnectionsSender sends the ListConnections request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) ListConnectionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListConnectionsResponder handles the response to the ListConnections request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) ListConnectionsResponder(resp *http.Response) (result VirtualNetworkGatewayListConnectionsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listConnectionsNextResults retrieves the next set of results, if any. +func (client VirtualNetworkGatewaysClient) listConnectionsNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListConnectionsResult) (result VirtualNetworkGatewayListConnectionsResult, err error) { + req, err := lastResults.virtualNetworkGatewayListConnectionsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListConnectionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ListConnections") + 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.ListConnections(ctx, resourceGroupName, virtualNetworkGatewayName) + return +} + +// Reset resets the primary of the virtual network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// gatewayVip - virtual network gateway vip address supplied to the begin reset of the active-active feature +// enabled gateway. +func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result VirtualNetworkGatewaysResetFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Reset") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, gatewayVip) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure preparing request") + return + } + + result, err = client.ResetSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure sending request") + return + } + + return +} + +// ResetPreparer prepares the Reset request. +func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(gatewayVip) > 0 { + queryParameters["gatewayVip"] = autorest.Encode("query", gatewayVip) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetSender sends the Reset request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetResponder handles the response to the Reset request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ResetVpnClientSharedKey resets the VPN client shared key of the virtual network gateway in the specified resource +// group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ResetVpnClientSharedKey") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetVpnClientSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure preparing request") + return + } + + result, err = client.ResetVpnClientSharedKeySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure sending request") + return + } + + return +} + +// ResetVpnClientSharedKeyPreparer prepares the ResetVpnClientSharedKey request. +func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetVpnClientSharedKeySender sends the ResetVpnClientSharedKey request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetVpnClientSharedKeyResponder handles the response to the ResetVpnClientSharedKey request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// SetVpnclientIpsecParameters the Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S +// client of virtual network gateway in the specified resource group through Network resource provider. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// vpnclientIpsecParams - parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network +// Gateway P2S client operation through Network resource provider. +func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (result VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SetVpnclientIpsecParameters") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: vpnclientIpsecParams, + Constraints: []validation.Constraint{{Target: "vpnclientIpsecParams.SaLifeTimeSeconds", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "vpnclientIpsecParams.SaDataSizeKilobytes", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", err.Error()) + } + + req, err := client.SetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure preparing request") + return + } + + result, err = client.SetVpnclientIpsecParametersSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure sending request") + return + } + + return +} + +// SetVpnclientIpsecParametersPreparer prepares the SetVpnclientIpsecParameters request. +func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters", pathParameters), + autorest.WithJSON(vpnclientIpsecParams), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetVpnclientIpsecParametersSender sends the SetVpnclientIpsecParameters request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// SetVpnclientIpsecParametersResponder handles the response to the SetVpnclientIpsecParameters request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersResponder(resp *http.Response) (result VpnClientIPsecParameters, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StartPacketCapture starts packet capture on virtual network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// parameters - virtual network gateway packet capture parameters supplied to start packet capture on gateway. +func (client VirtualNetworkGatewaysClient) StartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters *VpnPacketCaptureStartParameters) (result VirtualNetworkGatewaysStartPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.StartPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPacketCapturePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StartPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StartPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StartPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StartPacketCapturePreparer prepares the StartPacketCapture request. +func (client VirtualNetworkGatewaysClient) StartPacketCapturePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters *VpnPacketCaptureStartParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartPacketCaptureSender sends the StartPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) StartPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewaysStartPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartPacketCaptureResponder handles the response to the StartPacketCapture request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) StartPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StopPacketCapture stops packet capture on virtual network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// parameters - virtual network gateway packet capture parameters supplied to stop packet capture on gateway. +func (client VirtualNetworkGatewaysClient) StopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnPacketCaptureStopParameters) (result VirtualNetworkGatewaysStopPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.StopPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPacketCapturePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StopPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StopPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StopPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StopPacketCapturePreparer prepares the StopPacketCapture request. +func (client VirtualNetworkGatewaysClient) StopPacketCapturePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnPacketCaptureStopParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopPacketCaptureSender sends the StopPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) StopPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewaysStopPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopPacketCaptureResponder handles the response to the StopPacketCapture request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) StopPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SupportedVpnDevices gets a xml format representation for supported vpn devices. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result String, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SupportedVpnDevices") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SupportedVpnDevicesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", nil, "Failure preparing request") + return + } + + resp, err := client.SupportedVpnDevicesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure sending request") + return + } + + result, err = client.SupportedVpnDevicesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure responding to request") + return + } + + return +} + +// SupportedVpnDevicesPreparer prepares the SupportedVpnDevices request. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SupportedVpnDevicesSender sends the SupportedVpnDevices request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SupportedVpnDevicesResponder handles the response to the SupportedVpnDevices request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates a virtual network gateway tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +// parameters - parameters supplied to update virtual network gateway tags. +func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (result VirtualNetworkGatewaysUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// VpnDeviceConfigurationScript gets a xml format representation for vpn device configuration script. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection for which the +// configuration script is generated. +// parameters - parameters supplied to the generate vpn device script operation. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (result String, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.VpnDeviceConfigurationScript") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.VpnDeviceConfigurationScriptPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", nil, "Failure preparing request") + return + } + + resp, err := client.VpnDeviceConfigurationScriptSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure sending request") + return + } + + result, err = client.VpnDeviceConfigurationScriptResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure responding to request") + return + } + + return +} + +// VpnDeviceConfigurationScriptPreparer prepares the VpnDeviceConfigurationScript request. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2021-03-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.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// VpnDeviceConfigurationScriptSender sends the VpnDeviceConfigurationScript request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// VpnDeviceConfigurationScriptResponder handles the response to the VpnDeviceConfigurationScript request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2021-03-01/network/virtualnetworkpeerings.go new file mode 100644 index 000000000000..fdb706f0c9dd --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualnetworkpeerings.go @@ -0,0 +1,407 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualNetworkPeeringsClient is the network Client +type VirtualNetworkPeeringsClient struct { + BaseClient +} + +// NewVirtualNetworkPeeringsClient creates an instance of the VirtualNetworkPeeringsClient client. +func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeeringsClient { + return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient { + return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a peering in the specified virtual network. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// virtualNetworkPeeringName - the name of the peering. +// virtualNetworkPeeringParameters - parameters supplied to the create or update virtual network peering +// operation. +// syncRemoteAddressSpace - parameter indicates the intention to sync the peering with the current address +// space on the remote vNet after it's updated. +func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, syncRemoteAddressSpace SyncRemoteAddressSpace) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: virtualNetworkPeeringParameters, + Constraints: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat.RemoteBgpCommunities", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat.RemoteBgpCommunities.VirtualNetworkCommunity", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkPeeringsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, syncRemoteAddressSpace) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, syncRemoteAddressSpace SyncRemoteAddressSpace) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(syncRemoteAddressSpace)) > 0 { + queryParameters["syncRemoteAddressSpace"] = autorest.Encode("query", syncRemoteAddressSpace) + } + + virtualNetworkPeeringParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", pathParameters), + autorest.WithJSON(virtualNetworkPeeringParameters), + 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 VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified virtual network peering. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// virtualNetworkPeeringName - the name of the virtual network peering. +func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeeringsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", 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 VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified virtual network peering. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// virtualNetworkPeeringName - the name of the virtual network peering. +func (client VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeering, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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, virtualNetworkName, virtualNetworkPeeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", 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 VirtualNetworkPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (result VirtualNetworkPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all virtual network peerings in a virtual network. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +func (client VirtualNetworkPeeringsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.List") + defer func() { + sc := -1 + if result.vnplr.Response.Response != nil { + sc = result.vnplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vnplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure sending request") + return + } + + result.vnplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.vnplr.hasNextLink() && result.vnplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings", 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 VirtualNetworkPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) ListResponder(resp *http.Response) (result VirtualNetworkPeeringListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualNetworkPeeringsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkPeeringListResult) (result VirtualNetworkPeeringListResult, err error) { + req, err := lastResults.virtualNetworkPeeringListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "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, "network.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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, virtualNetworkName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualnetworks.go b/services/network/mgmt/2021-03-01/network/virtualnetworks.go new file mode 100644 index 000000000000..afa13c3f52d2 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualnetworks.go @@ -0,0 +1,784 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualNetworksClient is the network Client +type VirtualNetworksClient struct { + BaseClient +} + +// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient client. +func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { + return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient { + return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckIPAddressAvailability checks whether a private IP address is available for use. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// IPAddress - the private IP address to be verified. +func (client VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress string) (result IPAddressAvailabilityResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CheckIPAddressAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckIPAddressAvailabilityPreparer(ctx, resourceGroupName, virtualNetworkName, IPAddress) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckIPAddressAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckIPAddressAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckIPAddressAvailabilityPreparer prepares the CheckIPAddressAvailability request. +func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ipAddress": autorest.Encode("query", IPAddress), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckIPAddressAvailabilitySender sends the CheckIPAddressAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworksClient) CheckIPAddressAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckIPAddressAvailabilityResponder handles the response to the CheckIPAddressAvailability request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *http.Response) (result IPAddressAvailabilityResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a virtual network in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// parameters - parameters supplied to the create or update virtual network operation. +func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities.VirtualNetworkCommunity", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworksClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", 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 VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetwork, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified virtual network. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworksDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}", 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 VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified virtual network by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// expand - expands referenced resources. +func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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, virtualNetworkName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-01" + 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.Network/virtualNetworks/{virtualNetworkName}", 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 VirtualNetworksClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result VirtualNetwork, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all virtual networks in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.List") + defer func() { + sc := -1 + if result.vnlr.Response.Response != nil { + sc = result.vnlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vnlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure sending request") + return + } + + result.vnlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure responding to request") + return + } + if result.vnlr.hasNextLink() && result.vnlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualNetworksClient) ListPreparer(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 = "2021-03-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.Network/virtualNetworks", 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 VirtualNetworksClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) ListResponder(resp *http.Response) (result VirtualNetworkListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualNetworksClient) listNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { + req, err := lastResults.virtualNetworkListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "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, "network.VirtualNetworksClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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) + return +} + +// ListAll gets all virtual networks in a subscription. +func (client VirtualNetworksClient) ListAll(ctx context.Context) (result VirtualNetworkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll") + defer func() { + sc := -1 + if result.vnlr.Response.Response != nil { + sc = result.vnlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.vnlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure sending request") + return + } + + result.vnlr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vnlr.hasNextLink() && result.vnlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworksClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) ListAllResponder(resp *http.Response) (result VirtualNetworkListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client VirtualNetworksClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { + req, err := lastResults.virtualNetworkListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworksClient) ListAllComplete(ctx context.Context) (result VirtualNetworkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListUsage lists usage stats. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +func (client VirtualNetworksClient) ListUsage(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListUsage") + defer func() { + sc := -1 + if result.vnlur.Response.Response != nil { + sc = result.vnlur.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listUsageNextResults + req, err := client.ListUsagePreparer(ctx, resourceGroupName, virtualNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsageSender(req) + if err != nil { + result.vnlur.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure sending request") + return + } + + result.vnlur, err = client.ListUsageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure responding to request") + return + } + if result.vnlur.hasNextLink() && result.vnlur.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListUsagePreparer prepares the ListUsage request. +func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListUsageSender sends the ListUsage request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworksClient) ListUsageSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListUsageResponder handles the response to the ListUsage request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) ListUsageResponder(resp *http.Response) (result VirtualNetworkListUsageResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listUsageNextResults retrieves the next set of results, if any. +func (client VirtualNetworksClient) listUsageNextResults(ctx context.Context, lastResults VirtualNetworkListUsageResult) (result VirtualNetworkListUsageResult, err error) { + req, err := lastResults.virtualNetworkListUsageResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListUsageSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", resp, "Failure sending next results request") + } + result, err = client.ListUsageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListUsageComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworksClient) ListUsageComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListUsage") + 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.ListUsage(ctx, resourceGroupName, virtualNetworkName) + return +} + +// UpdateTags updates a virtual network tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// parameters - parameters supplied to update virtual network tags. +func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (result VirtualNetwork, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworks/{virtualNetworkName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetwork, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualnetworktaps.go b/services/network/mgmt/2021-03-01/network/virtualnetworktaps.go new file mode 100644 index 000000000000..45b360c5f72a --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualnetworktaps.go @@ -0,0 +1,611 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualNetworkTapsClient is the network Client +type VirtualNetworkTapsClient struct { + BaseClient +} + +// NewVirtualNetworkTapsClient creates an instance of the VirtualNetworkTapsClient client. +func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient { + return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewVirtualNetworkTapsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkTapsClient { + return VirtualNetworkTapsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Virtual Network Tap. +// Parameters: +// resourceGroupName - the name of the resource group. +// tapName - the name of the virtual network tap. +// parameters - parameters supplied to the create or update virtual network tap operation. +func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (result VirtualNetworkTapsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, + }}, + }}, + }}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworkTapsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, tapName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapName": autorest.Encode("path", tapName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkTap, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified virtual network tap. +// Parameters: +// resourceGroupName - the name of the resource group. +// tapName - the name of the virtual network tap. +func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTapsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, tapName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resourceGroupName string, tapName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapName": autorest.Encode("path", tapName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified virtual network tap. +// Parameters: +// resourceGroupName - the name of the resource group. +// tapName - the name of virtual network tap. +func (client VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTap, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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, tapName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resourceGroupName string, tapName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapName": autorest.Encode("path", tapName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) GetResponder(resp *http.Response) (result VirtualNetworkTap, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAll gets all the VirtualNetworkTaps in a subscription. +func (client VirtualNetworkTapsClient) ListAll(ctx context.Context) (result VirtualNetworkTapListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll") + defer func() { + sc := -1 + if result.vntlr.Response.Response != nil { + sc = result.vntlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.vntlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", resp, "Failure sending request") + return + } + + result.vntlr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vntlr.hasNextLink() && result.vntlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkTapsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) ListAllResponder(resp *http.Response) (result VirtualNetworkTapListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client VirtualNetworkTapsClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) { + req, err := lastResults.virtualNetworkTapListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkTapsClient) ListAllComplete(ctx context.Context) (result VirtualNetworkTapListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll") + 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.ListAll(ctx) + return +} + +// ListByResourceGroup gets all the VirtualNetworkTaps in a subscription. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.vntlr.Response.Response != nil { + sc = result.vntlr.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, "network.VirtualNetworkTapsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.vntlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.vntlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.vntlr.hasNextLink() && result.vntlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualNetworkTapsClient) 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 = "2021-03-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.Network/virtualNetworkTaps", 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 VirtualNetworkTapsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualNetworkTapListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualNetworkTapsClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) { + req, err := lastResults.virtualNetworkTapListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "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, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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 +} + +// UpdateTags updates an VirtualNetworkTap tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// tapName - the name of the tap. +// tapParameters - parameters supplied to update VirtualNetworkTap tags. +func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (result VirtualNetworkTap, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, tapName, tapParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tapName": autorest.Encode("path", tapName), + } + + const APIVersion = "2021-03-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.Network/virtualNetworkTaps/{tapName}", pathParameters), + autorest.WithJSON(tapParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkTap, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualrouterpeerings.go b/services/network/mgmt/2021-03-01/network/virtualrouterpeerings.go new file mode 100644 index 000000000000..abce3bfe570a --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualrouterpeerings.go @@ -0,0 +1,404 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualRouterPeeringsClient is the network Client +type VirtualRouterPeeringsClient struct { + BaseClient +} + +// NewVirtualRouterPeeringsClient creates an instance of the VirtualRouterPeeringsClient client. +func NewVirtualRouterPeeringsClient(subscriptionID string) VirtualRouterPeeringsClient { + return NewVirtualRouterPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualRouterPeeringsClientWithBaseURI creates an instance of the VirtualRouterPeeringsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVirtualRouterPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualRouterPeeringsClient { + return VirtualRouterPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Virtual Router Peering. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +// peeringName - the name of the Virtual Router Peering. +// parameters - parameters supplied to the create or update Virtual Router Peering operation. +func (client VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering) (result VirtualRouterPeeringsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + 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: int64(0), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualRouterPeeringsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualRouterName, peeringName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualRouterPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + parameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", 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 VirtualRouterPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualRouterPeeringsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualRouterPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified peering from a Virtual Router. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +// peeringName - the name of the peering. +func (client VirtualRouterPeeringsClient) Delete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string) (result VirtualRouterPeeringsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualRouterName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualRouterPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-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.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", 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 VirtualRouterPeeringsClient) DeleteSender(req *http.Request) (future VirtualRouterPeeringsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Virtual Router Peering. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +// peeringName - the name of the Virtual Router Peering. +func (client VirtualRouterPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string) (result VirtualRouterPeering, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.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, virtualRouterName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualRouterPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-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.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", 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 VirtualRouterPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) GetResponder(resp *http.Response) (result VirtualRouterPeering, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Virtual Router Peerings in a Virtual Router resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +func (client VirtualRouterPeeringsClient) List(ctx context.Context, resourceGroupName string, virtualRouterName string) (result VirtualRouterPeeringListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.List") + defer func() { + sc := -1 + if result.vrplr.Response.Response != nil { + sc = result.vrplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualRouterName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vrplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "List", resp, "Failure sending request") + return + } + + result.vrplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.vrplr.hasNextLink() && result.vrplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualRouterPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualRouterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-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.Network/virtualRouters/{virtualRouterName}/peerings", 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 VirtualRouterPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) ListResponder(resp *http.Response) (result VirtualRouterPeeringListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualRouterPeeringsClient) listNextResults(ctx context.Context, lastResults VirtualRouterPeeringListResult) (result VirtualRouterPeeringListResult, err error) { + req, err := lastResults.virtualRouterPeeringListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "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, "network.VirtualRouterPeeringsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualRouterPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualRouterName string) (result VirtualRouterPeeringListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.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, virtualRouterName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/virtualrouters.go b/services/network/mgmt/2021-03-01/network/virtualrouters.go new file mode 100644 index 000000000000..4e65a803f300 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualrouters.go @@ -0,0 +1,511 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualRoutersClient is the network Client +type VirtualRoutersClient struct { + BaseClient +} + +// NewVirtualRoutersClient creates an instance of the VirtualRoutersClient client. +func NewVirtualRoutersClient(subscriptionID string) VirtualRoutersClient { + return NewVirtualRoutersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualRoutersClientWithBaseURI creates an instance of the VirtualRoutersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualRoutersClientWithBaseURI(baseURI string, subscriptionID string) VirtualRoutersClient { + return VirtualRoutersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Virtual Router. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +// parameters - parameters supplied to the create or update Virtual Router. +func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter) (result VirtualRoutersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + 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: int64(0), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualRoutersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualRouterName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualRoutersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", 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 VirtualRoutersClient) CreateOrUpdateSender(req *http.Request) (future VirtualRoutersCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualRouter, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Virtual Router. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +func (client VirtualRoutersClient) Delete(ctx context.Context, resourceGroupName string, virtualRouterName string) (result VirtualRoutersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualRouterName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualRoutersClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualRouterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-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.Network/virtualRouters/{virtualRouterName}", 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 VirtualRoutersClient) DeleteSender(req *http.Request) (future VirtualRoutersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Virtual Router. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualRouterName - the name of the Virtual Router. +// expand - expands referenced resources. +func (client VirtualRoutersClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, expand string) (result VirtualRouter, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.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, virtualRouterName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualRoutersClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualRouterName": autorest.Encode("path", virtualRouterName), + } + + const APIVersion = "2021-03-01" + 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.Network/virtualRouters/{virtualRouterName}", 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 VirtualRoutersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) GetResponder(resp *http.Response) (result VirtualRouter, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the Virtual Routers in a subscription. +func (client VirtualRoutersClient) List(ctx context.Context) (result VirtualRouterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.List") + defer func() { + sc := -1 + if result.vrlr.Response.Response != nil { + sc = result.vrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "List", resp, "Failure sending request") + return + } + + result.vrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "List", resp, "Failure responding to request") + return + } + if result.vrlr.hasNextLink() && result.vrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualRoutersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters", 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 VirtualRoutersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) ListResponder(resp *http.Response) (result VirtualRouterListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualRoutersClient) listNextResults(ctx context.Context, lastResults VirtualRouterListResult) (result VirtualRouterListResult, err error) { + req, err := lastResults.virtualRouterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "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, "network.VirtualRoutersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualRoutersClient) ListComplete(ctx context.Context) (result VirtualRouterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.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 lists all Virtual Routers in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client VirtualRoutersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualRouterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.vrlr.Response.Response != nil { + sc = result.vrlr.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, "network.VirtualRoutersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.vrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.vrlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.vrlr.hasNextLink() && result.vrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualRoutersClient) 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 = "2021-03-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.Network/virtualRouters", 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 VirtualRoutersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualRouterListResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualRoutersClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualRouterListResult) (result VirtualRouterListResult, err error) { + req, err := lastResults.virtualRouterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "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, "network.VirtualRoutersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualRoutersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualRouterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.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/network/mgmt/2021-03-01/network/virtualwans.go b/services/network/mgmt/2021-03-01/network/virtualwans.go new file mode 100644 index 000000000000..0a54d2bec9ca --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/virtualwans.go @@ -0,0 +1,574 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VirtualWansClient is the network Client +type VirtualWansClient struct { + BaseClient +} + +// NewVirtualWansClient creates an instance of the VirtualWansClient client. +func NewVirtualWansClient(subscriptionID string) VirtualWansClient { + return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualWansClientWithBaseURI(baseURI string, subscriptionID string) VirtualWansClient { + return VirtualWansClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being created or updated. +// wANParameters - parameters supplied to create or update VirtualWAN. +func (client VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (result VirtualWansCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWANName, wANParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + wANParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), + autorest.WithJSON(wANParameters), + 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 VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualWAN. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being deleted. +func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWansDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{VirtualWANName}", 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 VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VirtualWAN. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being retrieved. +func (client VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWAN, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{VirtualWANName}", 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 VirtualWansClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) GetResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VirtualWANs in a subscription. +func (client VirtualWansClient) List(ctx context.Context) (result ListVirtualWANsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.List") + defer func() { + sc := -1 + if result.lvwnr.Response.Response != nil { + sc = result.lvwnr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvwnr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", resp, "Failure sending request") + return + } + + result.lvwnr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", resp, "Failure responding to request") + return + } + if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans", 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 VirtualWansClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) ListResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualWansClient) listNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { + req, err := lastResults.listVirtualWANsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "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, "network.VirtualWansClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualWansClient) ListComplete(ctx context.Context) (result ListVirtualWANsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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 lists all the VirtualWANs in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +func (client VirtualWansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lvwnr.Response.Response != nil { + sc = result.lvwnr.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, "network.VirtualWansClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvwnr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvwnr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualWansClient) 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 = "2021-03-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.Network/virtualWans", 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 VirtualWansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { + err = autorest.Respond( + resp, + 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 VirtualWansClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { + req, err := lastResults.listVirtualWANsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "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, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualWansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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 +} + +// UpdateTags updates a VirtualWAN tags. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being updated. +// wANParameters - parameters supplied to Update VirtualWAN tags. +func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWAN, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualWANName, wANParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{VirtualWANName}", pathParameters), + autorest.WithJSON(wANParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualWansClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) UpdateTagsResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnconnections.go b/services/network/mgmt/2021-03-01/network/vpnconnections.go new file mode 100644 index 000000000000..399c8c5d5937 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnconnections.go @@ -0,0 +1,564 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnConnectionsClient is the network Client +type VpnConnectionsClient struct { + BaseClient +} + +// NewVpnConnectionsClient creates an instance of the VpnConnectionsClient client. +func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { + return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVpnConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnConnectionsClient { + return VpnConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing +// connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the connection. +// vpnConnectionParameters - parameters supplied to create or Update a VPN Connection. +func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (result VpnConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + vpnConnectionParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", pathParameters), + autorest.WithJSON(vpnConnectionParameters), + 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 VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a vpn connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the connection. +func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a vpn connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +func (client VpnConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.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, gatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) GetResponder(resp *http.Response) (result VpnConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnGateway retrieves all vpn connections for a particular virtual wan vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnConnectionsClient) ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway") + defer func() { + sc := -1 + if result.lvcr.Response.Response != nil { + sc = result.lvcr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnGatewayNextResults + req, err := client.ListByVpnGatewayPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnGatewaySender(req) + if err != nil { + result.lvcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure sending request") + return + } + + result.lvcr, err = client.ListByVpnGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure responding to request") + return + } + if result.lvcr.hasNextLink() && result.lvcr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVpnGatewayPreparer prepares the ListByVpnGateway request. +func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVpnGatewaySender sends the ListByVpnGateway request. The method will close the +// http.Response Body if it receives an error. +func (client VpnConnectionsClient) ListByVpnGatewaySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) ListByVpnGatewayResponder(resp *http.Response) (result ListVpnConnectionsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnGatewayNextResults retrieves the next set of results, if any. +func (client VpnConnectionsClient) listByVpnGatewayNextResults(ctx context.Context, lastResults ListVpnConnectionsResult) (result ListVpnConnectionsResult, err error) { + req, err := lastResults.listVpnConnectionsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnGatewaySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnGatewayComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnConnectionsClient) ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway") + 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.ListByVpnGateway(ctx, resourceGroupName, gatewayName) + return +} + +// StartPacketCapture starts packet capture on Vpn connection in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the gateway. +// vpnConnectionName - the name of the vpn connection. +// parameters - vpn Connection packet capture parameters supplied to start packet capture on gateway +// connection. +func (client VpnConnectionsClient) StartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, parameters *VpnConnectionPacketCaptureStartParameters) (result VpnConnectionsStartPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.StartPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPacketCapturePreparer(ctx, resourceGroupName, gatewayName, vpnConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StartPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StartPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StartPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StartPacketCapturePreparer prepares the StartPacketCapture request. +func (client VpnConnectionsClient) StartPacketCapturePreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, parameters *VpnConnectionPacketCaptureStartParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnConnectionName": autorest.Encode("path", vpnConnectionName), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartPacketCaptureSender sends the StartPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VpnConnectionsClient) StartPacketCaptureSender(req *http.Request) (future VpnConnectionsStartPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartPacketCaptureResponder handles the response to the StartPacketCapture request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) StartPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StopPacketCapture stops packet capture on Vpn connection in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the gateway. +// vpnConnectionName - the name of the vpn connection. +// parameters - vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. +func (client VpnConnectionsClient) StopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, parameters *VpnConnectionPacketCaptureStopParameters) (result VpnConnectionsStopPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.StopPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPacketCapturePreparer(ctx, resourceGroupName, gatewayName, vpnConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StopPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StopPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StopPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StopPacketCapturePreparer prepares the StopPacketCapture request. +func (client VpnConnectionsClient) StopPacketCapturePreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, parameters *VpnConnectionPacketCaptureStopParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnConnectionName": autorest.Encode("path", vpnConnectionName), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopPacketCaptureSender sends the StopPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VpnConnectionsClient) StopPacketCaptureSender(req *http.Request) (future VpnConnectionsStopPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopPacketCaptureResponder handles the response to the StopPacketCapture request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) StopPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpngateways.go b/services/network/mgmt/2021-03-01/network/vpngateways.go new file mode 100644 index 000000000000..3824dea168b1 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpngateways.go @@ -0,0 +1,836 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnGatewaysClient is the network Client +type VpnGatewaysClient struct { + BaseClient +} + +// NewVpnGatewaysClient creates an instance of the VpnGatewaysClient client. +func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { + return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VpnGatewaysClient { + return VpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// vpnGatewayParameters - parameters supplied to create or Update a virtual wan vpn gateway. +func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (result VpnGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: vpnGatewayParameters, + Constraints: []validation.Constraint{{Target: "vpnGatewayParameters.VpnGatewayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "vpnGatewayParameters.VpnGatewayProperties.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "vpnGatewayParameters.VpnGatewayProperties.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "vpnGatewayParameters.VpnGatewayProperties.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "vpnGatewayParameters.VpnGatewayProperties.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VpnGatewaysClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + vpnGatewayParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", pathParameters), + autorest.WithJSON(vpnGatewayParameters), + 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 VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a virtual wan vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a virtual wan vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) GetResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VpnGateways in a subscription. +func (client VpnGatewaysClient) List(ctx context.Context) (result ListVpnGatewaysResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.List") + defer func() { + sc := -1 + if result.lvgr.Response.Response != nil { + sc = result.lvgr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.lvgr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.lvgr.hasNextLink() && result.lvgr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways", 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 VpnGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ListResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + 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 VpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) { + req, err := lastResults.listVpnGatewaysResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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, "network.VpnGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnGatewaysClient) ListComplete(ctx context.Context) (result ListVpnGatewaysResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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 lists all the VpnGateways in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +func (client VpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lvgr.Response.Response != nil { + sc = result.lvgr.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, "network.VpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvgr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvgr.hasNextLink() && result.lvgr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VpnGatewaysClient) 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 = "2021-03-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.Network/vpnGateways", 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 VpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + 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 VpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) { + req, err := lastResults.listVpnGatewaysResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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 +} + +// Reset resets the primary of the vpn gateway in the specified resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysResetFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Reset") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure preparing request") + return + } + + result, err = client.ResetSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure sending request") + return + } + + return +} + +// ResetPreparer prepares the Reset request. +func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/reset", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetSender sends the Reset request. The method will close the +// http.Response Body if it receives an error. +func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetResponder handles the response to the Reset request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ResetResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StartPacketCapture starts packet capture on vpn gateway in the specified resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// parameters - vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. +func (client VpnGatewaysClient) StartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, parameters *VpnGatewayPacketCaptureStartParameters) (result VpnGatewaysStartPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.StartPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPacketCapturePreparer(ctx, resourceGroupName, gatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StartPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StartPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StartPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StartPacketCapturePreparer prepares the StartPacketCapture request. +func (client VpnGatewaysClient) StartPacketCapturePreparer(ctx context.Context, resourceGroupName string, gatewayName string, parameters *VpnGatewayPacketCaptureStartParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/startpacketcapture", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartPacketCaptureSender sends the StartPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VpnGatewaysClient) StartPacketCaptureSender(req *http.Request) (future VpnGatewaysStartPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartPacketCaptureResponder handles the response to the StartPacketCapture request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) StartPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StopPacketCapture stops packet capture on vpn gateway in the specified resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// parameters - vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. +func (client VpnGatewaysClient) StopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, parameters *VpnGatewayPacketCaptureStopParameters) (result VpnGatewaysStopPacketCaptureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.StopPacketCapture") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPacketCapturePreparer(ctx, resourceGroupName, gatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StopPacketCapture", nil, "Failure preparing request") + return + } + + result, err = client.StopPacketCaptureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StopPacketCapture", nil, "Failure sending request") + return + } + + return +} + +// StopPacketCapturePreparer prepares the StopPacketCapture request. +func (client VpnGatewaysClient) StopPacketCapturePreparer(ctx context.Context, resourceGroupName string, gatewayName string, parameters *VpnGatewayPacketCaptureStopParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/stoppacketcapture", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopPacketCaptureSender sends the StopPacketCapture request. The method will close the +// http.Response Body if it receives an error. +func (client VpnGatewaysClient) StopPacketCaptureSender(req *http.Request) (future VpnGatewaysStopPacketCaptureFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopPacketCaptureResponder handles the response to the StopPacketCapture request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) StopPacketCaptureResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates virtual wan vpn gateway tags. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// vpnGatewayParameters - parameters supplied to update a virtual wan vpn gateway tags. +func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGatewaysUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}", pathParameters), + autorest.WithJSON(vpnGatewayParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnlinkconnections.go b/services/network/mgmt/2021-03-01/network/vpnlinkconnections.go new file mode 100644 index 000000000000..3d7e239e7159 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnlinkconnections.go @@ -0,0 +1,315 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnLinkConnectionsClient is the network Client +type VpnLinkConnectionsClient struct { + BaseClient +} + +// NewVpnLinkConnectionsClient creates an instance of the VpnLinkConnectionsClient client. +func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient { + return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewVpnLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnLinkConnectionsClient { + return VpnLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetIkeSas lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +// linkConnectionName - the name of the vpn link connection. +func (client VpnLinkConnectionsClient) GetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result VpnLinkConnectionsGetIkeSasFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.GetIkeSas") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetIkeSasPreparer(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "GetIkeSas", nil, "Failure preparing request") + return + } + + result, err = client.GetIkeSasSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "GetIkeSas", nil, "Failure sending request") + return + } + + return +} + +// GetIkeSasPreparer prepares the GetIkeSas request. +func (client VpnLinkConnectionsClient) GetIkeSasPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "linkConnectionName": autorest.Encode("path", linkConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetIkeSasSender sends the GetIkeSas request. The method will close the +// http.Response Body if it receives an error. +func (client VpnLinkConnectionsClient) GetIkeSasSender(req *http.Request) (future VpnLinkConnectionsGetIkeSasFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetIkeSasResponder handles the response to the GetIkeSas request. The method always +// closes the http.Response Body. +func (client VpnLinkConnectionsClient) GetIkeSasResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnConnection retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. +// Parameters: +// resourceGroupName - the resource group name of the vpn gateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +func (client VpnLinkConnectionsClient) ListByVpnConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result ListVpnSiteLinkConnectionsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ListByVpnConnection") + defer func() { + sc := -1 + if result.lvslcr.Response.Response != nil { + sc = result.lvslcr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnConnectionNextResults + req, err := client.ListByVpnConnectionPreparer(ctx, resourceGroupName, gatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnConnectionSender(req) + if err != nil { + result.lvslcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", resp, "Failure sending request") + return + } + + result.lvslcr, err = client.ListByVpnConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", resp, "Failure responding to request") + return + } + if result.lvslcr.hasNextLink() && result.lvslcr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVpnConnectionPreparer prepares the ListByVpnConnection request. +func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVpnConnectionSender sends the ListByVpnConnection request. The method will close the +// http.Response Body if it receives an error. +func (client VpnLinkConnectionsClient) ListByVpnConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVpnConnectionResponder handles the response to the ListByVpnConnection request. The method always +// closes the http.Response Body. +func (client VpnLinkConnectionsClient) ListByVpnConnectionResponder(resp *http.Response) (result ListVpnSiteLinkConnectionsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnConnectionNextResults retrieves the next set of results, if any. +func (client VpnLinkConnectionsClient) listByVpnConnectionNextResults(ctx context.Context, lastResults ListVpnSiteLinkConnectionsResult) (result ListVpnSiteLinkConnectionsResult, err error) { + req, err := lastResults.listVpnSiteLinkConnectionsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnConnectionComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnLinkConnectionsClient) ListByVpnConnectionComplete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result ListVpnSiteLinkConnectionsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ListByVpnConnection") + 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.ListByVpnConnection(ctx, resourceGroupName, gatewayName, connectionName) + return +} + +// ResetConnection resets the VpnLink connection specified. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +// linkConnectionName - the name of the vpn link connection. +func (client VpnLinkConnectionsClient) ResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result VpnLinkConnectionsResetConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ResetConnection") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetConnectionPreparer(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ResetConnection", nil, "Failure preparing request") + return + } + + result, err = client.ResetConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ResetConnection", nil, "Failure sending request") + return + } + + return +} + +// ResetConnectionPreparer prepares the ResetConnection request. +func (client VpnLinkConnectionsClient) ResetConnectionPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "linkConnectionName": autorest.Encode("path", linkConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetConnectionSender sends the ResetConnection request. The method will close the +// http.Response Body if it receives an error. +func (client VpnLinkConnectionsClient) ResetConnectionSender(req *http.Request) (future VpnLinkConnectionsResetConnectionFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResetConnectionResponder handles the response to the ResetConnection request. The method always +// closes the http.Response Body. +func (client VpnLinkConnectionsClient) ResetConnectionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnserverconfigurations.go b/services/network/mgmt/2021-03-01/network/vpnserverconfigurations.go new file mode 100644 index 000000000000..05e2dea9431f --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnserverconfigurations.go @@ -0,0 +1,576 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnServerConfigurationsClient is the network Client +type VpnServerConfigurationsClient struct { + BaseClient +} + +// NewVpnServerConfigurationsClient creates an instance of the VpnServerConfigurationsClient client. +func NewVpnServerConfigurationsClient(subscriptionID string) VpnServerConfigurationsClient { + return NewVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnServerConfigurationsClientWithBaseURI creates an instance of the VpnServerConfigurationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) VpnServerConfigurationsClient { + return VpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VpnServerConfiguration resource if it doesn't exist else updates the existing +// VpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being created or updated. +// vpnServerConfigurationParameters - parameters supplied to create or update VpnServerConfiguration. +func (client VpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VpnServerConfiguration) (result VpnServerConfigurationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VpnServerConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + vpnServerConfigurationParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", pathParameters), + autorest.WithJSON(vpnServerConfigurationParameters), + 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 VpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future VpnServerConfigurationsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being deleted. +func (client VpnServerConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result VpnServerConfigurationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, vpnServerConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnServerConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-03-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.Network/vpnServerConfigurations/{vpnServerConfigurationName}", 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 VpnServerConfigurationsClient) DeleteSender(req *http.Request) (future VpnServerConfigurationsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being retrieved. +func (client VpnServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result VpnServerConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.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, vpnServerConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnServerConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-03-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.Network/vpnServerConfigurations/{vpnServerConfigurationName}", 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 VpnServerConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) GetResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VpnServerConfigurations in a subscription. +func (client VpnServerConfigurationsClient) List(ctx context.Context) (result ListVpnServerConfigurationsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.List") + defer func() { + sc := -1 + if result.lvscr.Response.Response != nil { + sc = result.lvscr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvscr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result.lvscr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.lvscr.hasNextLink() && result.lvscr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnServerConfigurationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations", 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 VpnServerConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) ListResponder(resp *http.Response) (result ListVpnServerConfigurationsResult, err error) { + err = autorest.Respond( + resp, + 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 VpnServerConfigurationsClient) listNextResults(ctx context.Context, lastResults ListVpnServerConfigurationsResult) (result ListVpnServerConfigurationsResult, err error) { + req, err := lastResults.listVpnServerConfigurationsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "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, "network.VpnServerConfigurationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnServerConfigurationsClient) ListComplete(ctx context.Context) (result ListVpnServerConfigurationsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.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 lists all the vpnServerConfigurations in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +func (client VpnServerConfigurationsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnServerConfigurationsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lvscr.Response.Response != nil { + sc = result.lvscr.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, "network.VpnServerConfigurationsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvscr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvscr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvscr.hasNextLink() && result.lvscr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VpnServerConfigurationsClient) 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 = "2021-03-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.Network/vpnServerConfigurations", 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 VpnServerConfigurationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnServerConfigurationsResult, err error) { + err = autorest.Respond( + resp, + 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 VpnServerConfigurationsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnServerConfigurationsResult) (result ListVpnServerConfigurationsResult, err error) { + req, err := lastResults.listVpnServerConfigurationsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "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, "network.VpnServerConfigurationsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnServerConfigurationsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnServerConfigurationsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.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 +} + +// UpdateTags updates VpnServerConfiguration tags. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being updated. +// vpnServerConfigurationParameters - parameters supplied to update VpnServerConfiguration tags. +func (client VpnServerConfigurationsClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject) (result VpnServerConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VpnServerConfigurationsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-03-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.Network/vpnServerConfigurations/{vpnServerConfigurationName}", pathParameters), + autorest.WithJSON(vpnServerConfigurationParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) UpdateTagsResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/services/network/mgmt/2021-03-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go new file mode 100644 index 000000000000..79db8e81e158 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go @@ -0,0 +1,111 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnServerConfigurationsAssociatedWithVirtualWanClient is the network Client +type VpnServerConfigurationsAssociatedWithVirtualWanClient struct { + BaseClient +} + +// NewVpnServerConfigurationsAssociatedWithVirtualWanClient creates an instance of the +// VpnServerConfigurationsAssociatedWithVirtualWanClient client. +func NewVpnServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string) VpnServerConfigurationsAssociatedWithVirtualWanClient { + return NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI creates an instance of the +// VpnServerConfigurationsAssociatedWithVirtualWanClient client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI(baseURI string, subscriptionID string) VpnServerConfigurationsAssociatedWithVirtualWanClient { + return VpnServerConfigurationsAssociatedWithVirtualWanClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. +// Parameters: +// resourceGroupName - the resource group name. +// virtualWANName - the name of the VirtualWAN whose associated VpnServerConfigurations is needed. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) List(ctx context.Context, resourceGroupName string, virtualWANName string) (result VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsAssociatedWithVirtualWanClient.List") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, resourceGroupName, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", nil, "Failure preparing request") + return + } + + result, err = client.ListSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", nil, "Failure sending request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{virtualWANName}/vpnServerConfigurations", 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 VpnServerConfigurationsAssociatedWithVirtualWanClient) ListSender(req *http.Request) (future VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListResponder(resp *http.Response) (result VpnServerConfigurationsResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnsitelinkconnections.go b/services/network/mgmt/2021-03-01/network/vpnsitelinkconnections.go new file mode 100644 index 000000000000..1e534fd0b939 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnsitelinkconnections.go @@ -0,0 +1,112 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnSiteLinkConnectionsClient is the network Client +type VpnSiteLinkConnectionsClient struct { + BaseClient +} + +// NewVpnSiteLinkConnectionsClient creates an instance of the VpnSiteLinkConnectionsClient client. +func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectionsClient { + return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVpnSiteLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinkConnectionsClient { + return VpnSiteLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves the details of a vpn site link connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +// linkConnectionName - the name of the vpn connection. +func (client VpnSiteLinkConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result VpnSiteLinkConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinkConnectionsClient.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, gatewayName, connectionName, linkConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "linkConnectionName": autorest.Encode("path", linkConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}", 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 VpnSiteLinkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSiteLinkConnectionsClient) GetResponder(resp *http.Response) (result VpnSiteLinkConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnsitelinks.go b/services/network/mgmt/2021-03-01/network/vpnsitelinks.go new file mode 100644 index 000000000000..e99ac3df4021 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnsitelinks.go @@ -0,0 +1,227 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnSiteLinksClient is the network Client +type VpnSiteLinksClient struct { + BaseClient +} + +// NewVpnSiteLinksClient creates an instance of the VpnSiteLinksClient client. +func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { + return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVpnSiteLinksClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinksClient { + return VpnSiteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves the details of a VPN site link. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite. +// vpnSiteLinkName - the name of the VpnSiteLink being retrieved. +func (client VpnSiteLinksClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (result VpnSiteLink, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.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, vpnSiteName, vpnSiteLinkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteLinkName": autorest.Encode("path", vpnSiteLinkName), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2021-03-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.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}", 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 VpnSiteLinksClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSiteLinksClient) GetResponder(resp *http.Response) (result VpnSiteLink, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnSite lists all the vpnSiteLinks in a resource group for a vpn site. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite. +func (client VpnSiteLinksClient) ListByVpnSite(ctx context.Context, resourceGroupName string, vpnSiteName string) (result ListVpnSiteLinksResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.ListByVpnSite") + defer func() { + sc := -1 + if result.lvslr.Response.Response != nil { + sc = result.lvslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnSiteNextResults + req, err := client.ListByVpnSitePreparer(ctx, resourceGroupName, vpnSiteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnSiteSender(req) + if err != nil { + result.lvslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", resp, "Failure sending request") + return + } + + result.lvslr, err = client.ListByVpnSiteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", resp, "Failure responding to request") + return + } + if result.lvslr.hasNextLink() && result.lvslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVpnSitePreparer prepares the ListByVpnSite request. +func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2021-03-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.Network/vpnSites/{vpnSiteName}/vpnSiteLinks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVpnSiteSender sends the ListByVpnSite request. The method will close the +// http.Response Body if it receives an error. +func (client VpnSiteLinksClient) ListByVpnSiteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVpnSiteResponder handles the response to the ListByVpnSite request. The method always +// closes the http.Response Body. +func (client VpnSiteLinksClient) ListByVpnSiteResponder(resp *http.Response) (result ListVpnSiteLinksResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnSiteNextResults retrieves the next set of results, if any. +func (client VpnSiteLinksClient) listByVpnSiteNextResults(ctx context.Context, lastResults ListVpnSiteLinksResult) (result ListVpnSiteLinksResult, err error) { + req, err := lastResults.listVpnSiteLinksResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnSiteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnSiteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnSiteComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnSiteLinksClient) ListByVpnSiteComplete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result ListVpnSiteLinksResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.ListByVpnSite") + 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.ListByVpnSite(ctx, resourceGroupName, vpnSiteName) + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnsites.go b/services/network/mgmt/2021-03-01/network/vpnsites.go new file mode 100644 index 000000000000..76c4744b1197 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnsites.go @@ -0,0 +1,588 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnSitesClient is the network Client +type VpnSitesClient struct { + BaseClient +} + +// NewVpnSitesClient creates an instance of the VpnSitesClient client. +func NewVpnSitesClient(subscriptionID string) VpnSitesClient { + return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVpnSitesClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesClient { + return VpnSitesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being created or updated. +// vpnSiteParameters - parameters supplied to create or update VpnSite. +func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (result VpnSitesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: vpnSiteParameters, + Constraints: []validation.Constraint{{Target: "vpnSiteParameters.VpnSiteProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "vpnSiteParameters.VpnSiteProperties.BgpProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "vpnSiteParameters.VpnSiteProperties.BgpProperties.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "vpnSiteParameters.VpnSiteProperties.BgpProperties.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "vpnSiteParameters.VpnSiteProperties.BgpProperties.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.VpnSitesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + vpnSiteParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", pathParameters), + autorest.WithJSON(vpnSiteParameters), + 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 VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) CreateOrUpdateResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VpnSite. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being deleted. +func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSitesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, vpnSiteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2021-03-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.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VPN site. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being retrieved. +func (client VpnSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSite, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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, vpnSiteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2021-03-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.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) GetResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VpnSites in a subscription. +func (client VpnSitesClient) List(ctx context.Context) (result ListVpnSitesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.List") + defer func() { + sc := -1 + if result.lvsr.Response.Response != nil { + sc = result.lvsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure sending request") + return + } + + result.lvsr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure responding to request") + return + } + if result.lvsr.hasNextLink() && result.lvsr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites", 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 VpnSitesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) ListResponder(resp *http.Response) (result ListVpnSitesResult, err error) { + err = autorest.Respond( + resp, + 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 VpnSitesClient) listNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) { + req, err := lastResults.listVpnSitesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "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, "network.VpnSitesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnSitesClient) ListComplete(ctx context.Context) (result ListVpnSitesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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 lists all the vpnSites in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +func (client VpnSitesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lvsr.Response.Response != nil { + sc = result.lvsr.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, "network.VpnSitesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvsr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvsr.hasNextLink() && result.lvsr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VpnSitesClient) 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 = "2021-03-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.Network/vpnSites", 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 VpnSitesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnSitesResult, err error) { + err = autorest.Respond( + resp, + 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 VpnSitesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) { + req, err := lastResults.listVpnSitesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "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, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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 +} + +// UpdateTags updates VpnSite tags. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being updated. +// vpnSiteParameters - parameters supplied to update VpnSite tags. +func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSite, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2021-03-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.Network/vpnSites/{vpnSiteName}", pathParameters), + autorest.WithJSON(vpnSiteParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) UpdateTagsResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2021-03-01/network/vpnsitesconfiguration.go new file mode 100644 index 000000000000..eb290952a4a2 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/vpnsitesconfiguration.go @@ -0,0 +1,119 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// VpnSitesConfigurationClient is the network Client +type VpnSitesConfigurationClient struct { + BaseClient +} + +// NewVpnSitesConfigurationClient creates an instance of the VpnSitesConfigurationClient client. +func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfigurationClient { + return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewVpnSitesConfigurationClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesConfigurationClient { + return VpnSitesConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Download gives the sas-url to download the configurations for vpn-sites in a resource group. +// Parameters: +// resourceGroupName - the resource group name. +// virtualWANName - the name of the VirtualWAN for which configuration of all vpn-sites is needed. +// request - parameters supplied to download vpn-sites configuration. +func (client VpnSitesConfigurationClient) Download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesConfigurationClient.Download") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.OutputBlobSasURL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.VpnSitesConfigurationClient", "Download", err.Error()) + } + + req, err := client.DownloadPreparer(ctx, resourceGroupName, virtualWANName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure preparing request") + return + } + + result, err = client.DownloadSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure sending request") + return + } + + return +} + +// DownloadPreparer prepares the Download request. +func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2021-03-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.Network/virtualWans/{virtualWANName}/vpnConfiguration", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DownloadSender sends the Download request. The method will close the +// http.Response Body if it receives an error. +func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DownloadResponder handles the response to the Download request. The method always +// closes the http.Response Body. +func (client VpnSitesConfigurationClient) DownloadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2021-03-01/network/watchers.go b/services/network/mgmt/2021-03-01/network/watchers.go new file mode 100644 index 000000000000..588dd1cbdb24 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/watchers.go @@ -0,0 +1,1556 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WatchersClient is the network Client +type WatchersClient struct { + BaseClient +} + +// NewWatchersClient creates an instance of the WatchersClient client. +func NewWatchersClient(subscriptionID string) WatchersClient { + return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient { + return WatchersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckConnectivity verifies the possibility of establishing a direct TCP connection from a virtual machine to a given +// endpoint including another VM or an arbitrary remote server. +// Parameters: +// resourceGroupName - the name of the network watcher resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that determine how the connectivity check will be performed. +func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (result WatchersCheckConnectivityFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.CheckConnectivity") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Source.ResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Source.Port", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Source.Port", Name: validation.InclusiveMaximum, Rule: int64(65535), Chain: nil}, + {Target: "parameters.Source.Port", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + {Target: "parameters.Destination", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Destination.Port", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Destination.Port", Name: validation.InclusiveMaximum, Rule: int64(65535), Chain: nil}, + {Target: "parameters.Destination.Port", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "CheckConnectivity", err.Error()) + } + + req, err := client.CheckConnectivityPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure preparing request") + return + } + + result, err = client.CheckConnectivitySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure sending request") + return + } + + return +} + +// CheckConnectivityPreparer prepares the CheckConnectivity request. +func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/connectivityCheck", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckConnectivitySender sends the CheckConnectivity request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CheckConnectivityResponder handles the response to the CheckConnectivity request. The method always +// closes the http.Response Body. +func (client WatchersClient) CheckConnectivityResponder(resp *http.Response) (result ConnectivityInformation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a network watcher in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters that define the network watcher resource. +func (client WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (result Watcher, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.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, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", 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 WatchersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WatchersClient) CreateOrUpdateResponder(resp *http.Response) (result Watcher, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified network watcher resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +func (client WatchersClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result WatchersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}", 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 WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WatchersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified network watcher by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +func (client WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string) (result Watcher, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.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, networkWatcherName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}", 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 WatchersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetResponder(resp *http.Response) (result Watcher, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAzureReachabilityReport nOTE: This feature is currently in preview and still being tested for stability. Gets the +// relative latency score for internet service providers from a specified location to Azure regions. +// Parameters: +// resourceGroupName - the name of the network watcher resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that determine Azure reachability report configuration. +func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (result WatchersGetAzureReachabilityReportFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetAzureReachabilityReport") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ProviderLocation", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ProviderLocation.Country", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.StartTime", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.EndTime", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetAzureReachabilityReport", err.Error()) + } + + req, err := client.GetAzureReachabilityReportPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure preparing request") + return + } + + result, err = client.GetAzureReachabilityReportSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure sending request") + return + } + + return +} + +// GetAzureReachabilityReportPreparer prepares the GetAzureReachabilityReport request. +func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAzureReachabilityReportSender sends the GetAzureReachabilityReport request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetAzureReachabilityReportResponder handles the response to the GetAzureReachabilityReport request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Response) (result AzureReachabilityReport, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFlowLogStatus queries status of flow log and traffic analytics (optional) on a specified resource. +// Parameters: +// resourceGroupName - the name of the network watcher resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status. +func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetFlowLogStatus") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetFlowLogStatus", err.Error()) + } + + req, err := client.GetFlowLogStatusPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure preparing request") + return + } + + result, err = client.GetFlowLogStatusSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure sending request") + return + } + + return +} + +// GetFlowLogStatusPreparer prepares the GetFlowLogStatus request. +func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetFlowLogStatusResponder handles the response to the GetFlowLogStatus request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (result FlowLogInformation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNetworkConfigurationDiagnostic gets Network Configuration Diagnostic data to help customers understand and debug +// network behavior. It provides detailed information on what security rules were applied to a specified traffic flow +// and the result of evaluating these rules. Customers must provide details of a flow like source, destination, +// protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and +// the evaluation results. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters to get network configuration diagnostic. +func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (result WatchersGetNetworkConfigurationDiagnosticFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNetworkConfigurationDiagnostic") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Profiles", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetNetworkConfigurationDiagnostic", err.Error()) + } + + req, err := client.GetNetworkConfigurationDiagnosticPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure preparing request") + return + } + + result, err = client.GetNetworkConfigurationDiagnosticSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure sending request") + return + } + + return +} + +// GetNetworkConfigurationDiagnosticPreparer prepares the GetNetworkConfigurationDiagnostic request. +func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNetworkConfigurationDiagnosticSender sends the GetNetworkConfigurationDiagnostic request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetNetworkConfigurationDiagnosticResponder handles the response to the GetNetworkConfigurationDiagnostic request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetNetworkConfigurationDiagnosticResponder(resp *http.Response) (result ConfigurationDiagnosticResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNextHop gets the next hop from the specified VM. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters that define the source and destination endpoint. +func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (result WatchersGetNextHopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNextHop") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.SourceIPAddress", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DestinationIPAddress", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetNextHop", err.Error()) + } + + req, err := client.GetNextHopPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure preparing request") + return + } + + result, err = client.GetNextHopSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure sending request") + return + } + + return +} + +// GetNextHopPreparer prepares the GetNextHop request. +func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/nextHop", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNextHopSender sends the GetNextHop request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetNextHopResponder handles the response to the GetNextHop request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetNextHopResponder(resp *http.Response) (result NextHopResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTopology gets the current network topology by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters that define the representation of topology. +func (client WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (result Topology, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTopology") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetTopologyPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", nil, "Failure preparing request") + return + } + + resp, err := client.GetTopologySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure sending request") + return + } + + result, err = client.GetTopologyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure responding to request") + return + } + + return +} + +// GetTopologyPreparer prepares the GetTopology request. +func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/topology", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetTopologySender sends the GetTopology request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetTopologySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetTopologyResponder handles the response to the GetTopology request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetTopologyResponder(resp *http.Response) (result Topology, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTroubleshooting initiate troubleshooting on a specified resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that define the resource to troubleshoot. +func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (result WatchersGetTroubleshootingFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshooting") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TroubleshootingProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.TroubleshootingProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TroubleshootingProperties.StoragePath", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetTroubleshooting", err.Error()) + } + + req, err := client.GetTroubleshootingPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure preparing request") + return + } + + result, err = client.GetTroubleshootingSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure sending request") + return + } + + return +} + +// GetTroubleshootingPreparer prepares the GetTroubleshooting request. +func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/troubleshoot", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetTroubleshootingResponder handles the response to the GetTroubleshooting request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetTroubleshootingResponder(resp *http.Response) (result TroubleshootingResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTroubleshootingResult get the last completed troubleshooting result on a specified resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that define the resource to query the troubleshooting result. +func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (result WatchersGetTroubleshootingResultFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshootingResult") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetTroubleshootingResult", err.Error()) + } + + req, err := client.GetTroubleshootingResultPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure preparing request") + return + } + + result, err = client.GetTroubleshootingResultSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure sending request") + return + } + + return +} + +// GetTroubleshootingResultPreparer prepares the GetTroubleshootingResult request. +func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetTroubleshootingResultResponder handles the response to the GetTroubleshootingResult request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetTroubleshootingResultResponder(resp *http.Response) (result TroubleshootingResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVMSecurityRules gets the configured and effective security group rules on the specified VM. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters that define the VM to check security groups for. +func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (result WatchersGetVMSecurityRulesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetVMSecurityRules") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "GetVMSecurityRules", err.Error()) + } + + req, err := client.GetVMSecurityRulesPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure preparing request") + return + } + + result, err = client.GetVMSecurityRulesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure sending request") + return + } + + return +} + +// GetVMSecurityRulesPreparer prepares the GetVMSecurityRules request. +func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/securityGroupView", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetVMSecurityRulesResponder handles the response to the GetVMSecurityRules request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetVMSecurityRulesResponder(resp *http.Response) (result SecurityGroupViewResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all network watchers by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client WatchersClient) List(ctx context.Context, resourceGroupName string) (result WatcherListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.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, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WatchersClient) ListPreparer(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 = "2021-03-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.Network/networkWatchers", 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 WatchersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WatchersClient) ListResponder(resp *http.Response) (result WatcherListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAll gets all network watchers by subscription. +func (client WatchersClient) ListAll(ctx context.Context) (result WatcherListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAll") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure sending request") + return + } + + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure responding to request") + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client WatchersClient) ListAllResponder(resp *http.Response) (result WatcherListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableProviders nOTE: This feature is currently in preview and still being tested for stability. Lists all +// available internet service providers for a specified Azure region. +// Parameters: +// resourceGroupName - the name of the network watcher resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that scope the list of available providers. +func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (result WatchersListAvailableProvidersFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAvailableProviders") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableProvidersPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure preparing request") + return + } + + result, err = client.ListAvailableProvidersSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure sending request") + return + } + + return +} + +// ListAvailableProvidersPreparer prepares the ListAvailableProviders request. +func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/availableProvidersList", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableProvidersSender sends the ListAvailableProviders request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListAvailableProvidersResponder handles the response to the ListAvailableProviders request. The method always +// closes the http.Response Body. +func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response) (result AvailableProvidersList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetFlowLogConfiguration configures flow log and traffic analytics (optional) on a specified resource. +// Parameters: +// resourceGroupName - the name of the network watcher resource group. +// networkWatcherName - the name of the network watcher resource. +// parameters - parameters that define the configuration of flow log. +func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (result WatchersSetFlowLogConfigurationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.SetFlowLogConfiguration") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.FlowLogProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.FlowLogProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.FlowLogProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "SetFlowLogConfiguration", err.Error()) + } + + req, err := client.SetFlowLogConfigurationPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure preparing request") + return + } + + result, err = client.SetFlowLogConfigurationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure sending request") + return + } + + return +} + +// SetFlowLogConfigurationPreparer prepares the SetFlowLogConfiguration request. +func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/configureFlowLog", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// SetFlowLogConfigurationResponder handles the response to the SetFlowLogConfiguration request. The method always +// closes the http.Response Body. +func (client WatchersClient) SetFlowLogConfigurationResponder(resp *http.Response) (result FlowLogInformation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags updates a network watcher tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters supplied to update network watcher tags. +func (client WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (result Watcher, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client WatchersClient) UpdateTagsResponder(resp *http.Response) (result Watcher, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// VerifyIPFlow verify IP flow from the specified VM to a location given the currently configured NSG rules. +// Parameters: +// resourceGroupName - the name of the resource group. +// networkWatcherName - the name of the network watcher. +// parameters - parameters that define the IP flow to be verified. +func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (result WatchersVerifyIPFlowFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.VerifyIPFlow") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.LocalPort", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RemotePort", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.LocalIPAddress", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RemoteIPAddress", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WatchersClient", "VerifyIPFlow", err.Error()) + } + + req, err := client.VerifyIPFlowPreparer(ctx, resourceGroupName, networkWatcherName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure preparing request") + return + } + + result, err = client.VerifyIPFlowSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure sending request") + return + } + + return +} + +// VerifyIPFlowPreparer prepares the VerifyIPFlow request. +func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-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.Network/networkWatchers/{networkWatcherName}/ipFlowVerify", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// VerifyIPFlowResponder handles the response to the VerifyIPFlow request. The method always +// closes the http.Response Body. +func (client WatchersClient) VerifyIPFlowResponder(resp *http.Response) (result VerificationIPFlowResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2021-03-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2021-03-01/network/webapplicationfirewallpolicies.go new file mode 100644 index 000000000000..2c0b77c4b746 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/webapplicationfirewallpolicies.go @@ -0,0 +1,524 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WebApplicationFirewallPoliciesClient is the network Client +type WebApplicationFirewallPoliciesClient struct { + BaseClient +} + +// NewWebApplicationFirewallPoliciesClient creates an instance of the WebApplicationFirewallPoliciesClient client. +func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicationFirewallPoliciesClient { + return NewWebApplicationFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { + return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or update policy with specified rule set name within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// policyName - the name of the policy. +// parameters - policy to be created. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (result WebApplicationFirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat", Name: validation.Null, Rule: false, + 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.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: 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}}}, + }}}}}); err != nil { + return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, policyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{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 WebApplicationFirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes Policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// policyName - the name of the policy. +func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Context, 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), + } + + const APIVersion = "2021-03-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{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 WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve protection policy with specified name within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// policyName - the name of the policy. +func (client WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Context, 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), + } + + const APIVersion = "2021-03-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{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 WebApplicationFirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) GetResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the protection policies within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client WebApplicationFirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.List") + defer func() { + sc := -1 + if result.wafplr.Response.Response != nil { + sc = result.wafplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wafplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.wafplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.wafplr.hasNextLink() && result.wafplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WebApplicationFirewallPoliciesClient) ListPreparer(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 = "2021-03-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.Network/ApplicationGatewayWebApplicationFirewallPolicies", 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 WebApplicationFirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) ListResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 WebApplicationFirewallPoliciesClient) listNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) { + req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "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, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WebApplicationFirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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) + return +} + +// ListAll gets all the WAF policies in a subscription. +func (client WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context) (result WebApplicationFirewallPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll") + defer func() { + sc := -1 + if result.wafplr.Response.Response != nil { + sc = result.wafplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.wafplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure sending request") + return + } + + result.wafplr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.wafplr.hasNextLink() && result.wafplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client WebApplicationFirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) ListAllResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client WebApplicationFirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) { + req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client WebApplicationFirewallPoliciesClient) ListAllComplete(ctx context.Context) (result WebApplicationFirewallPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll") + 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.ListAll(ctx) + return +} diff --git a/services/network/mgmt/2021-03-01/network/webcategories.go b/services/network/mgmt/2021-03-01/network/webcategories.go new file mode 100644 index 000000000000..c7204f4d8db6 --- /dev/null +++ b/services/network/mgmt/2021-03-01/network/webcategories.go @@ -0,0 +1,222 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WebCategoriesClient is the network Client +type WebCategoriesClient struct { + BaseClient +} + +// NewWebCategoriesClient creates an instance of the WebCategoriesClient client. +func NewWebCategoriesClient(subscriptionID string) WebCategoriesClient { + return NewWebCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWebCategoriesClientWithBaseURI creates an instance of the WebCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWebCategoriesClientWithBaseURI(baseURI string, subscriptionID string) WebCategoriesClient { + return WebCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified Azure Web Category. +// Parameters: +// name - the name of the azureWebCategory. +// expand - expands resourceIds back referenced by the azureWebCategory resource. +func (client WebCategoriesClient) Get(ctx context.Context, name string, expand string) (result AzureWebCategory, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebCategoriesClient.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, name, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WebCategoriesClient) GetPreparer(ctx context.Context, name string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + 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}/providers/Microsoft.Network/azureWebCategories/{name}", 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 WebCategoriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WebCategoriesClient) GetResponder(resp *http.Response) (result AzureWebCategory, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription gets all the Azure Web Categories in a subscription. +func (client WebCategoriesClient) ListBySubscription(ctx context.Context) (result AzureWebCategoryListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebCategoriesClient.ListBySubscription") + defer func() { + sc := -1 + if result.awclr.Response.Response != nil { + sc = result.awclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.awclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.awclr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.awclr.hasNextLink() && result.awclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client WebCategoriesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories", 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 WebCategoriesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client WebCategoriesClient) ListBySubscriptionResponder(resp *http.Response) (result AzureWebCategoryListResult, err error) { + err = autorest.Respond( + resp, + 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 WebCategoriesClient) listBySubscriptionNextResults(ctx context.Context, lastResults AzureWebCategoryListResult) (result AzureWebCategoryListResult, err error) { + req, err := lastResults.azureWebCategoryListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.WebCategoriesClient", "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, "network.WebCategoriesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebCategoriesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client WebCategoriesClient) ListBySubscriptionComplete(ctx context.Context) (result AzureWebCategoryListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebCategoriesClient.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 +} diff --git a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/CHANGELOG.md b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/CHANGELOG.md index 7a8e556f845b..8242f607c882 100644 --- a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/CHANGELOG.md +++ b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/CHANGELOG.md @@ -2,28 +2,21 @@ ## Breaking Changes -### Removed Constants +### Signature Changes -1. ResourceIdentityType.ResourceIdentityTypeSystemAssigned +#### Struct Fields -### Removed Funcs +1. RestartParameter.FailoverMode changed type from *string to FailoverMode -1. Identity.MarshalJSON() ([]byte, error) -1. PossibleResourceIdentityTypeValues() []ResourceIdentityType -1. ResourceModelWithAllowedPropertySet.MarshalJSON() ([]byte, error) -1. ResourceModelWithAllowedPropertySetIdentity.MarshalJSON() ([]byte, error) +## Additive Changes -### Struct Changes +### New Constants -#### Removed Structs +1. FailoverMode.FailoverModeForcedFailover +1. FailoverMode.FailoverModeForcedSwitchover +1. FailoverMode.FailoverModePlannedFailover +1. FailoverMode.FailoverModePlannedSwitchover -1. Identity -1. Plan -1. ResourceModelWithAllowedPropertySet -1. ResourceModelWithAllowedPropertySetIdentity -1. ResourceModelWithAllowedPropertySetPlan -1. ResourceModelWithAllowedPropertySetSku +### New Funcs -#### Removed Struct Fields - -1. Server.Identity +1. PossibleFailoverModeValues() []FailoverMode diff --git a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/_meta.json b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/_meta.json index f1c2e9694d87..9eecd212f289 100644 --- a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/_meta.json +++ b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/_meta.json @@ -1,5 +1,5 @@ { - "commit": "b47572ab2069865484c493a4f679d4e72f8b303d", + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", "readme": "/_/azure-rest-api-specs/specification/postgresql/resource-manager/readme.md", "tag": "package-flexibleserver-2021-06", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/enums.go b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/enums.go index 3876cd25e0ac..964ca84583d7 100644 --- a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/enums.go +++ b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/enums.go @@ -78,6 +78,25 @@ func PossibleCreateModeForUpdateValues() []CreateModeForUpdate { return []CreateModeForUpdate{CreateModeForUpdateDefault, CreateModeForUpdateUpdate} } +// FailoverMode enumerates the values for failover mode. +type FailoverMode string + +const ( + // FailoverModeForcedFailover ... + FailoverModeForcedFailover FailoverMode = "ForcedFailover" + // FailoverModeForcedSwitchover ... + FailoverModeForcedSwitchover FailoverMode = "ForcedSwitchover" + // FailoverModePlannedFailover ... + FailoverModePlannedFailover FailoverMode = "PlannedFailover" + // FailoverModePlannedSwitchover ... + FailoverModePlannedSwitchover FailoverMode = "PlannedSwitchover" +) + +// PossibleFailoverModeValues returns an array of possible values for the FailoverMode const type. +func PossibleFailoverModeValues() []FailoverMode { + return []FailoverMode{FailoverModeForcedFailover, FailoverModeForcedSwitchover, FailoverModePlannedFailover, FailoverModePlannedSwitchover} +} + // GeoRedundantBackupEnum enumerates the values for geo redundant backup enum. type GeoRedundantBackupEnum string diff --git a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/models.go b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/models.go index 387f351af037..17a84ee01da8 100644 --- a/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/models.go +++ b/services/postgresql/mgmt/2021-06-01/postgresqlflexibleservers/models.go @@ -1541,8 +1541,8 @@ func (r Resource) MarshalJSON() ([]byte, error) { type RestartParameter struct { // RestartWithFailover - Indicates whether to restart the server with failover. RestartWithFailover *bool `json:"restartWithFailover,omitempty"` - // FailoverMode - Failover mode. - FailoverMode *string `json:"failoverMode,omitempty"` + // FailoverMode - Failover mode. Possible values include: 'FailoverModePlannedFailover', 'FailoverModeForcedFailover', 'FailoverModePlannedSwitchover', 'FailoverModeForcedSwitchover' + FailoverMode FailoverMode `json:"failoverMode,omitempty"` } // Server represents a server. diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/CHANGELOG.md b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/CHANGELOG.md index ec330200d3bf..a78104c25338 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/CHANGELOG.md +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/CHANGELOG.md @@ -1,56 +1,198 @@ # Change History +## Breaking Changes + +### Removed Constants + +1. APIType.Cassandra +1. APIType.Gremlin +1. APIType.GremlinV2 +1. APIType.MongoDB +1. APIType.SQL +1. APIType.Table +1. BackupPolicyType.Continuous +1. BackupPolicyType.Periodic +1. BackupStorageRedundancy.Geo +1. BackupStorageRedundancy.Local +1. BackupStorageRedundancy.Zone +1. CompositePathSortOrder.Ascending +1. CompositePathSortOrder.Descending +1. ConflictResolutionMode.Custom +1. ConflictResolutionMode.LastWriterWins +1. ConnectorOffer.Small +1. CreateMode.Default +1. CreateMode.Restore +1. CreateModeBasicDatabaseAccountCreateUpdateProperties.CreateModeDatabaseAccountCreateUpdateProperties +1. CreatedByType.Application +1. CreatedByType.Key +1. CreatedByType.ManagedIdentity +1. CreatedByType.User +1. DataType.LineString +1. DataType.MultiPolygon +1. DataType.Number +1. DataType.Point +1. DataType.Polygon +1. DataType.String +1. DatabaseAccountOfferType.Standard +1. DefaultConsistencyLevel.BoundedStaleness +1. DefaultConsistencyLevel.ConsistentPrefix +1. DefaultConsistencyLevel.Eventual +1. DefaultConsistencyLevel.Session +1. DefaultConsistencyLevel.Strong +1. IndexKind.Hash +1. IndexKind.Range +1. IndexKind.Spatial +1. IndexingMode.Consistent +1. IndexingMode.Lazy +1. IndexingMode.None +1. KeyKind.Primary +1. KeyKind.PrimaryReadonly +1. KeyKind.Secondary +1. KeyKind.SecondaryReadonly +1. ManagedCassandraProvisioningState.Canceled +1. ManagedCassandraProvisioningState.Creating +1. ManagedCassandraProvisioningState.Deleting +1. ManagedCassandraProvisioningState.Failed +1. ManagedCassandraProvisioningState.Succeeded +1. ManagedCassandraProvisioningState.Updating +1. NodeState.Joining +1. NodeState.Leaving +1. NodeState.Moving +1. NodeState.Normal +1. NodeState.Stopped +1. NodeStatus.Down +1. NodeStatus.Up +1. OperationType.Create +1. OperationType.Delete +1. OperationType.Replace +1. OperationType.SystemOperation +1. PublicNetworkAccess.Disabled +1. PublicNetworkAccess.Enabled +1. RestoreMode.PointInTime +1. RoleDefinitionType.BuiltInRole +1. RoleDefinitionType.CustomRole +1. ServerVersion.FourFullStopZero +1. ServerVersion.ThreeFullStopSix +1. ServerVersion.ThreeFullStopTwo +1. TriggerType.Post +1. TriggerType.Pre +1. UnitType.Bytes +1. UnitType.BytesPerSecond +1. UnitType.Count +1. UnitType.CountPerSecond +1. UnitType.Milliseconds +1. UnitType.Percent +1. UnitType.Seconds + +### Signature Changes + +#### Const Types + +1. CreateModeDefault changed type from CreateModeBasicDatabaseAccountCreateUpdateProperties to CreateMode +1. CreateModeRestore changed type from CreateModeBasicDatabaseAccountCreateUpdateProperties to CreateMode + ## Additive Changes +### New Constants + +1. APIType.APITypeCassandra +1. APIType.APITypeGremlin +1. APIType.APITypeGremlinV2 +1. APIType.APITypeMongoDB +1. APIType.APITypeSQL +1. APIType.APITypeTable +1. BackupPolicyType.BackupPolicyTypeContinuous +1. BackupPolicyType.BackupPolicyTypePeriodic +1. BackupStorageRedundancy.BackupStorageRedundancyGeo +1. BackupStorageRedundancy.BackupStorageRedundancyLocal +1. BackupStorageRedundancy.BackupStorageRedundancyZone +1. CompositePathSortOrder.CompositePathSortOrderAscending +1. CompositePathSortOrder.CompositePathSortOrderDescending +1. ConflictResolutionMode.ConflictResolutionModeCustom +1. ConflictResolutionMode.ConflictResolutionModeLastWriterWins +1. ConnectorOffer.ConnectorOfferSmall +1. CreateModeBasicDatabaseAccountCreateUpdateProperties.CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties +1. CreateModeBasicDatabaseAccountCreateUpdateProperties.CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault +1. CreateModeBasicDatabaseAccountCreateUpdateProperties.CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore +1. CreatedByType.CreatedByTypeApplication +1. CreatedByType.CreatedByTypeKey +1. CreatedByType.CreatedByTypeManagedIdentity +1. CreatedByType.CreatedByTypeUser +1. DataType.DataTypeLineString +1. DataType.DataTypeMultiPolygon +1. DataType.DataTypeNumber +1. DataType.DataTypePoint +1. DataType.DataTypePolygon +1. DataType.DataTypeString +1. DatabaseAccountOfferType.DatabaseAccountOfferTypeStandard +1. DefaultConsistencyLevel.DefaultConsistencyLevelBoundedStaleness +1. DefaultConsistencyLevel.DefaultConsistencyLevelConsistentPrefix +1. DefaultConsistencyLevel.DefaultConsistencyLevelEventual +1. DefaultConsistencyLevel.DefaultConsistencyLevelSession +1. DefaultConsistencyLevel.DefaultConsistencyLevelStrong +1. IndexKind.IndexKindHash +1. IndexKind.IndexKindRange +1. IndexKind.IndexKindSpatial +1. IndexingMode.IndexingModeConsistent +1. IndexingMode.IndexingModeLazy +1. IndexingMode.IndexingModeNone +1. KeyKind.KeyKindPrimary +1. KeyKind.KeyKindPrimaryReadonly +1. KeyKind.KeyKindSecondary +1. KeyKind.KeyKindSecondaryReadonly +1. ManagedCassandraProvisioningState.ManagedCassandraProvisioningStateCanceled +1. ManagedCassandraProvisioningState.ManagedCassandraProvisioningStateCreating +1. ManagedCassandraProvisioningState.ManagedCassandraProvisioningStateDeleting +1. ManagedCassandraProvisioningState.ManagedCassandraProvisioningStateFailed +1. ManagedCassandraProvisioningState.ManagedCassandraProvisioningStateSucceeded +1. ManagedCassandraProvisioningState.ManagedCassandraProvisioningStateUpdating +1. NodeState.NodeStateJoining +1. NodeState.NodeStateLeaving +1. NodeState.NodeStateMoving +1. NodeState.NodeStateNormal +1. NodeState.NodeStateStopped +1. NodeStatus.NodeStatusDown +1. NodeStatus.NodeStatusUp +1. OperationType.OperationTypeCreate +1. OperationType.OperationTypeDelete +1. OperationType.OperationTypeReplace +1. OperationType.OperationTypeSystemOperation +1. PublicNetworkAccess.PublicNetworkAccessDisabled +1. PublicNetworkAccess.PublicNetworkAccessEnabled +1. RestoreMode.RestoreModePointInTime +1. RoleDefinitionType.RoleDefinitionTypeBuiltInRole +1. RoleDefinitionType.RoleDefinitionTypeCustomRole +1. ServerVersion.ServerVersionFourFullStopZero +1. ServerVersion.ServerVersionThreeFullStopSix +1. ServerVersion.ServerVersionThreeFullStopTwo +1. TriggerType.TriggerTypePost +1. TriggerType.TriggerTypePre +1. UnitType.UnitTypeBytes +1. UnitType.UnitTypeBytesPerSecond +1. UnitType.UnitTypeCount +1. UnitType.UnitTypeCountPerSecond +1. UnitType.UnitTypeMilliseconds +1. UnitType.UnitTypePercent +1. UnitType.UnitTypeSeconds + ### New Funcs -1. ARMProxyResource.MarshalJSON() ([]byte, error) -1. AzureEntityResource.MarshalJSON() ([]byte, error) -1. CassandraKeyspaceListResult.MarshalJSON() ([]byte, error) -1. CassandraTableListResult.MarshalJSON() ([]byte, error) -1. DatabaseAccountConnectionString.MarshalJSON() ([]byte, error) -1. DatabaseAccountListKeysResult.MarshalJSON() ([]byte, error) -1. DatabaseAccountListReadOnlyKeysResult.MarshalJSON() ([]byte, error) -1. DatabaseAccountsListResult.MarshalJSON() ([]byte, error) -1. ExtendedResourceProperties.MarshalJSON() ([]byte, error) -1. GremlinDatabaseListResult.MarshalJSON() ([]byte, error) -1. GremlinGraphListResult.MarshalJSON() ([]byte, error) -1. ListBackups.MarshalJSON() ([]byte, error) -1. ListDataCenters.MarshalJSON() ([]byte, error) -1. ManagedServiceIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error) -1. MetricAvailability.MarshalJSON() ([]byte, error) -1. MetricDefinitionsListResult.MarshalJSON() ([]byte, error) -1. MetricListResult.MarshalJSON() ([]byte, error) -1. MetricName.MarshalJSON() ([]byte, error) -1. MetricValue.MarshalJSON() ([]byte, error) -1. MongoDBCollectionListResult.MarshalJSON() ([]byte, error) -1. MongoDBDatabaseListResult.MarshalJSON() ([]byte, error) -1. NotebookWorkspaceConnectionInfoResult.MarshalJSON() ([]byte, error) -1. NotebookWorkspaceCreateUpdateParameters.MarshalJSON() ([]byte, error) -1. NotebookWorkspaceProperties.MarshalJSON() ([]byte, error) -1. PartitionMetricListResult.MarshalJSON() ([]byte, error) -1. PartitionUsagesResult.MarshalJSON() ([]byte, error) -1. PercentileMetricListResult.MarshalJSON() ([]byte, error) -1. PercentileMetricValue.MarshalJSON() ([]byte, error) -1. PrivateLinkResourceProperties.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. RestorableDatabaseAccountsListResult.MarshalJSON() ([]byte, error) -1. RestorableLocationResource.MarshalJSON() ([]byte, error) -1. RestorableMongodbCollectionPropertiesResource.MarshalJSON() ([]byte, error) -1. RestorableMongodbCollectionsListResult.MarshalJSON() ([]byte, error) -1. RestorableMongodbDatabasePropertiesResource.MarshalJSON() ([]byte, error) -1. RestorableMongodbDatabasesListResult.MarshalJSON() ([]byte, error) -1. RestorableMongodbResourcesListResult.MarshalJSON() ([]byte, error) -1. RestorableSQLContainersListResult.MarshalJSON() ([]byte, error) -1. RestorableSQLDatabasesListResult.MarshalJSON() ([]byte, error) -1. RestorableSQLResourcesListResult.MarshalJSON() ([]byte, error) -1. SQLContainerListResult.MarshalJSON() ([]byte, error) -1. SQLDatabaseListResult.MarshalJSON() ([]byte, error) -1. SQLRoleAssignmentListResult.MarshalJSON() ([]byte, error) -1. SQLRoleDefinitionListResult.MarshalJSON() ([]byte, error) -1. SQLStoredProcedureListResult.MarshalJSON() ([]byte, error) -1. SQLTriggerListResult.MarshalJSON() ([]byte, error) -1. SQLUserDefinedFunctionListResult.MarshalJSON() ([]byte, error) -1. TableListResult.MarshalJSON() ([]byte, error) -1. UsagesResult.MarshalJSON() ([]byte, error) +1. BaseClient.LocationGet(context.Context, string) (LocationGetResult, error) +1. BaseClient.LocationGetPreparer(context.Context, string) (*http.Request, error) +1. BaseClient.LocationGetResponder(*http.Response) (LocationGetResult, error) +1. BaseClient.LocationGetSender(*http.Request) (*http.Response, error) +1. BaseClient.LocationList(context.Context) (LocationListResult, error) +1. BaseClient.LocationListPreparer(context.Context) (*http.Request, error) +1. BaseClient.LocationListResponder(*http.Response) (LocationListResult, error) +1. BaseClient.LocationListSender(*http.Request) (*http.Response, error) +1. LocationGetResult.MarshalJSON() ([]byte, error) +1. LocationListResult.MarshalJSON() ([]byte, error) +1. LocationProperties.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### New Structs + +1. LocationGetResult +1. LocationListResult +1. LocationProperties diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/_meta.json b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/_meta.json index 1ea53720548b..e967af279ce1 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/_meta.json +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/_meta.json @@ -1,11 +1,11 @@ { - "commit": "fbdca24500e7218ef975ca2947651d6d84933ef9", + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", "readme": "/_/azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md", "tag": "package-2021-03-preview", "use": "@microsoft.azure/autorest.go@2.1.183", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md", "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } } \ No newline at end of file diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraclusters.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraclusters.go index a9649b899489..22536ac6a44c 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraclusters.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraclusters.go @@ -54,12 +54,11 @@ func (client CassandraClustersClient) CreateUpdate(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "CreateUpdate", err.Error()) } @@ -148,12 +147,11 @@ func (client CassandraClustersClient) Delete(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "Delete", err.Error()) } @@ -239,12 +237,11 @@ func (client CassandraClustersClient) FetchNodeStatus(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "FetchNodeStatus", err.Error()) } @@ -331,12 +328,11 @@ func (client CassandraClustersClient) Get(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "Get", err.Error()) } @@ -422,12 +418,11 @@ func (client CassandraClustersClient) GetBackup(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}, + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}, {TargetValue: backupID, Constraints: []validation.Constraint{{Target: "backupID", Name: validation.MaxLength, Rule: 15, Chain: nil}, {Target: "backupID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -517,12 +512,11 @@ func (client CassandraClustersClient) ListBackupsMethod(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "ListBackupsMethod", err.Error()) } @@ -606,8 +600,7 @@ func (client CassandraClustersClient) ListByResourceGroup(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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 { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "ListByResourceGroup", err.Error()) } @@ -769,12 +762,11 @@ func (client CassandraClustersClient) RequestRepair(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}, + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}, {TargetValue: body, Constraints: []validation.Constraint{{Target: "body.Keyspace", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "RequestRepair", err.Error()) @@ -865,12 +857,11 @@ func (client CassandraClustersClient) Update(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraClustersClient", "Update", err.Error()) } diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandradatacenters.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandradatacenters.go index db63f880151e..582d1fd5beba 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandradatacenters.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandradatacenters.go @@ -55,16 +55,15 @@ func (client CassandraDataCentersClient) CreateUpdate(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}, + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}, {TargetValue: dataCenterName, Constraints: []validation.Constraint{{Target: "dataCenterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "dataCenterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraDataCentersClient", "CreateUpdate", err.Error()) } @@ -155,16 +154,15 @@ func (client CassandraDataCentersClient) Delete(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}, + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}, {TargetValue: dataCenterName, Constraints: []validation.Constraint{{Target: "dataCenterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "dataCenterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraDataCentersClient", "Delete", err.Error()) } @@ -252,16 +250,15 @@ func (client CassandraDataCentersClient) Get(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}, + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}, {TargetValue: dataCenterName, Constraints: []validation.Constraint{{Target: "dataCenterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "dataCenterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraDataCentersClient", "Get", err.Error()) } @@ -347,12 +344,11 @@ func (client CassandraDataCentersClient) List(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraDataCentersClient", "List", err.Error()) } @@ -439,16 +435,15 @@ func (client CassandraDataCentersClient) Update(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: clusterName, Constraints: []validation.Constraint{{Target: "clusterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "clusterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}, + {Target: "clusterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}, {TargetValue: dataCenterName, Constraints: []validation.Constraint{{Target: "dataCenterName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "dataCenterName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*`, Chain: nil}}}}); err != nil { + {Target: "dataCenterName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.CassandraDataCentersClient", "Update", err.Error()) } diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraresources.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraresources.go index f128bc607ad5..eab9101efa2c 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraresources.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/cassandraresources.go @@ -54,8 +54,7 @@ func (client CassandraResourcesClient) CreateUpdateCassandraKeyspace(ctx context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -157,8 +156,7 @@ func (client CassandraResourcesClient) CreateUpdateCassandraTable(ctx context.Co Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -259,8 +257,7 @@ func (client CassandraResourcesClient) DeleteCassandraKeyspace(ctx context.Conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -353,8 +350,7 @@ func (client CassandraResourcesClient) DeleteCassandraTable(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -448,8 +444,7 @@ func (client CassandraResourcesClient) GetCassandraKeyspace(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -541,8 +536,7 @@ func (client CassandraResourcesClient) GetCassandraKeyspaceThroughput(ctx contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -634,8 +628,7 @@ func (client CassandraResourcesClient) GetCassandraTable(ctx context.Context, re Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -729,8 +722,7 @@ func (client CassandraResourcesClient) GetCassandraTableThroughput(ctx context.C Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -821,8 +813,7 @@ func (client CassandraResourcesClient) ListCassandraKeyspaces(ctx context.Contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -912,8 +903,7 @@ func (client CassandraResourcesClient) ListCassandraTables(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1005,8 +995,7 @@ func (client CassandraResourcesClient) MigrateCassandraKeyspaceToAutoscale(ctx c Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1100,8 +1089,7 @@ func (client CassandraResourcesClient) MigrateCassandraKeyspaceToManualThroughpu Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1195,8 +1183,7 @@ func (client CassandraResourcesClient) MigrateCassandraTableToAutoscale(ctx cont Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1292,8 +1279,7 @@ func (client CassandraResourcesClient) MigrateCassandraTableToManualThroughput(c Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1389,8 +1375,7 @@ func (client CassandraResourcesClient) UpdateCassandraKeyspaceThroughput(ctx con Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1495,8 +1480,7 @@ func (client CassandraResourcesClient) UpdateCassandraTableThroughput(ctx contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/client.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/client.go index e81b1cbca045..06cac31f5106 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/client.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/client.go @@ -10,7 +10,12 @@ package documentdb // 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" ) const ( @@ -39,3 +44,160 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { SubscriptionID: subscriptionID, } } + +// LocationGet get the properties of an existing Cosmos DB location +// Parameters: +// location - cosmos DB region, with spaces between words and each word capitalized. +func (client BaseClient) LocationGet(ctx context.Context, location string) (result LocationGetResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.LocationGet") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.BaseClient", "LocationGet", err.Error()) + } + + req, err := client.LocationGetPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.BaseClient", "LocationGet", nil, "Failure preparing request") + return + } + + resp, err := client.LocationGetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.BaseClient", "LocationGet", resp, "Failure sending request") + return + } + + result, err = client.LocationGetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.BaseClient", "LocationGet", resp, "Failure responding to request") + return + } + + return +} + +// LocationGetPreparer prepares the LocationGet request. +func (client BaseClient) LocationGetPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DocumentDB/locations/{location}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// LocationGetSender sends the LocationGet request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) LocationGetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// LocationGetResponder handles the response to the LocationGet request. The method always +// closes the http.Response Body. +func (client BaseClient) LocationGetResponder(resp *http.Response) (result LocationGetResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// LocationList list Cosmos DB locations and their properties +func (client BaseClient) LocationList(ctx context.Context) (result LocationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.LocationList") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.BaseClient", "LocationList", err.Error()) + } + + req, err := client.LocationListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.BaseClient", "LocationList", nil, "Failure preparing request") + return + } + + resp, err := client.LocationListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.BaseClient", "LocationList", resp, "Failure sending request") + return + } + + result, err = client.LocationListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.BaseClient", "LocationList", resp, "Failure responding to request") + return + } + + return +} + +// LocationListPreparer prepares the LocationList request. +func (client BaseClient) LocationListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.DocumentDB/locations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// LocationListSender sends the LocationList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) LocationListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// LocationListResponder handles the response to the LocationList request. The method always +// closes the http.Response Body. +func (client BaseClient) LocationListResponder(resp *http.Response) (result LocationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collection.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collection.go index 3e76e40f94d5..6966a51ec1bd 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collection.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collection.go @@ -53,8 +53,7 @@ func (client CollectionClient) ListMetricDefinitions(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -150,8 +149,7 @@ func (client CollectionClient) ListMetrics(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -247,8 +245,7 @@ func (client CollectionClient) ListUsages(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartition.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartition.go index f0b3ae0fee1d..0c2d0ae1de6a 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartition.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartition.go @@ -57,8 +57,7 @@ func (client CollectionPartitionClient) ListMetrics(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -154,8 +153,7 @@ func (client CollectionPartitionClient) ListUsages(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartitionregion.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartitionregion.go index cae7ea6acca0..e71b2bcb7de0 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartitionregion.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionpartitionregion.go @@ -59,8 +59,7 @@ func (client CollectionPartitionRegionClient) ListMetrics(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionregion.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionregion.go index 7656dde2fe69..e58e2e14bd69 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionregion.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/collectionregion.go @@ -59,8 +59,7 @@ func (client CollectionRegionClient) ListMetrics(ctx context.Context, resourceGr Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/database.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/database.go index 4eaeaf9a2843..431102be52ba 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/database.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/database.go @@ -52,8 +52,7 @@ func (client DatabaseClient) ListMetricDefinitions(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -147,8 +146,7 @@ func (client DatabaseClient) ListMetrics(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -242,8 +240,7 @@ func (client DatabaseClient) ListUsages(ctx context.Context, resourceGroupName s Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccountregion.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccountregion.go index 2413254db4cd..328727938288 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccountregion.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccountregion.go @@ -56,8 +56,7 @@ func (client DatabaseAccountRegionClient) ListMetrics(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccounts.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccounts.go index 9e4955327c59..915db460a769 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccounts.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/databaseaccounts.go @@ -135,8 +135,7 @@ func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -229,8 +228,7 @@ func (client DatabaseAccountsClient) Delete(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -323,8 +321,7 @@ func (client DatabaseAccountsClient) FailoverPriorityChange(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -418,8 +415,7 @@ func (client DatabaseAccountsClient) Get(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -508,8 +504,7 @@ func (client DatabaseAccountsClient) GetReadOnlyKeys(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -672,8 +667,7 @@ func (client DatabaseAccountsClient) ListByResourceGroup(ctx context.Context, re 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: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListByResourceGroup", err.Error()) @@ -759,8 +753,7 @@ func (client DatabaseAccountsClient) ListConnectionStrings(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -849,8 +842,7 @@ func (client DatabaseAccountsClient) ListKeys(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -939,8 +931,7 @@ func (client DatabaseAccountsClient) ListMetricDefinitions(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1032,8 +1023,7 @@ func (client DatabaseAccountsClient) ListMetrics(ctx context.Context, resourceGr Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1123,8 +1113,7 @@ func (client DatabaseAccountsClient) ListReadOnlyKeys(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1215,8 +1204,7 @@ func (client DatabaseAccountsClient) ListUsages(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1309,8 +1297,7 @@ func (client DatabaseAccountsClient) OfflineRegion(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1405,8 +1392,7 @@ func (client DatabaseAccountsClient) OnlineRegion(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1501,8 +1487,7 @@ func (client DatabaseAccountsClient) RegenerateKey(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1595,8 +1580,7 @@ func (client DatabaseAccountsClient) Update(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/documentdbapi/interfaces.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/documentdbapi/interfaces.go index d70c1460868a..a838ba733917 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/documentdbapi/interfaces.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/documentdbapi/interfaces.go @@ -12,6 +12,14 @@ import ( "github.com/Azure/go-autorest/autorest" ) +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + LocationGet(ctx context.Context, location string) (result documentdb.LocationGetResult, err error) + LocationList(ctx context.Context) (result documentdb.LocationListResult, err error) +} + +var _ BaseClientAPI = (*documentdb.BaseClient)(nil) + // DatabaseAccountsClientAPI contains the set of methods on the DatabaseAccountsClient type. type DatabaseAccountsClientAPI interface { CheckNameExists(ctx context.Context, accountName string) (result autorest.Response, err error) diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/enums.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/enums.go index 1d43707d9cc0..864d56abc08c 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/enums.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/enums.go @@ -10,23 +10,23 @@ package documentdb type APIType string const ( - // Cassandra ... - Cassandra APIType = "Cassandra" - // Gremlin ... - Gremlin APIType = "Gremlin" - // GremlinV2 ... - GremlinV2 APIType = "GremlinV2" - // MongoDB ... - MongoDB APIType = "MongoDB" - // SQL ... - SQL APIType = "Sql" - // Table ... - Table APIType = "Table" + // APITypeCassandra ... + APITypeCassandra APIType = "Cassandra" + // APITypeGremlin ... + APITypeGremlin APIType = "Gremlin" + // APITypeGremlinV2 ... + APITypeGremlinV2 APIType = "GremlinV2" + // APITypeMongoDB ... + APITypeMongoDB APIType = "MongoDB" + // APITypeSQL ... + APITypeSQL APIType = "Sql" + // APITypeTable ... + APITypeTable APIType = "Table" ) // PossibleAPITypeValues returns an array of possible values for the APIType const type. func PossibleAPITypeValues() []APIType { - return []APIType{Cassandra, Gremlin, GremlinV2, MongoDB, SQL, Table} + return []APIType{APITypeCassandra, APITypeGremlin, APITypeGremlinV2, APITypeMongoDB, APITypeSQL, APITypeTable} } // AuthenticationMethod enumerates the values for authentication method. @@ -48,109 +48,109 @@ func PossibleAuthenticationMethodValues() []AuthenticationMethod { type BackupPolicyType string const ( - // Continuous ... - Continuous BackupPolicyType = "Continuous" - // Periodic ... - Periodic BackupPolicyType = "Periodic" + // BackupPolicyTypeContinuous ... + BackupPolicyTypeContinuous BackupPolicyType = "Continuous" + // BackupPolicyTypePeriodic ... + BackupPolicyTypePeriodic BackupPolicyType = "Periodic" ) // PossibleBackupPolicyTypeValues returns an array of possible values for the BackupPolicyType const type. func PossibleBackupPolicyTypeValues() []BackupPolicyType { - return []BackupPolicyType{Continuous, Periodic} + return []BackupPolicyType{BackupPolicyTypeContinuous, BackupPolicyTypePeriodic} } // BackupStorageRedundancy enumerates the values for backup storage redundancy. type BackupStorageRedundancy string const ( - // Geo ... - Geo BackupStorageRedundancy = "Geo" - // Local ... - Local BackupStorageRedundancy = "Local" - // Zone ... - Zone BackupStorageRedundancy = "Zone" + // BackupStorageRedundancyGeo ... + BackupStorageRedundancyGeo BackupStorageRedundancy = "Geo" + // BackupStorageRedundancyLocal ... + BackupStorageRedundancyLocal BackupStorageRedundancy = "Local" + // BackupStorageRedundancyZone ... + BackupStorageRedundancyZone BackupStorageRedundancy = "Zone" ) // PossibleBackupStorageRedundancyValues returns an array of possible values for the BackupStorageRedundancy const type. func PossibleBackupStorageRedundancyValues() []BackupStorageRedundancy { - return []BackupStorageRedundancy{Geo, Local, Zone} + return []BackupStorageRedundancy{BackupStorageRedundancyGeo, BackupStorageRedundancyLocal, BackupStorageRedundancyZone} } // CompositePathSortOrder enumerates the values for composite path sort order. type CompositePathSortOrder string const ( - // Ascending ... - Ascending CompositePathSortOrder = "ascending" - // Descending ... - Descending CompositePathSortOrder = "descending" + // CompositePathSortOrderAscending ... + CompositePathSortOrderAscending CompositePathSortOrder = "ascending" + // CompositePathSortOrderDescending ... + CompositePathSortOrderDescending CompositePathSortOrder = "descending" ) // PossibleCompositePathSortOrderValues returns an array of possible values for the CompositePathSortOrder const type. func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { - return []CompositePathSortOrder{Ascending, Descending} + return []CompositePathSortOrder{CompositePathSortOrderAscending, CompositePathSortOrderDescending} } // ConflictResolutionMode enumerates the values for conflict resolution mode. type ConflictResolutionMode string const ( - // Custom ... - Custom ConflictResolutionMode = "Custom" - // LastWriterWins ... - LastWriterWins ConflictResolutionMode = "LastWriterWins" + // ConflictResolutionModeCustom ... + ConflictResolutionModeCustom ConflictResolutionMode = "Custom" + // ConflictResolutionModeLastWriterWins ... + ConflictResolutionModeLastWriterWins ConflictResolutionMode = "LastWriterWins" ) // PossibleConflictResolutionModeValues returns an array of possible values for the ConflictResolutionMode const type. func PossibleConflictResolutionModeValues() []ConflictResolutionMode { - return []ConflictResolutionMode{Custom, LastWriterWins} + return []ConflictResolutionMode{ConflictResolutionModeCustom, ConflictResolutionModeLastWriterWins} } // ConnectorOffer enumerates the values for connector offer. type ConnectorOffer string const ( - // Small ... - Small ConnectorOffer = "Small" + // ConnectorOfferSmall ... + ConnectorOfferSmall ConnectorOffer = "Small" ) // PossibleConnectorOfferValues returns an array of possible values for the ConnectorOffer const type. func PossibleConnectorOfferValues() []ConnectorOffer { - return []ConnectorOffer{Small} + return []ConnectorOffer{ConnectorOfferSmall} } // CreatedByType enumerates the values for created by type. type CreatedByType string const ( - // Application ... - Application CreatedByType = "Application" - // Key ... - Key CreatedByType = "Key" - // ManagedIdentity ... - ManagedIdentity CreatedByType = "ManagedIdentity" - // User ... - User CreatedByType = "User" + // CreatedByTypeApplication ... + CreatedByTypeApplication CreatedByType = "Application" + // CreatedByTypeKey ... + CreatedByTypeKey CreatedByType = "Key" + // CreatedByTypeManagedIdentity ... + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + // CreatedByTypeUser ... + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{Application, Key, ManagedIdentity, User} + return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} } // CreateMode enumerates the values for create mode. type CreateMode string const ( - // Default ... - Default CreateMode = "Default" - // Restore ... - Restore CreateMode = "Restore" + // CreateModeDefault ... + CreateModeDefault CreateMode = "Default" + // CreateModeRestore ... + CreateModeRestore CreateMode = "Restore" ) // PossibleCreateModeValues returns an array of possible values for the CreateMode const type. func PossibleCreateModeValues() []CreateMode { - return []CreateMode{Default, Restore} + return []CreateMode{CreateModeDefault, CreateModeRestore} } // CreateModeBasicDatabaseAccountCreateUpdateProperties enumerates the values for create mode basic database @@ -158,17 +158,17 @@ func PossibleCreateModeValues() []CreateMode { type CreateModeBasicDatabaseAccountCreateUpdateProperties string const ( - // CreateModeDatabaseAccountCreateUpdateProperties ... - CreateModeDatabaseAccountCreateUpdateProperties CreateModeBasicDatabaseAccountCreateUpdateProperties = "DatabaseAccountCreateUpdateProperties" - // CreateModeDefault ... - CreateModeDefault CreateModeBasicDatabaseAccountCreateUpdateProperties = "Default" - // CreateModeRestore ... - CreateModeRestore CreateModeBasicDatabaseAccountCreateUpdateProperties = "Restore" + // CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties ... + CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties CreateModeBasicDatabaseAccountCreateUpdateProperties = "DatabaseAccountCreateUpdateProperties" + // CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault ... + CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault CreateModeBasicDatabaseAccountCreateUpdateProperties = "Default" + // CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore ... + CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore CreateModeBasicDatabaseAccountCreateUpdateProperties = "Restore" ) // PossibleCreateModeBasicDatabaseAccountCreateUpdatePropertiesValues returns an array of possible values for the CreateModeBasicDatabaseAccountCreateUpdateProperties const type. func PossibleCreateModeBasicDatabaseAccountCreateUpdatePropertiesValues() []CreateModeBasicDatabaseAccountCreateUpdateProperties { - return []CreateModeBasicDatabaseAccountCreateUpdateProperties{CreateModeDatabaseAccountCreateUpdateProperties, CreateModeDefault, CreateModeRestore} + return []CreateModeBasicDatabaseAccountCreateUpdateProperties{CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties, CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault, CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore} } // DatabaseAccountKind enumerates the values for database account kind. @@ -192,133 +192,133 @@ func PossibleDatabaseAccountKindValues() []DatabaseAccountKind { type DatabaseAccountOfferType string const ( - // Standard ... - Standard DatabaseAccountOfferType = "Standard" + // DatabaseAccountOfferTypeStandard ... + DatabaseAccountOfferTypeStandard DatabaseAccountOfferType = "Standard" ) // PossibleDatabaseAccountOfferTypeValues returns an array of possible values for the DatabaseAccountOfferType const type. func PossibleDatabaseAccountOfferTypeValues() []DatabaseAccountOfferType { - return []DatabaseAccountOfferType{Standard} + return []DatabaseAccountOfferType{DatabaseAccountOfferTypeStandard} } // DataType enumerates the values for data type. type DataType string const ( - // LineString ... - LineString DataType = "LineString" - // MultiPolygon ... - MultiPolygon DataType = "MultiPolygon" - // Number ... - Number DataType = "Number" - // Point ... - Point DataType = "Point" - // Polygon ... - Polygon DataType = "Polygon" - // String ... - String DataType = "String" + // DataTypeLineString ... + DataTypeLineString DataType = "LineString" + // DataTypeMultiPolygon ... + DataTypeMultiPolygon DataType = "MultiPolygon" + // DataTypeNumber ... + DataTypeNumber DataType = "Number" + // DataTypePoint ... + DataTypePoint DataType = "Point" + // DataTypePolygon ... + DataTypePolygon DataType = "Polygon" + // DataTypeString ... + DataTypeString DataType = "String" ) // PossibleDataTypeValues returns an array of possible values for the DataType const type. func PossibleDataTypeValues() []DataType { - return []DataType{LineString, MultiPolygon, Number, Point, Polygon, String} + return []DataType{DataTypeLineString, DataTypeMultiPolygon, DataTypeNumber, DataTypePoint, DataTypePolygon, DataTypeString} } // DefaultConsistencyLevel enumerates the values for default consistency level. type DefaultConsistencyLevel string const ( - // BoundedStaleness ... - BoundedStaleness DefaultConsistencyLevel = "BoundedStaleness" - // ConsistentPrefix ... - ConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix" - // Eventual ... - Eventual DefaultConsistencyLevel = "Eventual" - // Session ... - Session DefaultConsistencyLevel = "Session" - // Strong ... - Strong DefaultConsistencyLevel = "Strong" + // DefaultConsistencyLevelBoundedStaleness ... + DefaultConsistencyLevelBoundedStaleness DefaultConsistencyLevel = "BoundedStaleness" + // DefaultConsistencyLevelConsistentPrefix ... + DefaultConsistencyLevelConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix" + // DefaultConsistencyLevelEventual ... + DefaultConsistencyLevelEventual DefaultConsistencyLevel = "Eventual" + // DefaultConsistencyLevelSession ... + DefaultConsistencyLevelSession DefaultConsistencyLevel = "Session" + // DefaultConsistencyLevelStrong ... + DefaultConsistencyLevelStrong DefaultConsistencyLevel = "Strong" ) // PossibleDefaultConsistencyLevelValues returns an array of possible values for the DefaultConsistencyLevel const type. func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel { - return []DefaultConsistencyLevel{BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong} + return []DefaultConsistencyLevel{DefaultConsistencyLevelBoundedStaleness, DefaultConsistencyLevelConsistentPrefix, DefaultConsistencyLevelEventual, DefaultConsistencyLevelSession, DefaultConsistencyLevelStrong} } // IndexingMode enumerates the values for indexing mode. type IndexingMode string const ( - // Consistent ... - Consistent IndexingMode = "consistent" - // Lazy ... - Lazy IndexingMode = "lazy" - // None ... - None IndexingMode = "none" + // IndexingModeConsistent ... + IndexingModeConsistent IndexingMode = "consistent" + // IndexingModeLazy ... + IndexingModeLazy IndexingMode = "lazy" + // IndexingModeNone ... + IndexingModeNone IndexingMode = "none" ) // PossibleIndexingModeValues returns an array of possible values for the IndexingMode const type. func PossibleIndexingModeValues() []IndexingMode { - return []IndexingMode{Consistent, Lazy, None} + return []IndexingMode{IndexingModeConsistent, IndexingModeLazy, IndexingModeNone} } // IndexKind enumerates the values for index kind. type IndexKind string const ( - // Hash ... - Hash IndexKind = "Hash" - // Range ... - Range IndexKind = "Range" - // Spatial ... - Spatial IndexKind = "Spatial" + // IndexKindHash ... + IndexKindHash IndexKind = "Hash" + // IndexKindRange ... + IndexKindRange IndexKind = "Range" + // IndexKindSpatial ... + IndexKindSpatial IndexKind = "Spatial" ) // PossibleIndexKindValues returns an array of possible values for the IndexKind const type. func PossibleIndexKindValues() []IndexKind { - return []IndexKind{Hash, Range, Spatial} + return []IndexKind{IndexKindHash, IndexKindRange, IndexKindSpatial} } // KeyKind enumerates the values for key kind. type KeyKind string const ( - // Primary ... - Primary KeyKind = "primary" - // PrimaryReadonly ... - PrimaryReadonly KeyKind = "primaryReadonly" - // Secondary ... - Secondary KeyKind = "secondary" - // SecondaryReadonly ... - SecondaryReadonly KeyKind = "secondaryReadonly" + // KeyKindPrimary ... + KeyKindPrimary KeyKind = "primary" + // KeyKindPrimaryReadonly ... + KeyKindPrimaryReadonly KeyKind = "primaryReadonly" + // KeyKindSecondary ... + KeyKindSecondary KeyKind = "secondary" + // KeyKindSecondaryReadonly ... + KeyKindSecondaryReadonly KeyKind = "secondaryReadonly" ) // PossibleKeyKindValues returns an array of possible values for the KeyKind const type. func PossibleKeyKindValues() []KeyKind { - return []KeyKind{Primary, PrimaryReadonly, Secondary, SecondaryReadonly} + return []KeyKind{KeyKindPrimary, KeyKindPrimaryReadonly, KeyKindSecondary, KeyKindSecondaryReadonly} } // ManagedCassandraProvisioningState enumerates the values for managed cassandra provisioning state. type ManagedCassandraProvisioningState string const ( - // Canceled ... - Canceled ManagedCassandraProvisioningState = "Canceled" - // Creating ... - Creating ManagedCassandraProvisioningState = "Creating" - // Deleting ... - Deleting ManagedCassandraProvisioningState = "Deleting" - // Failed ... - Failed ManagedCassandraProvisioningState = "Failed" - // Succeeded ... - Succeeded ManagedCassandraProvisioningState = "Succeeded" - // Updating ... - Updating ManagedCassandraProvisioningState = "Updating" + // ManagedCassandraProvisioningStateCanceled ... + ManagedCassandraProvisioningStateCanceled ManagedCassandraProvisioningState = "Canceled" + // ManagedCassandraProvisioningStateCreating ... + ManagedCassandraProvisioningStateCreating ManagedCassandraProvisioningState = "Creating" + // ManagedCassandraProvisioningStateDeleting ... + ManagedCassandraProvisioningStateDeleting ManagedCassandraProvisioningState = "Deleting" + // ManagedCassandraProvisioningStateFailed ... + ManagedCassandraProvisioningStateFailed ManagedCassandraProvisioningState = "Failed" + // ManagedCassandraProvisioningStateSucceeded ... + ManagedCassandraProvisioningStateSucceeded ManagedCassandraProvisioningState = "Succeeded" + // ManagedCassandraProvisioningStateUpdating ... + ManagedCassandraProvisioningStateUpdating ManagedCassandraProvisioningState = "Updating" ) // PossibleManagedCassandraProvisioningStateValues returns an array of possible values for the ManagedCassandraProvisioningState const type. func PossibleManagedCassandraProvisioningStateValues() []ManagedCassandraProvisioningState { - return []ManagedCassandraProvisioningState{Canceled, Creating, Deleting, Failed, Succeeded, Updating} + return []ManagedCassandraProvisioningState{ManagedCassandraProvisioningStateCanceled, ManagedCassandraProvisioningStateCreating, ManagedCassandraProvisioningStateDeleting, ManagedCassandraProvisioningStateFailed, ManagedCassandraProvisioningStateSucceeded, ManagedCassandraProvisioningStateUpdating} } // NetworkACLBypass enumerates the values for network acl bypass. @@ -340,55 +340,55 @@ func PossibleNetworkACLBypassValues() []NetworkACLBypass { type NodeState string const ( - // Joining ... - Joining NodeState = "Joining" - // Leaving ... - Leaving NodeState = "Leaving" - // Moving ... - Moving NodeState = "Moving" - // Normal ... - Normal NodeState = "Normal" - // Stopped ... - Stopped NodeState = "Stopped" + // NodeStateJoining ... + NodeStateJoining NodeState = "Joining" + // NodeStateLeaving ... + NodeStateLeaving NodeState = "Leaving" + // NodeStateMoving ... + NodeStateMoving NodeState = "Moving" + // NodeStateNormal ... + NodeStateNormal NodeState = "Normal" + // NodeStateStopped ... + NodeStateStopped NodeState = "Stopped" ) // PossibleNodeStateValues returns an array of possible values for the NodeState const type. func PossibleNodeStateValues() []NodeState { - return []NodeState{Joining, Leaving, Moving, Normal, Stopped} + return []NodeState{NodeStateJoining, NodeStateLeaving, NodeStateMoving, NodeStateNormal, NodeStateStopped} } // NodeStatus enumerates the values for node status. type NodeStatus string const ( - // Down ... - Down NodeStatus = "Down" - // Up ... - Up NodeStatus = "Up" + // NodeStatusDown ... + NodeStatusDown NodeStatus = "Down" + // NodeStatusUp ... + NodeStatusUp NodeStatus = "Up" ) // PossibleNodeStatusValues returns an array of possible values for the NodeStatus const type. func PossibleNodeStatusValues() []NodeStatus { - return []NodeStatus{Down, Up} + return []NodeStatus{NodeStatusDown, NodeStatusUp} } // OperationType enumerates the values for operation type. type OperationType string const ( - // Create ... - Create OperationType = "Create" - // Delete ... - Delete OperationType = "Delete" - // Replace ... - Replace OperationType = "Replace" - // SystemOperation ... - SystemOperation OperationType = "SystemOperation" + // OperationTypeCreate ... + OperationTypeCreate OperationType = "Create" + // OperationTypeDelete ... + OperationTypeDelete OperationType = "Delete" + // OperationTypeReplace ... + OperationTypeReplace OperationType = "Replace" + // OperationTypeSystemOperation ... + OperationTypeSystemOperation OperationType = "SystemOperation" ) // PossibleOperationTypeValues returns an array of possible values for the OperationType const type. func PossibleOperationTypeValues() []OperationType { - return []OperationType{Create, Delete, Replace, SystemOperation} + return []OperationType{OperationTypeCreate, OperationTypeDelete, OperationTypeReplace, OperationTypeSystemOperation} } // PartitionKind enumerates the values for partition kind. @@ -435,15 +435,15 @@ func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { type PublicNetworkAccess string const ( - // Disabled ... - Disabled PublicNetworkAccess = "Disabled" - // Enabled ... - Enabled PublicNetworkAccess = "Enabled" + // PublicNetworkAccessDisabled ... + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + // PublicNetworkAccessEnabled ... + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" ) // PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type. func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { - return []PublicNetworkAccess{Disabled, Enabled} + return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled} } // ResourceIdentityType enumerates the values for resource identity type. @@ -469,45 +469,45 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { type RestoreMode string const ( - // PointInTime ... - PointInTime RestoreMode = "PointInTime" + // RestoreModePointInTime ... + RestoreModePointInTime RestoreMode = "PointInTime" ) // PossibleRestoreModeValues returns an array of possible values for the RestoreMode const type. func PossibleRestoreModeValues() []RestoreMode { - return []RestoreMode{PointInTime} + return []RestoreMode{RestoreModePointInTime} } // RoleDefinitionType enumerates the values for role definition type. type RoleDefinitionType string const ( - // BuiltInRole ... - BuiltInRole RoleDefinitionType = "BuiltInRole" - // CustomRole ... - CustomRole RoleDefinitionType = "CustomRole" + // RoleDefinitionTypeBuiltInRole ... + RoleDefinitionTypeBuiltInRole RoleDefinitionType = "BuiltInRole" + // RoleDefinitionTypeCustomRole ... + RoleDefinitionTypeCustomRole RoleDefinitionType = "CustomRole" ) // PossibleRoleDefinitionTypeValues returns an array of possible values for the RoleDefinitionType const type. func PossibleRoleDefinitionTypeValues() []RoleDefinitionType { - return []RoleDefinitionType{BuiltInRole, CustomRole} + return []RoleDefinitionType{RoleDefinitionTypeBuiltInRole, RoleDefinitionTypeCustomRole} } // ServerVersion enumerates the values for server version. type ServerVersion string const ( - // FourFullStopZero ... - FourFullStopZero ServerVersion = "4.0" - // ThreeFullStopSix ... - ThreeFullStopSix ServerVersion = "3.6" - // ThreeFullStopTwo ... - ThreeFullStopTwo ServerVersion = "3.2" + // ServerVersionFourFullStopZero ... + ServerVersionFourFullStopZero ServerVersion = "4.0" + // ServerVersionThreeFullStopSix ... + ServerVersionThreeFullStopSix ServerVersion = "3.6" + // ServerVersionThreeFullStopTwo ... + ServerVersionThreeFullStopTwo ServerVersion = "3.2" ) // PossibleServerVersionValues returns an array of possible values for the ServerVersion const type. func PossibleServerVersionValues() []ServerVersion { - return []ServerVersion{FourFullStopZero, ThreeFullStopSix, ThreeFullStopTwo} + return []ServerVersion{ServerVersionFourFullStopZero, ServerVersionThreeFullStopSix, ServerVersionThreeFullStopTwo} } // SpatialType enumerates the values for spatial type. @@ -554,15 +554,15 @@ func PossibleTriggerOperationValues() []TriggerOperation { type TriggerType string const ( - // Post ... - Post TriggerType = "Post" - // Pre ... - Pre TriggerType = "Pre" + // TriggerTypePost ... + TriggerTypePost TriggerType = "Post" + // TriggerTypePre ... + TriggerTypePre TriggerType = "Pre" ) // PossibleTriggerTypeValues returns an array of possible values for the TriggerType const type. func PossibleTriggerTypeValues() []TriggerType { - return []TriggerType{Post, Pre} + return []TriggerType{TriggerTypePost, TriggerTypePre} } // Type enumerates the values for type. @@ -586,23 +586,23 @@ func PossibleTypeValues() []Type { type UnitType string const ( - // Bytes ... - Bytes UnitType = "Bytes" - // BytesPerSecond ... - BytesPerSecond UnitType = "BytesPerSecond" - // Count ... - Count UnitType = "Count" - // CountPerSecond ... - CountPerSecond UnitType = "CountPerSecond" - // Milliseconds ... - Milliseconds UnitType = "Milliseconds" - // Percent ... - Percent UnitType = "Percent" - // Seconds ... - Seconds UnitType = "Seconds" + // UnitTypeBytes ... + UnitTypeBytes UnitType = "Bytes" + // UnitTypeBytesPerSecond ... + UnitTypeBytesPerSecond UnitType = "BytesPerSecond" + // UnitTypeCount ... + UnitTypeCount UnitType = "Count" + // UnitTypeCountPerSecond ... + UnitTypeCountPerSecond UnitType = "CountPerSecond" + // UnitTypeMilliseconds ... + UnitTypeMilliseconds UnitType = "Milliseconds" + // UnitTypePercent ... + UnitTypePercent UnitType = "Percent" + // UnitTypeSeconds ... + UnitTypeSeconds UnitType = "Seconds" ) // PossibleUnitTypeValues returns an array of possible values for the UnitType const type. func PossibleUnitTypeValues() []UnitType { - return []UnitType{Bytes, BytesPerSecond, Count, CountPerSecond, Milliseconds, Percent, Seconds} + return []UnitType{UnitTypeBytes, UnitTypeBytesPerSecond, UnitTypeCount, UnitTypeCountPerSecond, UnitTypeMilliseconds, UnitTypePercent, UnitTypeSeconds} } diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/gremlinresources.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/gremlinresources.go index 12624c05b948..5ddd433187ed 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/gremlinresources.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/gremlinresources.go @@ -54,8 +54,7 @@ func (client GremlinResourcesClient) CreateUpdateGremlinDatabase(ctx context.Con Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -157,8 +156,7 @@ func (client GremlinResourcesClient) CreateUpdateGremlinGraph(ctx context.Contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -266,8 +264,7 @@ func (client GremlinResourcesClient) DeleteGremlinDatabase(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -360,8 +357,7 @@ func (client GremlinResourcesClient) DeleteGremlinGraph(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -455,8 +451,7 @@ func (client GremlinResourcesClient) GetGremlinDatabase(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -548,8 +543,7 @@ func (client GremlinResourcesClient) GetGremlinDatabaseThroughput(ctx context.Co Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -641,8 +635,7 @@ func (client GremlinResourcesClient) GetGremlinGraph(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -736,8 +729,7 @@ func (client GremlinResourcesClient) GetGremlinGraphThroughput(ctx context.Conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -828,8 +820,7 @@ func (client GremlinResourcesClient) ListGremlinDatabases(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -919,8 +910,7 @@ func (client GremlinResourcesClient) ListGremlinGraphs(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1011,8 +1001,7 @@ func (client GremlinResourcesClient) MigrateGremlinDatabaseToAutoscale(ctx conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1106,8 +1095,7 @@ func (client GremlinResourcesClient) MigrateGremlinDatabaseToManualThroughput(ct Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1201,8 +1189,7 @@ func (client GremlinResourcesClient) MigrateGremlinGraphToAutoscale(ctx context. Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1297,8 +1284,7 @@ func (client GremlinResourcesClient) MigrateGremlinGraphToManualThroughput(ctx c Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1394,8 +1380,7 @@ func (client GremlinResourcesClient) UpdateGremlinDatabaseThroughput(ctx context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1499,8 +1484,7 @@ func (client GremlinResourcesClient) UpdateGremlinGraphThroughput(ctx context.Co Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/models.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/models.go index 4b2cafdaf2c2..0c31768c3711 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/models.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/models.go @@ -22,7 +22,7 @@ const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/ // APIProperties ... type APIProperties struct { - // ServerVersion - Describes the ServerVersion of an a MongoDB account. Possible values include: 'ThreeFullStopTwo', 'ThreeFullStopSix', 'FourFullStopZero' + // ServerVersion - Describes the ServerVersion of an a MongoDB account. Possible values include: 'ServerVersionThreeFullStopTwo', 'ServerVersionThreeFullStopSix', 'ServerVersionFourFullStopZero' ServerVersion ServerVersion `json:"serverVersion,omitempty"` } @@ -212,11 +212,11 @@ func (bp BackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) { type BackupResource struct { autorest.Response `json:"-"` Properties *BackupResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource + // Name - READ-ONLY; The name of the database account. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // Type - READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty"` } @@ -1629,9 +1629,9 @@ type ClusterNodeStatus struct { type ClusterNodeStatusNodesItem struct { // Datacenter - The Cassandra data center this node resides in. Datacenter *string `json:"datacenter,omitempty"` - // Status - Indicates whether the node is functioning or not. Possible values include: 'Up', 'Down' + // Status - Indicates whether the node is functioning or not. Possible values include: 'NodeStatusUp', 'NodeStatusDown' Status NodeStatus `json:"status,omitempty"` - // State - The state of the node in relation to the cluster. Possible values include: 'Normal', 'Leaving', 'Joining', 'Moving', 'Stopped' + // State - The state of the node in relation to the cluster. Possible values include: 'NodeStateNormal', 'NodeStateLeaving', 'NodeStateJoining', 'NodeStateMoving', 'NodeStateStopped' State NodeState `json:"state,omitempty"` // Address - The node's URL. Address *string `json:"address,omitempty"` @@ -1684,7 +1684,7 @@ func (cr ClusterResource) MarshalJSON() ([]byte, error) { // ClusterResourceProperties properties of a managed Cassandra cluster. type ClusterResourceProperties struct { - // ProvisioningState - Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + // ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled' ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"` // RestoreFromBackupID - To create an empty cluster, omit this field or set it to null. To restore a backup into a new cluster, set this field to the resource id of the backup. RestoreFromBackupID *string `json:"restoreFromBackupId,omitempty"` @@ -1773,13 +1773,13 @@ type Column struct { 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 - Sort order for composite paths. Possible values include: 'CompositePathSortOrderAscending', 'CompositePathSortOrderDescending' 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' + // Mode - Indicates the conflict resolution mode. Possible values include: 'ConflictResolutionModeLastWriterWins', 'ConflictResolutionModeCustom' Mode ConflictResolutionMode `json:"mode,omitempty"` // ConflictResolutionPath - The conflict resolution path in the case of LastWriterWins mode. ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty"` @@ -1789,7 +1789,7 @@ type ConflictResolutionPolicy struct { // ConsistencyPolicy the consistency policy for the Cosmos DB database account. type ConsistencyPolicy struct { - // DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + // DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'DefaultConsistencyLevelEventual', 'DefaultConsistencyLevelSession', 'DefaultConsistencyLevelBoundedStaleness', 'DefaultConsistencyLevelStrong', 'DefaultConsistencyLevelConsistentPrefix' DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"` // MaxStalenessPrefix - When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. MaxStalenessPrefix *int64 `json:"maxStalenessPrefix,omitempty"` @@ -2049,13 +2049,13 @@ type DatabaseAccountCreateUpdateProperties struct { EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` - // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small' + // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall' ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"` // DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // KeyVaultKeyURI - The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` - // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' + // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // EnableFreeTier - Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` @@ -2071,7 +2071,7 @@ type DatabaseAccountCreateUpdateProperties struct { NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"` // NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"` - // CreateMode - Possible values include: 'CreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeDefault', 'CreateModeRestore' + // CreateMode - Possible values include: 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore' CreateMode CreateModeBasicDatabaseAccountCreateUpdateProperties `json:"createMode,omitempty"` } @@ -2083,11 +2083,11 @@ func unmarshalBasicDatabaseAccountCreateUpdateProperties(body []byte) (BasicData } switch m["createMode"] { - case string(CreateModeDefault): + case string(CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault): var drdacup DefaultRequestDatabaseAccountCreateUpdateProperties err := json.Unmarshal(body, &drdacup) return drdacup, err - case string(CreateModeRestore): + case string(CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore): var rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties err := json.Unmarshal(body, &rrdacup) return rrdacup, err @@ -2118,7 +2118,7 @@ func unmarshalBasicDatabaseAccountCreateUpdatePropertiesArray(body []byte) ([]Ba // MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateProperties. func (dacup DatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) { - dacup.CreateMode = CreateModeDatabaseAccountCreateUpdateProperties + dacup.CreateMode = CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties objectMap := make(map[string]interface{}) if dacup.ConsistencyPolicy != nil { objectMap["consistencyPolicy"] = dacup.ConsistencyPolicy @@ -2424,7 +2424,7 @@ type DatabaseAccountGetProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // DocumentEndpoint - READ-ONLY; The connection endpoint for the Cosmos DB database account. DocumentEndpoint *string `json:"documentEndpoint,omitempty"` - // DatabaseAccountOfferType - READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'Standard' + // DatabaseAccountOfferType - READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'DatabaseAccountOfferTypeStandard' DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"` // IPRules - List of IpRules. IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"` @@ -2452,13 +2452,13 @@ type DatabaseAccountGetProperties struct { EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` - // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small' + // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall' ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"` // DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // KeyVaultKeyURI - The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` - // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' + // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // EnableFreeTier - Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` @@ -2468,7 +2468,7 @@ type DatabaseAccountGetProperties struct { EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"` // InstanceID - READ-ONLY; A unique identifier assigned to the database account InstanceID *string `json:"instanceId,omitempty"` - // CreateMode - Enum to indicate the mode of account creation. Possible values include: 'Default', 'Restore' + // CreateMode - Enum to indicate the mode of account creation. Possible values include: 'CreateModeDefault', 'CreateModeRestore' CreateMode CreateMode `json:"createMode,omitempty"` // RestoreParameters - Parameters to indicate the information about the restore. RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"` @@ -3016,7 +3016,7 @@ func (dalrokr DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, erro // DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account. type DatabaseAccountRegenerateKeyParameters struct { - // KeyKind - The access key to regenerate. Possible values include: 'Primary', 'Secondary', 'PrimaryReadonly', 'SecondaryReadonly' + // KeyKind - The access key to regenerate. Possible values include: 'KeyKindPrimary', 'KeyKindSecondary', 'KeyKindPrimaryReadonly', 'KeyKindSecondaryReadonly' KeyKind KeyKind `json:"keyKind,omitempty"` } @@ -3403,13 +3403,13 @@ type DatabaseAccountUpdateProperties struct { EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` - // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small' + // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall' ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"` // DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // KeyVaultKeyURI - The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` - // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' + // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // EnableFreeTier - Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` @@ -3634,11 +3634,11 @@ type DataCenterResource struct { autorest.Response `json:"-"` // Properties - Properties of a managed Cassandra data center. Properties *DataCenterResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource + // Name - READ-ONLY; The name of the database account. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // Type - READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty"` } @@ -3653,7 +3653,7 @@ func (dcr DataCenterResource) MarshalJSON() ([]byte, error) { // DataCenterResourceProperties properties of a managed Cassandra data center. type DataCenterResourceProperties struct { - // ProvisioningState - Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + // ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled' ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"` // DataCenterLocation - The region this data center should be created in. DataCenterLocation *string `json:"dataCenterLocation,omitempty"` @@ -3711,13 +3711,13 @@ type DefaultRequestDatabaseAccountCreateUpdateProperties struct { EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` - // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small' + // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall' ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"` // DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // KeyVaultKeyURI - The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` - // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' + // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // EnableFreeTier - Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` @@ -3733,13 +3733,13 @@ type DefaultRequestDatabaseAccountCreateUpdateProperties struct { NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"` // NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"` - // CreateMode - Possible values include: 'CreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeDefault', 'CreateModeRestore' + // CreateMode - Possible values include: 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore' CreateMode CreateModeBasicDatabaseAccountCreateUpdateProperties `json:"createMode,omitempty"` } // MarshalJSON is the custom marshaler for DefaultRequestDatabaseAccountCreateUpdateProperties. func (drdacup DefaultRequestDatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) { - drdacup.CreateMode = CreateModeDefault + drdacup.CreateMode = CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault objectMap := make(map[string]interface{}) if drdacup.ConsistencyPolicy != nil { objectMap["consistencyPolicy"] = drdacup.ConsistencyPolicy @@ -5137,11 +5137,11 @@ type IncludedPath struct { // Indexes the indexes for the path. type Indexes struct { - // DataType - The datatype for which the indexing behavior is applied to. Possible values include: 'String', 'Number', 'Point', 'Polygon', 'LineString', 'MultiPolygon' + // DataType - The datatype for which the indexing behavior is applied to. Possible values include: 'DataTypeString', 'DataTypeNumber', 'DataTypePoint', 'DataTypePolygon', 'DataTypeLineString', 'DataTypeMultiPolygon' DataType DataType `json:"dataType,omitempty"` // Precision - The precision of the index. -1 is maximum precision. Precision *int32 `json:"precision,omitempty"` - // Kind - Indicates the type of index. Possible values include: 'Hash', 'Range', 'Spatial' + // Kind - Indicates the type of index. Possible values include: 'IndexKindHash', 'IndexKindRange', 'IndexKindSpatial' Kind IndexKind `json:"kind,omitempty"` } @@ -5149,7 +5149,7 @@ type Indexes struct { type IndexingPolicy struct { // Automatic - Indicates if the indexing policy is automatic Automatic *bool `json:"automatic,omitempty"` - // IndexingMode - Indicates the indexing mode. Possible values include: 'Consistent', 'Lazy', 'None' + // IndexingMode - Indicates the indexing mode. Possible values include: 'IndexingModeConsistent', 'IndexingModeLazy', 'IndexingModeNone' IndexingMode IndexingMode `json:"indexingMode,omitempty"` // IncludedPaths - List of paths to include in the indexing IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"` @@ -5233,6 +5233,59 @@ func (l Location) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// LocationGetResult cosmos DB location get result +type LocationGetResult struct { + autorest.Response `json:"-"` + // Properties - Cosmos DB location metadata + Properties *LocationProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the database account. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the database account. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocationGetResult. +func (lgr LocationGetResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lgr.Properties != nil { + objectMap["properties"] = lgr.Properties + } + return json.Marshal(objectMap) +} + +// LocationListResult the List operation response, that contains Cosmos DB locations and their properties. +type LocationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Cosmos DB locations and their properties. + Value *[]LocationGetResult `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocationListResult. +func (llr LocationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// LocationProperties cosmos DB location metadata +type LocationProperties struct { + // Status - READ-ONLY; The current status of location in Azure. + Status *string `json:"status,omitempty"` + // SupportsAvailabilityZone - READ-ONLY; Flag indicating whether the location supports availability zones or not. + SupportsAvailabilityZone *bool `json:"supportsAvailabilityZone,omitempty"` + // IsResidencyRestricted - READ-ONLY; Flag indicating whether the location is residency sensitive. + IsResidencyRestricted *bool `json:"isResidencyRestricted,omitempty"` + // BackupStorageRedundancies - READ-ONLY; The properties of available backup storage redundancies. + BackupStorageRedundancies *[]BackupStorageRedundancy `json:"backupStorageRedundancies,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocationProperties. +func (lp LocationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ManagedServiceIdentity identity for the resource. type ManagedServiceIdentity struct { // PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity. @@ -5279,7 +5332,7 @@ type Metric struct { EndTime *date.Time `json:"endTime,omitempty"` // TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty"` - // Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + // Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds' Unit UnitType `json:"unit,omitempty"` // Name - READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty"` @@ -5316,7 +5369,7 @@ type MetricDefinition struct { MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"` // PrimaryAggregationType - READ-ONLY; The primary aggregation type of the metric. Possible values include: 'PrimaryAggregationTypeNone', 'PrimaryAggregationTypeAverage', 'PrimaryAggregationTypeTotal', 'PrimaryAggregationTypeMinimum', 'PrimaryAggregationTypeMaximum', 'PrimaryAggregationTypeLast' PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"` - // Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + // Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds' Unit UnitType `json:"unit,omitempty"` // ResourceURI - READ-ONLY; The resource uri of the database. ResourceURI *string `json:"resourceUri,omitempty"` @@ -6930,7 +6983,7 @@ type PartitionMetric struct { EndTime *date.Time `json:"endTime,omitempty"` // TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty"` - // Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + // Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds' Unit UnitType `json:"unit,omitempty"` // Name - READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty"` @@ -6966,7 +7019,7 @@ type PartitionUsage struct { PartitionID *string `json:"partitionId,omitempty"` // PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the usages. PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"` - // Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + // Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds' Unit UnitType `json:"unit,omitempty"` // Name - READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty"` @@ -7008,7 +7061,7 @@ type PercentileMetric struct { EndTime *date.Time `json:"endTime,omitempty"` // TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty"` - // Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + // Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds' Unit UnitType `json:"unit,omitempty"` // Name - READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty"` @@ -7121,7 +7174,7 @@ type PeriodicModeProperties struct { BackupIntervalInMinutes *int32 `json:"backupIntervalInMinutes,omitempty"` // BackupRetentionIntervalInHours - An integer representing the time (in hours) that each backup is retained BackupRetentionIntervalInHours *int32 `json:"backupRetentionIntervalInHours,omitempty"` - // BackupStorageRedundancy - Enum to indicate type of backup residency. Possible values include: 'Geo', 'Local', 'Zone' + // BackupStorageRedundancy - Enum to indicate type of backup residency. Possible values include: 'BackupStorageRedundancyGeo', 'BackupStorageRedundancyLocal', 'BackupStorageRedundancyZone' BackupStorageRedundancy BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty"` } @@ -7571,7 +7624,7 @@ type RestorableDatabaseAccountProperties struct { CreationTime *date.Time `json:"creationTime,omitempty"` // DeletionTime - The time at which the restorable database account has been deleted (ISO-8601 format). DeletionTime *date.Time `json:"deletionTime,omitempty"` - // APIType - READ-ONLY; The API type of the restorable database account. Possible values include: 'MongoDB', 'Gremlin', 'Cassandra', 'Table', 'SQL', 'GremlinV2' + // APIType - READ-ONLY; The API type of the restorable database account. Possible values include: 'APITypeMongoDB', 'APITypeGremlin', 'APITypeCassandra', 'APITypeTable', 'APITypeSQL', 'APITypeGremlinV2' APIType APIType `json:"apiType,omitempty"` // RestorableLocations - READ-ONLY; List of regions where the of the database account can be restored from. RestorableLocations *[]RestorableLocationResource `json:"restorableLocations,omitempty"` @@ -7707,7 +7760,7 @@ type RestorableMongodbCollectionProperties struct { type RestorableMongodbCollectionPropertiesResource struct { // Rid - READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty"` - // OperationType - READ-ONLY; The operation type of this collection event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation' + // OperationType - READ-ONLY; The operation type of this collection event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation' OperationType OperationType `json:"operationType,omitempty"` // EventTimestamp - READ-ONLY; The time when this collection event happened. EventTimestamp *string `json:"eventTimestamp,omitempty"` @@ -7819,7 +7872,7 @@ type RestorableMongodbDatabaseProperties struct { type RestorableMongodbDatabasePropertiesResource struct { // Rid - READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty"` - // OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation' + // OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation' OperationType OperationType `json:"operationType,omitempty"` // EventTimestamp - READ-ONLY; The time when this database event happened. EventTimestamp *string `json:"eventTimestamp,omitempty"` @@ -7945,7 +7998,7 @@ type RestorableSQLContainerProperties struct { type RestorableSQLContainerPropertiesResource struct { // Rid - READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty"` - // OperationType - READ-ONLY; The operation type of this container event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation' + // OperationType - READ-ONLY; The operation type of this container event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation' OperationType OperationType `json:"operationType,omitempty"` // EventTimestamp - READ-ONLY; The when this container event happened. EventTimestamp *string `json:"eventTimestamp,omitempty"` @@ -8115,7 +8168,7 @@ type RestorableSQLDatabaseProperties struct { type RestorableSQLDatabasePropertiesResource struct { // Rid - READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty"` - // OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation' + // OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation' OperationType OperationType `json:"operationType,omitempty"` // EventTimestamp - READ-ONLY; The time when this database event happened. EventTimestamp *string `json:"eventTimestamp,omitempty"` @@ -8193,7 +8246,7 @@ func (rsrlr RestorableSQLResourcesListResult) MarshalJSON() ([]byte, error) { // RestoreParameters parameters to indicate the information about the restore. type RestoreParameters struct { - // RestoreMode - Describes the mode of the restore. Possible values include: 'PointInTime' + // RestoreMode - Describes the mode of the restore. Possible values include: 'RestoreModePointInTime' RestoreMode RestoreMode `json:"restoreMode,omitempty"` // RestoreSource - The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} RestoreSource *string `json:"restoreSource,omitempty"` @@ -8228,13 +8281,13 @@ type RestoreReqeustDatabaseAccountCreateUpdateProperties struct { EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` - // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small' + // ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall' ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"` // DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // KeyVaultKeyURI - The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` - // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' + // PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // EnableFreeTier - Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` @@ -8250,13 +8303,13 @@ type RestoreReqeustDatabaseAccountCreateUpdateProperties struct { NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"` // NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"` - // CreateMode - Possible values include: 'CreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeDefault', 'CreateModeRestore' + // CreateMode - Possible values include: 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDatabaseAccountCreateUpdateProperties', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeDefault', 'CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore' CreateMode CreateModeBasicDatabaseAccountCreateUpdateProperties `json:"createMode,omitempty"` } // MarshalJSON is the custom marshaler for RestoreReqeustDatabaseAccountCreateUpdateProperties. func (rrdacup RestoreReqeustDatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) { - rrdacup.CreateMode = CreateModeRestore + rrdacup.CreateMode = CreateModeBasicDatabaseAccountCreateUpdatePropertiesCreateModeRestore objectMap := make(map[string]interface{}) if rrdacup.RestoreParameters != nil { objectMap["restoreParameters"] = rrdacup.RestoreParameters @@ -10293,7 +10346,7 @@ func (srdlr SQLRoleDefinitionListResult) MarshalJSON() ([]byte, error) { type SQLRoleDefinitionResource struct { // RoleName - A user-friendly name for the Role Definition. Must be unique for the database account. RoleName *string `json:"roleName,omitempty"` - // Type - Indicates whether the Role Definition was built-in or user created. Possible values include: 'BuiltInRole', 'CustomRole' + // Type - Indicates whether the Role Definition was built-in or user created. Possible values include: 'RoleDefinitionTypeBuiltInRole', 'RoleDefinitionTypeCustomRole' Type RoleDefinitionType `json:"type,omitempty"` // AssignableScopes - A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist. AssignableScopes *[]string `json:"assignableScopes,omitempty"` @@ -10719,7 +10772,7 @@ type SQLTriggerGetPropertiesResource struct { ID *string `json:"id,omitempty"` // Body - Body of the Trigger Body *string `json:"body,omitempty"` - // TriggerType - Type of the Trigger. Possible values include: 'Pre', 'Post' + // TriggerType - Type of the Trigger. Possible values include: 'TriggerTypePre', 'TriggerTypePost' TriggerType TriggerType `json:"triggerType,omitempty"` // TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace' TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"` @@ -10881,7 +10934,7 @@ type SQLTriggerResource struct { ID *string `json:"id,omitempty"` // Body - Body of the Trigger Body *string `json:"body,omitempty"` - // TriggerType - Type of the Trigger. Possible values include: 'Pre', 'Post' + // TriggerType - Type of the Trigger. Possible values include: 'TriggerTypePre', 'TriggerTypePost' TriggerType TriggerType `json:"triggerType,omitempty"` // TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace' TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"` @@ -11179,13 +11232,13 @@ type SQLUserDefinedFunctionResource struct { type SystemData struct { // CreatedBy - The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` - // CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' CreatedByType CreatedByType `json:"createdByType,omitempty"` // CreatedAt - The timestamp of resource creation (UTC). CreatedAt *date.Time `json:"createdAt,omitempty"` // LastModifiedBy - The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` // LastModifiedAt - The timestamp of resource last modification (UTC) LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` @@ -12029,7 +12082,7 @@ type UniqueKeyPolicy struct { // Usage the usage data for a usage request. type Usage struct { - // Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + // Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds' Unit UnitType `json:"unit,omitempty"` // Name - READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty"` diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/mongodbresources.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/mongodbresources.go index e2c33c635738..dd81851040f4 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/mongodbresources.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/mongodbresources.go @@ -55,8 +55,7 @@ func (client MongoDBResourcesClient) CreateUpdateMongoDBCollection(ctx context.C Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -158,8 +157,7 @@ func (client MongoDBResourcesClient) CreateUpdateMongoDBDatabase(ctx context.Con Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -260,8 +258,7 @@ func (client MongoDBResourcesClient) DeleteMongoDBCollection(ctx context.Context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -354,8 +351,7 @@ func (client MongoDBResourcesClient) DeleteMongoDBDatabase(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -448,8 +444,7 @@ func (client MongoDBResourcesClient) GetMongoDBCollection(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -543,8 +538,7 @@ func (client MongoDBResourcesClient) GetMongoDBCollectionThroughput(ctx context. Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -637,8 +631,7 @@ func (client MongoDBResourcesClient) GetMongoDBDatabase(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -730,8 +723,7 @@ func (client MongoDBResourcesClient) GetMongoDBDatabaseThroughput(ctx context.Co Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -822,8 +814,7 @@ func (client MongoDBResourcesClient) ListMongoDBCollections(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -913,8 +904,7 @@ func (client MongoDBResourcesClient) ListMongoDBDatabases(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1006,8 +996,7 @@ func (client MongoDBResourcesClient) MigrateMongoDBCollectionToAutoscale(ctx con Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1103,8 +1092,7 @@ func (client MongoDBResourcesClient) MigrateMongoDBCollectionToManualThroughput( Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1198,8 +1186,7 @@ func (client MongoDBResourcesClient) MigrateMongoDBDatabaseToAutoscale(ctx conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1293,8 +1280,7 @@ func (client MongoDBResourcesClient) MigrateMongoDBDatabaseToManualThroughput(ct Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1390,8 +1376,7 @@ func (client MongoDBResourcesClient) UpdateMongoDBCollectionThroughput(ctx conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1496,8 +1481,7 @@ func (client MongoDBResourcesClient) UpdateMongoDBDatabaseThroughput(ctx context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/notebookworkspaces.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/notebookworkspaces.go index 7abb83cf1484..c5754477dfe8 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/notebookworkspaces.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/notebookworkspaces.go @@ -53,8 +53,7 @@ func (client NotebookWorkspacesClient) CreateOrUpdate(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -148,8 +147,7 @@ func (client NotebookWorkspacesClient) Delete(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -240,8 +238,7 @@ func (client NotebookWorkspacesClient) Get(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -331,8 +328,7 @@ func (client NotebookWorkspacesClient) ListByDatabaseAccount(ctx context.Context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -421,8 +417,7 @@ func (client NotebookWorkspacesClient) ListConnectionInfo(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -512,8 +507,7 @@ func (client NotebookWorkspacesClient) RegenerateAuthToken(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -604,8 +598,7 @@ func (client NotebookWorkspacesClient) Start(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeid.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeid.go index 74c7e7b52999..7f98ba95ccb1 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeid.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeid.go @@ -58,8 +58,7 @@ func (client PartitionKeyRangeIDClient) ListMetrics(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeidregion.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeidregion.go index 0be525a15dfb..2ad2ccffcecf 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeidregion.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/partitionkeyrangeidregion.go @@ -59,8 +59,7 @@ func (client PartitionKeyRangeIDRegionClient) ListMetrics(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentile.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentile.go index d661545fb9c0..8d3b38089334 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentile.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentile.go @@ -55,8 +55,7 @@ func (client PercentileClient) ListMetrics(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentilesourcetarget.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentilesourcetarget.go index ba22496164cf..b800272c74e8 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentilesourcetarget.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentilesourcetarget.go @@ -60,8 +60,7 @@ func (client PercentileSourceTargetClient) ListMetrics(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentiletarget.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentiletarget.go index 218f06b362de..2d7b5ad75d12 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentiletarget.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/percentiletarget.go @@ -58,8 +58,7 @@ func (client PercentileTargetClient) ListMetrics(ctx context.Context, resourceGr Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privateendpointconnections.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privateendpointconnections.go index ee2c3e5b03f3..38e73883c925 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privateendpointconnections.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privateendpointconnections.go @@ -53,8 +53,7 @@ func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -149,8 +148,7 @@ func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -242,8 +240,7 @@ func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -333,8 +330,7 @@ func (client PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privatelinkresources.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privatelinkresources.go index d9057fe981ac..7ff4e4918c77 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privatelinkresources.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/privatelinkresources.go @@ -53,8 +53,7 @@ func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -144,8 +143,7 @@ func (client PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/sqlresources.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/sqlresources.go index 7e0f0615fb3d..791008acea7c 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/sqlresources.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/sqlresources.go @@ -54,8 +54,7 @@ func (client SQLResourcesClient) CreateUpdateSQLContainer(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -164,8 +163,7 @@ func (client SQLResourcesClient) CreateUpdateSQLDatabase(ctx context.Context, re Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -266,8 +264,7 @@ func (client SQLResourcesClient) CreateUpdateSQLRoleAssignment(ctx context.Conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -363,8 +360,7 @@ func (client SQLResourcesClient) CreateUpdateSQLRoleDefinition(ctx context.Conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -462,8 +458,7 @@ func (client SQLResourcesClient) CreateUpdateSQLStoredProcedure(ctx context.Cont Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -568,8 +563,7 @@ func (client SQLResourcesClient) CreateUpdateSQLTrigger(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -675,8 +669,7 @@ func (client SQLResourcesClient) CreateUpdateSQLUserDefinedFunction(ctx context. Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -779,8 +772,7 @@ func (client SQLResourcesClient) DeleteSQLContainer(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -873,8 +865,7 @@ func (client SQLResourcesClient) DeleteSQLDatabase(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -966,8 +957,7 @@ func (client SQLResourcesClient) DeleteSQLRoleAssignment(ctx context.Context, ro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1059,8 +1049,7 @@ func (client SQLResourcesClient) DeleteSQLRoleDefinition(ctx context.Context, ro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1154,8 +1143,7 @@ func (client SQLResourcesClient) DeleteSQLStoredProcedure(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1251,8 +1239,7 @@ func (client SQLResourcesClient) DeleteSQLTrigger(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1348,8 +1335,7 @@ func (client SQLResourcesClient) DeleteSQLUserDefinedFunction(ctx context.Contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1444,8 +1430,7 @@ func (client SQLResourcesClient) GetSQLContainer(ctx context.Context, resourceGr Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1539,8 +1524,7 @@ func (client SQLResourcesClient) GetSQLContainerThroughput(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1632,8 +1616,7 @@ func (client SQLResourcesClient) GetSQLDatabase(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1725,8 +1708,7 @@ func (client SQLResourcesClient) GetSQLDatabaseThroughput(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1817,8 +1799,7 @@ func (client SQLResourcesClient) GetSQLRoleAssignment(ctx context.Context, roleA Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -1909,8 +1890,7 @@ func (client SQLResourcesClient) GetSQLRoleDefinition(ctx context.Context, roleD Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2003,8 +1983,7 @@ func (client SQLResourcesClient) GetSQLStoredProcedure(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2099,8 +2078,7 @@ func (client SQLResourcesClient) GetSQLTrigger(ctx context.Context, resourceGrou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2195,8 +2173,7 @@ func (client SQLResourcesClient) GetSQLUserDefinedFunction(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2289,8 +2266,7 @@ func (client SQLResourcesClient) ListSQLContainers(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2380,8 +2356,7 @@ func (client SQLResourcesClient) ListSQLDatabases(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2470,8 +2445,7 @@ func (client SQLResourcesClient) ListSQLRoleAssignments(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2560,8 +2534,7 @@ func (client SQLResourcesClient) ListSQLRoleDefinitions(ctx context.Context, res Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2652,8 +2625,7 @@ func (client SQLResourcesClient) ListSQLStoredProcedures(ctx context.Context, re Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2746,8 +2718,7 @@ func (client SQLResourcesClient) ListSQLTriggers(ctx context.Context, resourceGr Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2840,8 +2811,7 @@ func (client SQLResourcesClient) ListSQLUserDefinedFunctions(ctx context.Context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -2934,8 +2904,7 @@ func (client SQLResourcesClient) MigrateSQLContainerToAutoscale(ctx context.Cont Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -3030,8 +2999,7 @@ func (client SQLResourcesClient) MigrateSQLContainerToManualThroughput(ctx conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -3125,8 +3093,7 @@ func (client SQLResourcesClient) MigrateSQLDatabaseToAutoscale(ctx context.Conte Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -3219,8 +3186,7 @@ func (client SQLResourcesClient) MigrateSQLDatabaseToManualThroughput(ctx contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -3315,8 +3281,7 @@ func (client SQLResourcesClient) UpdateSQLContainerThroughput(ctx context.Contex Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -3420,8 +3385,7 @@ func (client SQLResourcesClient) UpdateSQLDatabaseThroughput(ctx context.Context Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/tableresources.go b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/tableresources.go index 266988fc93ec..6c8cf13dd8e0 100644 --- a/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/tableresources.go +++ b/services/preview/cosmos-db/mgmt/2021-03-01-preview/documentdb/tableresources.go @@ -53,8 +53,7 @@ func (client TableResourcesClient) CreateUpdateTable(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -154,8 +153,7 @@ func (client TableResourcesClient) DeleteTable(ctx context.Context, resourceGrou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -247,8 +245,7 @@ func (client TableResourcesClient) GetTable(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -340,8 +337,7 @@ func (client TableResourcesClient) GetTableThroughput(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -431,8 +427,7 @@ func (client TableResourcesClient) ListTables(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -522,8 +517,7 @@ func (client TableResourcesClient) MigrateTableToAutoscale(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -616,8 +610,7 @@ func (client TableResourcesClient) MigrateTableToManualThroughput(ctx context.Co Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -711,8 +704,7 @@ func (client TableResourcesClient) UpdateTableThroughput(ctx context.Context, re Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: accountName, Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/CHANGELOG.md b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/CHANGELOG.md new file mode 100644 index 000000000000..52911e4cc5e4 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/CHANGELOG.md @@ -0,0 +1,2 @@ +# Change History + diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/_meta.json b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/_meta.json new file mode 100644 index 000000000000..f7e41e987887 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "6e95cd4c6086d61bb3de67cf6e4209a7b84efa23", + "readme": "/_/azure-rest-api-specs/specification/synapse/resource-manager/readme.md", + "tag": "package-preview-2021-06", + "use": "@microsoft.azure/autorest.go@2.1.183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-preview-2021-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/synapse/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/azureadonlyauthentications.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/azureadonlyauthentications.go new file mode 100644 index 000000000000..ff2f93469c82 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/azureadonlyauthentications.go @@ -0,0 +1,340 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// AzureADOnlyAuthenticationsClient is the azure Synapse Analytics Management Client +type AzureADOnlyAuthenticationsClient struct { + BaseClient +} + +// NewAzureADOnlyAuthenticationsClient creates an instance of the AzureADOnlyAuthenticationsClient client. +func NewAzureADOnlyAuthenticationsClient(subscriptionID string) AzureADOnlyAuthenticationsClient { + return NewAzureADOnlyAuthenticationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAzureADOnlyAuthenticationsClientWithBaseURI creates an instance of the AzureADOnlyAuthenticationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewAzureADOnlyAuthenticationsClientWithBaseURI(baseURI string, subscriptionID string) AzureADOnlyAuthenticationsClient { + return AzureADOnlyAuthenticationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create or Update a Azure Active Directory Only Authentication property for the workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// azureADOnlyAuthenticationInfo - azure Active Directory Property +func (client AzureADOnlyAuthenticationsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationInfo AzureADOnlyAuthentication) (result AzureADOnlyAuthenticationsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {TargetValue: azureADOnlyAuthenticationInfo, + Constraints: []validation.Constraint{{Target: "azureADOnlyAuthenticationInfo.AzureADOnlyAuthenticationProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "azureADOnlyAuthenticationInfo.AzureADOnlyAuthenticationProperties.AzureADOnlyAuthentication", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("synapse.AzureADOnlyAuthenticationsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, azureADOnlyAuthenticationInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client AzureADOnlyAuthenticationsClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationInfo AzureADOnlyAuthentication) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureADOnlyAuthenticationName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}", pathParameters), + autorest.WithJSON(azureADOnlyAuthenticationInfo), + 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 AzureADOnlyAuthenticationsClient) CreateSender(req *http.Request) (future AzureADOnlyAuthenticationsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client AzureADOnlyAuthenticationsClient) CreateResponder(resp *http.Response) (result AzureADOnlyAuthentication, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a Azure Active Directory Only Authentication property for the workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client AzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result AzureADOnlyAuthentication, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.AzureADOnlyAuthenticationsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client AzureADOnlyAuthenticationsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureADOnlyAuthenticationName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}", 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 AzureADOnlyAuthenticationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AzureADOnlyAuthenticationsClient) GetResponder(resp *http.Response) (result AzureADOnlyAuthentication, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of Azure Active Directory Only Authentication properties for a workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client AzureADOnlyAuthenticationsClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result AzureADOnlyAuthenticationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationsClient.List") + defer func() { + sc := -1 + if result.aaoalr.Response.Response != nil { + sc = result.aaoalr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.AzureADOnlyAuthenticationsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aaoalr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "List", resp, "Failure sending request") + return + } + + result.aaoalr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "List", resp, "Failure responding to request") + return + } + if result.aaoalr.hasNextLink() && result.aaoalr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client AzureADOnlyAuthenticationsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications", 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 AzureADOnlyAuthenticationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AzureADOnlyAuthenticationsClient) ListResponder(resp *http.Response) (result AzureADOnlyAuthenticationListResult, err error) { + err = autorest.Respond( + resp, + 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 AzureADOnlyAuthenticationsClient) listNextResults(ctx context.Context, lastResults AzureADOnlyAuthenticationListResult) (result AzureADOnlyAuthenticationListResult, err error) { + req, err := lastResults.azureADOnlyAuthenticationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "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, "synapse.AzureADOnlyAuthenticationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AzureADOnlyAuthenticationsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result AzureADOnlyAuthenticationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationsClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/bigdatapools.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/bigdatapools.go new file mode 100644 index 000000000000..b02d16246649 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/bigdatapools.go @@ -0,0 +1,523 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// BigDataPoolsClient is the azure Synapse Analytics Management Client +type BigDataPoolsClient struct { + BaseClient +} + +// NewBigDataPoolsClient creates an instance of the BigDataPoolsClient client. +func NewBigDataPoolsClient(subscriptionID string) BigDataPoolsClient { + return NewBigDataPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBigDataPoolsClientWithBaseURI creates an instance of the BigDataPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewBigDataPoolsClientWithBaseURI(baseURI string, subscriptionID string) BigDataPoolsClient { + return BigDataPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create a new Big Data pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// bigDataPoolName - big Data pool name +// bigDataPoolInfo - the Big Data pool to create. +// force - whether to stop any running jobs in the Big Data pool +func (client BigDataPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolInfo BigDataPoolResourceInfo, force *bool) (result BigDataPoolsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.BigDataPoolsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, bigDataPoolName, bigDataPoolInfo, force) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BigDataPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolInfo BigDataPoolResourceInfo, force *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bigDataPoolName": autorest.Encode("path", bigDataPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if force != nil { + queryParameters["force"] = autorest.Encode("query", *force) + } else { + queryParameters["force"] = autorest.Encode("query", false) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}", pathParameters), + autorest.WithJSON(bigDataPoolInfo), + 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 BigDataPoolsClient) CreateOrUpdateSender(req *http.Request) (future BigDataPoolsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BigDataPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result BigDataPoolResourceInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a Big Data pool from the workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// bigDataPoolName - big Data pool name +func (client BigDataPoolsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string) (result BigDataPoolsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.BigDataPoolsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, bigDataPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BigDataPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bigDataPoolName": autorest.Encode("path", bigDataPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}", 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 BigDataPoolsClient) DeleteSender(req *http.Request) (future BigDataPoolsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BigDataPoolsClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a Big Data pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// bigDataPoolName - big Data pool name +func (client BigDataPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string) (result BigDataPoolResourceInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.BigDataPoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, bigDataPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client BigDataPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bigDataPoolName": autorest.Encode("path", bigDataPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}", 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 BigDataPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BigDataPoolsClient) GetResponder(resp *http.Response) (result BigDataPoolResourceInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace list Big Data pools in a workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client BigDataPoolsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result BigDataPoolResourceInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolsClient.ListByWorkspace") + defer func() { + sc := -1 + if result.bdprilr.Response.Response != nil { + sc = result.bdprilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.BigDataPoolsClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.bdprilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.bdprilr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.bdprilr.hasNextLink() && result.bdprilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client BigDataPoolsClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/bigDataPools", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client BigDataPoolsClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client BigDataPoolsClient) ListByWorkspaceResponder(resp *http.Response) (result BigDataPoolResourceInfoListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client BigDataPoolsClient) listByWorkspaceNextResults(ctx context.Context, lastResults BigDataPoolResourceInfoListResult) (result BigDataPoolResourceInfoListResult, err error) { + req, err := lastResults.bigDataPoolResourceInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client BigDataPoolsClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result BigDataPoolResourceInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolsClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} + +// Update patch a Big Data pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// bigDataPoolName - big Data pool name +// bigDataPoolPatchInfo - the updated Big Data pool properties +func (client BigDataPoolsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolPatchInfo BigDataPoolPatchInfo) (result BigDataPoolResourceInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.BigDataPoolsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, bigDataPoolName, bigDataPoolPatchInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BigDataPoolsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolPatchInfo BigDataPoolPatchInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bigDataPoolName": autorest.Encode("path", bigDataPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}", pathParameters), + autorest.WithJSON(bigDataPoolPatchInfo), + 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 BigDataPoolsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BigDataPoolsClient) UpdateResponder(resp *http.Response) (result BigDataPoolResourceInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/client.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/client.go new file mode 100644 index 000000000000..aebb2e95a4de --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/client.go @@ -0,0 +1,41 @@ +// Package synapse implements the Azure ARM Synapse service API version 2021-06-01-preview. +// +// Azure Synapse Analytics Management Client +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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 Synapse + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Synapse. +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 using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingpolicies.go new file mode 100644 index 000000000000..20109771c91d --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingpolicies.go @@ -0,0 +1,215 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DataMaskingPoliciesClient is the azure Synapse Analytics Management Client +type DataMaskingPoliciesClient struct { + BaseClient +} + +// NewDataMaskingPoliciesClient creates an instance of the DataMaskingPoliciesClient client. +func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClient { + return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDataMaskingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingPoliciesClient { + return DataMaskingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Sql pool data masking policy +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - parameters for creating or updating a data masking policy. +func (client DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters DataMaskingPolicy) (result DataMaskingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.DataMaskingPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.DataMaskingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DataMaskingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters DataMaskingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dataMaskingPolicyName": autorest.Encode("path", "Default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Location = nil + parameters.Kind = nil + parameters.ManagedBy = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}", 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 DataMaskingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DataMaskingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a Sql pool data masking policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result DataMaskingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.DataMaskingPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.DataMaskingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DataMaskingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dataMaskingPolicyName": autorest.Encode("path", "Default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}", 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 DataMaskingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DataMaskingPoliciesClient) GetResponder(resp *http.Response) (result DataMaskingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingrules.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingrules.go new file mode 100644 index 000000000000..b893350b4b1f --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/datamaskingrules.go @@ -0,0 +1,312 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// DataMaskingRulesClient is the azure Synapse Analytics Management Client +type DataMaskingRulesClient struct { + BaseClient +} + +// NewDataMaskingRulesClient creates an instance of the DataMaskingRulesClient client. +func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { + return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDataMaskingRulesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingRulesClient { + return DataMaskingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Sql pool data masking rule. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// dataMaskingRuleName - the name of the data masking rule. +// parameters - the required parameters for creating or updating a data masking rule. +func (client DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, dataMaskingRuleName string, parameters DataMaskingRule) (result DataMaskingRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties.SchemaName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DataMaskingRuleProperties.TableName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DataMaskingRuleProperties.ColumnName", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("synapse.DataMaskingRulesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, dataMaskingRuleName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DataMaskingRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, dataMaskingRuleName string, parameters DataMaskingRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dataMaskingPolicyName": autorest.Encode("path", "Default"), + "dataMaskingRuleName": autorest.Encode("path", dataMaskingRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Location = nil + parameters.Kind = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}", 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 DataMaskingRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DataMaskingRulesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the specific Sql pool data masking rule. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// dataMaskingRuleName - the name of the data masking rule. +func (client DataMaskingRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, dataMaskingRuleName string) (result DataMaskingRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.DataMaskingRulesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, dataMaskingRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client DataMaskingRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, dataMaskingRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dataMaskingPolicyName": autorest.Encode("path", "Default"), + "dataMaskingRuleName": autorest.Encode("path", dataMaskingRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}", 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 DataMaskingRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DataMaskingRulesClient) GetResponder(resp *http.Response) (result DataMaskingRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySQLPool gets a list of Sql pool data masking rules. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client DataMaskingRulesClient) ListBySQLPool(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result DataMaskingRuleListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.ListBySQLPool") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.DataMaskingRulesClient", "ListBySQLPool", err.Error()) + } + + req, err := client.ListBySQLPoolPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "ListBySQLPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySQLPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "ListBySQLPool", resp, "Failure sending request") + return + } + + result, err = client.ListBySQLPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.DataMaskingRulesClient", "ListBySQLPool", resp, "Failure responding to request") + return + } + + return +} + +// ListBySQLPoolPreparer prepares the ListBySQLPool request. +func (client DataMaskingRulesClient) ListBySQLPoolPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dataMaskingPolicyName": autorest.Encode("path", "Default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySQLPoolSender sends the ListBySQLPool request. The method will close the +// http.Response Body if it receives an error. +func (client DataMaskingRulesClient) ListBySQLPoolSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySQLPoolResponder handles the response to the ListBySQLPool request. The method always +// closes the http.Response Body. +func (client DataMaskingRulesClient) ListBySQLPoolResponder(resp *http.Response) (result DataMaskingRuleListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/enums.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/enums.go new file mode 100644 index 000000000000..de71cda96e1f --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/enums.go @@ -0,0 +1,1077 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActualState enumerates the values for actual state. +type ActualState string + +const ( + // ActualStateDisabled ... + ActualStateDisabled ActualState = "Disabled" + // ActualStateDisabling ... + ActualStateDisabling ActualState = "Disabling" + // ActualStateEnabled ... + ActualStateEnabled ActualState = "Enabled" + // ActualStateEnabling ... + ActualStateEnabling ActualState = "Enabling" + // ActualStateUnknown ... + ActualStateUnknown ActualState = "Unknown" +) + +// PossibleActualStateValues returns an array of possible values for the ActualState const type. +func PossibleActualStateValues() []ActualState { + return []ActualState{ActualStateDisabled, ActualStateDisabling, ActualStateEnabled, ActualStateEnabling, ActualStateUnknown} +} + +// AuthenticationState enumerates the values for authentication state. +type AuthenticationState string + +const ( + // AuthenticationStateConsistent ... + AuthenticationStateConsistent AuthenticationState = "Consistent" + // AuthenticationStateInConsistent ... + AuthenticationStateInConsistent AuthenticationState = "InConsistent" + // AuthenticationStateUpdating ... + AuthenticationStateUpdating AuthenticationState = "Updating" +) + +// PossibleAuthenticationStateValues returns an array of possible values for the AuthenticationState const type. +func PossibleAuthenticationStateValues() []AuthenticationState { + return []AuthenticationState{AuthenticationStateConsistent, AuthenticationStateInConsistent, AuthenticationStateUpdating} +} + +// AuthorizationType enumerates the values for authorization type. +type AuthorizationType string + +const ( + // AuthorizationTypeKey ... + AuthorizationTypeKey AuthorizationType = "Key" + // AuthorizationTypeLinkedIntegrationRuntimeType ... + AuthorizationTypeLinkedIntegrationRuntimeType AuthorizationType = "LinkedIntegrationRuntimeType" + // AuthorizationTypeRBAC ... + AuthorizationTypeRBAC AuthorizationType = "RBAC" +) + +// PossibleAuthorizationTypeValues returns an array of possible values for the AuthorizationType const type. +func PossibleAuthorizationTypeValues() []AuthorizationType { + return []AuthorizationType{AuthorizationTypeKey, AuthorizationTypeLinkedIntegrationRuntimeType, AuthorizationTypeRBAC} +} + +// BlobAuditingPolicyState enumerates the values for blob auditing policy state. +type BlobAuditingPolicyState string + +const ( + // BlobAuditingPolicyStateDisabled ... + BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" + // BlobAuditingPolicyStateEnabled ... + BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" +) + +// PossibleBlobAuditingPolicyStateValues returns an array of possible values for the BlobAuditingPolicyState const type. +func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState { + return []BlobAuditingPolicyState{BlobAuditingPolicyStateDisabled, BlobAuditingPolicyStateEnabled} +} + +// ColumnDataType enumerates the values for column data type. +type ColumnDataType string + +const ( + // ColumnDataTypeBigint ... + ColumnDataTypeBigint ColumnDataType = "bigint" + // ColumnDataTypeBinary ... + ColumnDataTypeBinary ColumnDataType = "binary" + // ColumnDataTypeBit ... + ColumnDataTypeBit ColumnDataType = "bit" + // ColumnDataTypeChar ... + ColumnDataTypeChar ColumnDataType = "char" + // ColumnDataTypeDate ... + ColumnDataTypeDate ColumnDataType = "date" + // ColumnDataTypeDatetime ... + ColumnDataTypeDatetime ColumnDataType = "datetime" + // ColumnDataTypeDatetime2 ... + ColumnDataTypeDatetime2 ColumnDataType = "datetime2" + // ColumnDataTypeDatetimeoffset ... + ColumnDataTypeDatetimeoffset ColumnDataType = "datetimeoffset" + // ColumnDataTypeDecimal ... + ColumnDataTypeDecimal ColumnDataType = "decimal" + // ColumnDataTypeFloat ... + ColumnDataTypeFloat ColumnDataType = "float" + // ColumnDataTypeGeography ... + ColumnDataTypeGeography ColumnDataType = "geography" + // ColumnDataTypeGeometry ... + ColumnDataTypeGeometry ColumnDataType = "geometry" + // ColumnDataTypeHierarchyid ... + ColumnDataTypeHierarchyid ColumnDataType = "hierarchyid" + // ColumnDataTypeImage ... + ColumnDataTypeImage ColumnDataType = "image" + // ColumnDataTypeInt ... + ColumnDataTypeInt ColumnDataType = "int" + // ColumnDataTypeMoney ... + ColumnDataTypeMoney ColumnDataType = "money" + // ColumnDataTypeNchar ... + ColumnDataTypeNchar ColumnDataType = "nchar" + // ColumnDataTypeNtext ... + ColumnDataTypeNtext ColumnDataType = "ntext" + // ColumnDataTypeNumeric ... + ColumnDataTypeNumeric ColumnDataType = "numeric" + // ColumnDataTypeNvarchar ... + ColumnDataTypeNvarchar ColumnDataType = "nvarchar" + // ColumnDataTypeReal ... + ColumnDataTypeReal ColumnDataType = "real" + // ColumnDataTypeSmalldatetime ... + ColumnDataTypeSmalldatetime ColumnDataType = "smalldatetime" + // ColumnDataTypeSmallint ... + ColumnDataTypeSmallint ColumnDataType = "smallint" + // ColumnDataTypeSmallmoney ... + ColumnDataTypeSmallmoney ColumnDataType = "smallmoney" + // ColumnDataTypeSQLVariant ... + ColumnDataTypeSQLVariant ColumnDataType = "sql_variant" + // ColumnDataTypeSysname ... + ColumnDataTypeSysname ColumnDataType = "sysname" + // ColumnDataTypeText ... + ColumnDataTypeText ColumnDataType = "text" + // ColumnDataTypeTime ... + ColumnDataTypeTime ColumnDataType = "time" + // ColumnDataTypeTimestamp ... + ColumnDataTypeTimestamp ColumnDataType = "timestamp" + // ColumnDataTypeTinyint ... + ColumnDataTypeTinyint ColumnDataType = "tinyint" + // ColumnDataTypeUniqueidentifier ... + ColumnDataTypeUniqueidentifier ColumnDataType = "uniqueidentifier" + // ColumnDataTypeVarbinary ... + ColumnDataTypeVarbinary ColumnDataType = "varbinary" + // ColumnDataTypeVarchar ... + ColumnDataTypeVarchar ColumnDataType = "varchar" + // ColumnDataTypeXML ... + ColumnDataTypeXML ColumnDataType = "xml" +) + +// PossibleColumnDataTypeValues returns an array of possible values for the ColumnDataType const type. +func PossibleColumnDataTypeValues() []ColumnDataType { + return []ColumnDataType{ColumnDataTypeBigint, ColumnDataTypeBinary, ColumnDataTypeBit, ColumnDataTypeChar, ColumnDataTypeDate, ColumnDataTypeDatetime, ColumnDataTypeDatetime2, ColumnDataTypeDatetimeoffset, ColumnDataTypeDecimal, ColumnDataTypeFloat, ColumnDataTypeGeography, ColumnDataTypeGeometry, ColumnDataTypeHierarchyid, ColumnDataTypeImage, ColumnDataTypeInt, ColumnDataTypeMoney, ColumnDataTypeNchar, ColumnDataTypeNtext, ColumnDataTypeNumeric, ColumnDataTypeNvarchar, ColumnDataTypeReal, ColumnDataTypeSmalldatetime, ColumnDataTypeSmallint, ColumnDataTypeSmallmoney, ColumnDataTypeSQLVariant, ColumnDataTypeSysname, ColumnDataTypeText, ColumnDataTypeTime, ColumnDataTypeTimestamp, ColumnDataTypeTinyint, ColumnDataTypeUniqueidentifier, ColumnDataTypeVarbinary, ColumnDataTypeVarchar, ColumnDataTypeXML} +} + +// ConfigurationType enumerates the values for configuration type. +type ConfigurationType string + +const ( + // ConfigurationTypeArtifact ... + ConfigurationTypeArtifact ConfigurationType = "Artifact" + // ConfigurationTypeFile ... + ConfigurationTypeFile ConfigurationType = "File" +) + +// PossibleConfigurationTypeValues returns an array of possible values for the ConfigurationType const type. +func PossibleConfigurationTypeValues() []ConfigurationType { + return []ConfigurationType{ConfigurationTypeArtifact, ConfigurationTypeFile} +} + +// DataFlowComputeType enumerates the values for data flow compute type. +type DataFlowComputeType string + +const ( + // DataFlowComputeTypeComputeOptimized ... + DataFlowComputeTypeComputeOptimized DataFlowComputeType = "ComputeOptimized" + // DataFlowComputeTypeGeneral ... + DataFlowComputeTypeGeneral DataFlowComputeType = "General" + // DataFlowComputeTypeMemoryOptimized ... + DataFlowComputeTypeMemoryOptimized DataFlowComputeType = "MemoryOptimized" +) + +// PossibleDataFlowComputeTypeValues returns an array of possible values for the DataFlowComputeType const type. +func PossibleDataFlowComputeTypeValues() []DataFlowComputeType { + return []DataFlowComputeType{DataFlowComputeTypeComputeOptimized, DataFlowComputeTypeGeneral, DataFlowComputeTypeMemoryOptimized} +} + +// DataMaskingFunction enumerates the values for data masking function. +type DataMaskingFunction string + +const ( + // DataMaskingFunctionCCN ... + DataMaskingFunctionCCN DataMaskingFunction = "CCN" + // DataMaskingFunctionDefault ... + DataMaskingFunctionDefault DataMaskingFunction = "Default" + // DataMaskingFunctionEmail ... + DataMaskingFunctionEmail DataMaskingFunction = "Email" + // DataMaskingFunctionNumber ... + DataMaskingFunctionNumber DataMaskingFunction = "Number" + // DataMaskingFunctionSSN ... + DataMaskingFunctionSSN DataMaskingFunction = "SSN" + // DataMaskingFunctionText ... + DataMaskingFunctionText DataMaskingFunction = "Text" +) + +// PossibleDataMaskingFunctionValues returns an array of possible values for the DataMaskingFunction const type. +func PossibleDataMaskingFunctionValues() []DataMaskingFunction { + return []DataMaskingFunction{DataMaskingFunctionCCN, DataMaskingFunctionDefault, DataMaskingFunctionEmail, DataMaskingFunctionNumber, DataMaskingFunctionSSN, DataMaskingFunctionText} +} + +// DataMaskingRuleState enumerates the values for data masking rule state. +type DataMaskingRuleState string + +const ( + // DataMaskingRuleStateDisabled ... + DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" + // DataMaskingRuleStateEnabled ... + DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" +) + +// PossibleDataMaskingRuleStateValues returns an array of possible values for the DataMaskingRuleState const type. +func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState { + return []DataMaskingRuleState{DataMaskingRuleStateDisabled, DataMaskingRuleStateEnabled} +} + +// DataMaskingState enumerates the values for data masking state. +type DataMaskingState string + +const ( + // DataMaskingStateDisabled ... + DataMaskingStateDisabled DataMaskingState = "Disabled" + // DataMaskingStateEnabled ... + DataMaskingStateEnabled DataMaskingState = "Enabled" +) + +// PossibleDataMaskingStateValues returns an array of possible values for the DataMaskingState const type. +func PossibleDataMaskingStateValues() []DataMaskingState { + return []DataMaskingState{DataMaskingStateDisabled, DataMaskingStateEnabled} +} + +// DayOfWeek enumerates the values for day of week. +type DayOfWeek string + +const ( + // DayOfWeekFriday ... + DayOfWeekFriday DayOfWeek = "Friday" + // DayOfWeekMonday ... + DayOfWeekMonday DayOfWeek = "Monday" + // DayOfWeekSaturday ... + DayOfWeekSaturday DayOfWeek = "Saturday" + // DayOfWeekSunday ... + DayOfWeekSunday DayOfWeek = "Sunday" + // DayOfWeekThursday ... + DayOfWeekThursday DayOfWeek = "Thursday" + // DayOfWeekTuesday ... + DayOfWeekTuesday DayOfWeek = "Tuesday" + // DayOfWeekWednesday ... + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{DayOfWeekFriday, DayOfWeekMonday, DayOfWeekSaturday, DayOfWeekSunday, DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday} +} + +// DesiredState enumerates the values for desired state. +type DesiredState string + +const ( + // DesiredStateDisabled ... + DesiredStateDisabled DesiredState = "Disabled" + // DesiredStateEnabled ... + DesiredStateEnabled DesiredState = "Enabled" +) + +// PossibleDesiredStateValues returns an array of possible values for the DesiredState const type. +func PossibleDesiredStateValues() []DesiredState { + return []DesiredState{DesiredStateDisabled, DesiredStateEnabled} +} + +// GeoBackupPolicyState enumerates the values for geo backup policy state. +type GeoBackupPolicyState string + +const ( + // GeoBackupPolicyStateDisabled ... + GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" + // GeoBackupPolicyStateEnabled ... + GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" +) + +// PossibleGeoBackupPolicyStateValues returns an array of possible values for the GeoBackupPolicyState const type. +func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState { + return []GeoBackupPolicyState{GeoBackupPolicyStateDisabled, GeoBackupPolicyStateEnabled} +} + +// IntegrationRuntimeAuthKeyName enumerates the values for integration runtime auth key name. +type IntegrationRuntimeAuthKeyName string + +const ( + // IntegrationRuntimeAuthKeyNameAuthKey1 ... + IntegrationRuntimeAuthKeyNameAuthKey1 IntegrationRuntimeAuthKeyName = "authKey1" + // IntegrationRuntimeAuthKeyNameAuthKey2 ... + IntegrationRuntimeAuthKeyNameAuthKey2 IntegrationRuntimeAuthKeyName = "authKey2" +) + +// PossibleIntegrationRuntimeAuthKeyNameValues returns an array of possible values for the IntegrationRuntimeAuthKeyName const type. +func PossibleIntegrationRuntimeAuthKeyNameValues() []IntegrationRuntimeAuthKeyName { + return []IntegrationRuntimeAuthKeyName{IntegrationRuntimeAuthKeyNameAuthKey1, IntegrationRuntimeAuthKeyNameAuthKey2} +} + +// IntegrationRuntimeAutoUpdate enumerates the values for integration runtime auto update. +type IntegrationRuntimeAutoUpdate string + +const ( + // IntegrationRuntimeAutoUpdateOff ... + IntegrationRuntimeAutoUpdateOff IntegrationRuntimeAutoUpdate = "Off" + // IntegrationRuntimeAutoUpdateOn ... + IntegrationRuntimeAutoUpdateOn IntegrationRuntimeAutoUpdate = "On" +) + +// PossibleIntegrationRuntimeAutoUpdateValues returns an array of possible values for the IntegrationRuntimeAutoUpdate const type. +func PossibleIntegrationRuntimeAutoUpdateValues() []IntegrationRuntimeAutoUpdate { + return []IntegrationRuntimeAutoUpdate{IntegrationRuntimeAutoUpdateOff, IntegrationRuntimeAutoUpdateOn} +} + +// IntegrationRuntimeEdition enumerates the values for integration runtime edition. +type IntegrationRuntimeEdition string + +const ( + // IntegrationRuntimeEditionEnterprise ... + IntegrationRuntimeEditionEnterprise IntegrationRuntimeEdition = "Enterprise" + // IntegrationRuntimeEditionStandard ... + IntegrationRuntimeEditionStandard IntegrationRuntimeEdition = "Standard" +) + +// PossibleIntegrationRuntimeEditionValues returns an array of possible values for the IntegrationRuntimeEdition const type. +func PossibleIntegrationRuntimeEditionValues() []IntegrationRuntimeEdition { + return []IntegrationRuntimeEdition{IntegrationRuntimeEditionEnterprise, IntegrationRuntimeEditionStandard} +} + +// IntegrationRuntimeEntityReferenceType enumerates the values for integration runtime entity reference type. +type IntegrationRuntimeEntityReferenceType string + +const ( + // IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference ... + IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference IntegrationRuntimeEntityReferenceType = "IntegrationRuntimeReference" + // IntegrationRuntimeEntityReferenceTypeLinkedServiceReference ... + IntegrationRuntimeEntityReferenceTypeLinkedServiceReference IntegrationRuntimeEntityReferenceType = "LinkedServiceReference" +) + +// PossibleIntegrationRuntimeEntityReferenceTypeValues returns an array of possible values for the IntegrationRuntimeEntityReferenceType const type. +func PossibleIntegrationRuntimeEntityReferenceTypeValues() []IntegrationRuntimeEntityReferenceType { + return []IntegrationRuntimeEntityReferenceType{IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference, IntegrationRuntimeEntityReferenceTypeLinkedServiceReference} +} + +// IntegrationRuntimeInternalChannelEncryptionMode enumerates the values for integration runtime internal +// channel encryption mode. +type IntegrationRuntimeInternalChannelEncryptionMode string + +const ( + // IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted ... + IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted IntegrationRuntimeInternalChannelEncryptionMode = "NotEncrypted" + // IntegrationRuntimeInternalChannelEncryptionModeNotSet ... + IntegrationRuntimeInternalChannelEncryptionModeNotSet IntegrationRuntimeInternalChannelEncryptionMode = "NotSet" + // IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted ... + IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted IntegrationRuntimeInternalChannelEncryptionMode = "SslEncrypted" +) + +// PossibleIntegrationRuntimeInternalChannelEncryptionModeValues returns an array of possible values for the IntegrationRuntimeInternalChannelEncryptionMode const type. +func PossibleIntegrationRuntimeInternalChannelEncryptionModeValues() []IntegrationRuntimeInternalChannelEncryptionMode { + return []IntegrationRuntimeInternalChannelEncryptionMode{IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted, IntegrationRuntimeInternalChannelEncryptionModeNotSet, IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted} +} + +// IntegrationRuntimeLicenseType enumerates the values for integration runtime license type. +type IntegrationRuntimeLicenseType string + +const ( + // IntegrationRuntimeLicenseTypeBasePrice ... + IntegrationRuntimeLicenseTypeBasePrice IntegrationRuntimeLicenseType = "BasePrice" + // IntegrationRuntimeLicenseTypeLicenseIncluded ... + IntegrationRuntimeLicenseTypeLicenseIncluded IntegrationRuntimeLicenseType = "LicenseIncluded" +) + +// PossibleIntegrationRuntimeLicenseTypeValues returns an array of possible values for the IntegrationRuntimeLicenseType const type. +func PossibleIntegrationRuntimeLicenseTypeValues() []IntegrationRuntimeLicenseType { + return []IntegrationRuntimeLicenseType{IntegrationRuntimeLicenseTypeBasePrice, IntegrationRuntimeLicenseTypeLicenseIncluded} +} + +// IntegrationRuntimeSsisCatalogPricingTier enumerates the values for integration runtime ssis catalog pricing +// tier. +type IntegrationRuntimeSsisCatalogPricingTier string + +const ( + // IntegrationRuntimeSsisCatalogPricingTierBasic ... + IntegrationRuntimeSsisCatalogPricingTierBasic IntegrationRuntimeSsisCatalogPricingTier = "Basic" + // IntegrationRuntimeSsisCatalogPricingTierPremium ... + IntegrationRuntimeSsisCatalogPricingTierPremium IntegrationRuntimeSsisCatalogPricingTier = "Premium" + // IntegrationRuntimeSsisCatalogPricingTierPremiumRS ... + IntegrationRuntimeSsisCatalogPricingTierPremiumRS IntegrationRuntimeSsisCatalogPricingTier = "PremiumRS" + // IntegrationRuntimeSsisCatalogPricingTierStandard ... + IntegrationRuntimeSsisCatalogPricingTierStandard IntegrationRuntimeSsisCatalogPricingTier = "Standard" +) + +// PossibleIntegrationRuntimeSsisCatalogPricingTierValues returns an array of possible values for the IntegrationRuntimeSsisCatalogPricingTier const type. +func PossibleIntegrationRuntimeSsisCatalogPricingTierValues() []IntegrationRuntimeSsisCatalogPricingTier { + return []IntegrationRuntimeSsisCatalogPricingTier{IntegrationRuntimeSsisCatalogPricingTierBasic, IntegrationRuntimeSsisCatalogPricingTierPremium, IntegrationRuntimeSsisCatalogPricingTierPremiumRS, IntegrationRuntimeSsisCatalogPricingTierStandard} +} + +// IntegrationRuntimeState enumerates the values for integration runtime state. +type IntegrationRuntimeState string + +const ( + // IntegrationRuntimeStateAccessDenied ... + IntegrationRuntimeStateAccessDenied IntegrationRuntimeState = "AccessDenied" + // IntegrationRuntimeStateInitial ... + IntegrationRuntimeStateInitial IntegrationRuntimeState = "Initial" + // IntegrationRuntimeStateLimited ... + IntegrationRuntimeStateLimited IntegrationRuntimeState = "Limited" + // IntegrationRuntimeStateNeedRegistration ... + IntegrationRuntimeStateNeedRegistration IntegrationRuntimeState = "NeedRegistration" + // IntegrationRuntimeStateOffline ... + IntegrationRuntimeStateOffline IntegrationRuntimeState = "Offline" + // IntegrationRuntimeStateOnline ... + IntegrationRuntimeStateOnline IntegrationRuntimeState = "Online" + // IntegrationRuntimeStateStarted ... + IntegrationRuntimeStateStarted IntegrationRuntimeState = "Started" + // IntegrationRuntimeStateStarting ... + IntegrationRuntimeStateStarting IntegrationRuntimeState = "Starting" + // IntegrationRuntimeStateStopped ... + IntegrationRuntimeStateStopped IntegrationRuntimeState = "Stopped" + // IntegrationRuntimeStateStopping ... + IntegrationRuntimeStateStopping IntegrationRuntimeState = "Stopping" +) + +// PossibleIntegrationRuntimeStateValues returns an array of possible values for the IntegrationRuntimeState const type. +func PossibleIntegrationRuntimeStateValues() []IntegrationRuntimeState { + return []IntegrationRuntimeState{IntegrationRuntimeStateAccessDenied, IntegrationRuntimeStateInitial, IntegrationRuntimeStateLimited, IntegrationRuntimeStateNeedRegistration, IntegrationRuntimeStateOffline, IntegrationRuntimeStateOnline, IntegrationRuntimeStateStarted, IntegrationRuntimeStateStarting, IntegrationRuntimeStateStopped, IntegrationRuntimeStateStopping} +} + +// IntegrationRuntimeType enumerates the values for integration runtime type. +type IntegrationRuntimeType string + +const ( + // IntegrationRuntimeTypeManaged ... + IntegrationRuntimeTypeManaged IntegrationRuntimeType = "Managed" + // IntegrationRuntimeTypeSelfHosted ... + IntegrationRuntimeTypeSelfHosted IntegrationRuntimeType = "SelfHosted" +) + +// PossibleIntegrationRuntimeTypeValues returns an array of possible values for the IntegrationRuntimeType const type. +func PossibleIntegrationRuntimeTypeValues() []IntegrationRuntimeType { + return []IntegrationRuntimeType{IntegrationRuntimeTypeManaged, IntegrationRuntimeTypeSelfHosted} +} + +// IntegrationRuntimeUpdateResult enumerates the values for integration runtime update result. +type IntegrationRuntimeUpdateResult string + +const ( + // IntegrationRuntimeUpdateResultFail ... + IntegrationRuntimeUpdateResultFail IntegrationRuntimeUpdateResult = "Fail" + // IntegrationRuntimeUpdateResultNone ... + IntegrationRuntimeUpdateResultNone IntegrationRuntimeUpdateResult = "None" + // IntegrationRuntimeUpdateResultSucceed ... + IntegrationRuntimeUpdateResultSucceed IntegrationRuntimeUpdateResult = "Succeed" +) + +// PossibleIntegrationRuntimeUpdateResultValues returns an array of possible values for the IntegrationRuntimeUpdateResult const type. +func PossibleIntegrationRuntimeUpdateResultValues() []IntegrationRuntimeUpdateResult { + return []IntegrationRuntimeUpdateResult{IntegrationRuntimeUpdateResultFail, IntegrationRuntimeUpdateResultNone, IntegrationRuntimeUpdateResultSucceed} +} + +// ManagedIntegrationRuntimeNodeStatus enumerates the values for managed integration runtime node status. +type ManagedIntegrationRuntimeNodeStatus string + +const ( + // ManagedIntegrationRuntimeNodeStatusAvailable ... + ManagedIntegrationRuntimeNodeStatusAvailable ManagedIntegrationRuntimeNodeStatus = "Available" + // ManagedIntegrationRuntimeNodeStatusRecycling ... + ManagedIntegrationRuntimeNodeStatusRecycling ManagedIntegrationRuntimeNodeStatus = "Recycling" + // ManagedIntegrationRuntimeNodeStatusStarting ... + ManagedIntegrationRuntimeNodeStatusStarting ManagedIntegrationRuntimeNodeStatus = "Starting" + // ManagedIntegrationRuntimeNodeStatusUnavailable ... + ManagedIntegrationRuntimeNodeStatusUnavailable ManagedIntegrationRuntimeNodeStatus = "Unavailable" +) + +// PossibleManagedIntegrationRuntimeNodeStatusValues returns an array of possible values for the ManagedIntegrationRuntimeNodeStatus const type. +func PossibleManagedIntegrationRuntimeNodeStatusValues() []ManagedIntegrationRuntimeNodeStatus { + return []ManagedIntegrationRuntimeNodeStatus{ManagedIntegrationRuntimeNodeStatusAvailable, ManagedIntegrationRuntimeNodeStatusRecycling, ManagedIntegrationRuntimeNodeStatusStarting, ManagedIntegrationRuntimeNodeStatusUnavailable} +} + +// ManagementOperationState enumerates the values for management operation state. +type ManagementOperationState string + +const ( + // ManagementOperationStateCancelInProgress ... + ManagementOperationStateCancelInProgress ManagementOperationState = "CancelInProgress" + // ManagementOperationStateCancelled ... + ManagementOperationStateCancelled ManagementOperationState = "Cancelled" + // ManagementOperationStateFailed ... + ManagementOperationStateFailed ManagementOperationState = "Failed" + // ManagementOperationStateInProgress ... + ManagementOperationStateInProgress ManagementOperationState = "InProgress" + // ManagementOperationStatePending ... + ManagementOperationStatePending ManagementOperationState = "Pending" + // ManagementOperationStateSucceeded ... + ManagementOperationStateSucceeded ManagementOperationState = "Succeeded" +) + +// PossibleManagementOperationStateValues returns an array of possible values for the ManagementOperationState const type. +func PossibleManagementOperationStateValues() []ManagementOperationState { + return []ManagementOperationState{ManagementOperationStateCancelInProgress, ManagementOperationStateCancelled, ManagementOperationStateFailed, ManagementOperationStateInProgress, ManagementOperationStatePending, ManagementOperationStateSucceeded} +} + +// NodeSize enumerates the values for node size. +type NodeSize string + +const ( + // NodeSizeLarge ... + NodeSizeLarge NodeSize = "Large" + // NodeSizeMedium ... + NodeSizeMedium NodeSize = "Medium" + // NodeSizeNone ... + NodeSizeNone NodeSize = "None" + // NodeSizeSmall ... + NodeSizeSmall NodeSize = "Small" + // NodeSizeXLarge ... + NodeSizeXLarge NodeSize = "XLarge" + // NodeSizeXXLarge ... + NodeSizeXXLarge NodeSize = "XXLarge" + // NodeSizeXXXLarge ... + NodeSizeXXXLarge NodeSize = "XXXLarge" +) + +// PossibleNodeSizeValues returns an array of possible values for the NodeSize const type. +func PossibleNodeSizeValues() []NodeSize { + return []NodeSize{NodeSizeLarge, NodeSizeMedium, NodeSizeNone, NodeSizeSmall, NodeSizeXLarge, NodeSizeXXLarge, NodeSizeXXXLarge} +} + +// NodeSizeFamily enumerates the values for node size family. +type NodeSizeFamily string + +const ( + // NodeSizeFamilyHardwareAcceleratedFPGA ... + NodeSizeFamilyHardwareAcceleratedFPGA NodeSizeFamily = "HardwareAcceleratedFPGA" + // NodeSizeFamilyHardwareAcceleratedGPU ... + NodeSizeFamilyHardwareAcceleratedGPU NodeSizeFamily = "HardwareAcceleratedGPU" + // NodeSizeFamilyMemoryOptimized ... + NodeSizeFamilyMemoryOptimized NodeSizeFamily = "MemoryOptimized" + // NodeSizeFamilyNone ... + NodeSizeFamilyNone NodeSizeFamily = "None" +) + +// PossibleNodeSizeFamilyValues returns an array of possible values for the NodeSizeFamily const type. +func PossibleNodeSizeFamilyValues() []NodeSizeFamily { + return []NodeSizeFamily{NodeSizeFamilyHardwareAcceleratedFPGA, NodeSizeFamilyHardwareAcceleratedGPU, NodeSizeFamilyMemoryOptimized, NodeSizeFamilyNone} +} + +// OperationStatus enumerates the values for operation status. +type OperationStatus string + +const ( + // OperationStatusCanceled ... + OperationStatusCanceled OperationStatus = "Canceled" + // OperationStatusFailed ... + OperationStatusFailed OperationStatus = "Failed" + // OperationStatusInProgress ... + OperationStatusInProgress OperationStatus = "InProgress" + // OperationStatusSucceeded ... + OperationStatusSucceeded OperationStatus = "Succeeded" +) + +// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. +func PossibleOperationStatusValues() []OperationStatus { + return []OperationStatus{OperationStatusCanceled, OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateDeleteError ... + ProvisioningStateDeleteError ProvisioningState = "DeleteError" + // ProvisioningStateDeleting ... + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateProvisioning ... + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ProvisioningStateDeleteError, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateProvisioning, ProvisioningStateSucceeded} +} + +// QueryAggregationFunction enumerates the values for query aggregation function. +type QueryAggregationFunction string + +const ( + // QueryAggregationFunctionAvg ... + QueryAggregationFunctionAvg QueryAggregationFunction = "avg" + // QueryAggregationFunctionMax ... + QueryAggregationFunctionMax QueryAggregationFunction = "max" + // QueryAggregationFunctionMin ... + QueryAggregationFunctionMin QueryAggregationFunction = "min" + // QueryAggregationFunctionSum ... + QueryAggregationFunctionSum QueryAggregationFunction = "sum" +) + +// PossibleQueryAggregationFunctionValues returns an array of possible values for the QueryAggregationFunction const type. +func PossibleQueryAggregationFunctionValues() []QueryAggregationFunction { + return []QueryAggregationFunction{QueryAggregationFunctionAvg, QueryAggregationFunctionMax, QueryAggregationFunctionMin, QueryAggregationFunctionSum} +} + +// QueryExecutionType enumerates the values for query execution type. +type QueryExecutionType string + +const ( + // QueryExecutionTypeAborted ... + QueryExecutionTypeAborted QueryExecutionType = "aborted" + // QueryExecutionTypeAny ... + QueryExecutionTypeAny QueryExecutionType = "any" + // QueryExecutionTypeException ... + QueryExecutionTypeException QueryExecutionType = "exception" + // QueryExecutionTypeIrregular ... + QueryExecutionTypeIrregular QueryExecutionType = "irregular" + // QueryExecutionTypeRegular ... + QueryExecutionTypeRegular QueryExecutionType = "regular" +) + +// PossibleQueryExecutionTypeValues returns an array of possible values for the QueryExecutionType const type. +func PossibleQueryExecutionTypeValues() []QueryExecutionType { + return []QueryExecutionType{QueryExecutionTypeAborted, QueryExecutionTypeAny, QueryExecutionTypeException, QueryExecutionTypeIrregular, QueryExecutionTypeRegular} +} + +// QueryMetricUnit enumerates the values for query metric unit. +type QueryMetricUnit string + +const ( + // QueryMetricUnitKB ... + QueryMetricUnitKB QueryMetricUnit = "KB" + // QueryMetricUnitMicroseconds ... + QueryMetricUnitMicroseconds QueryMetricUnit = "microseconds" + // QueryMetricUnitPercentage ... + QueryMetricUnitPercentage QueryMetricUnit = "percentage" +) + +// PossibleQueryMetricUnitValues returns an array of possible values for the QueryMetricUnit const type. +func PossibleQueryMetricUnitValues() []QueryMetricUnit { + return []QueryMetricUnit{QueryMetricUnitKB, QueryMetricUnitMicroseconds, QueryMetricUnitPercentage} +} + +// QueryObservedMetricType enumerates the values for query observed metric type. +type QueryObservedMetricType string + +const ( + // QueryObservedMetricTypeCPU ... + QueryObservedMetricTypeCPU QueryObservedMetricType = "cpu" + // QueryObservedMetricTypeDuration ... + QueryObservedMetricTypeDuration QueryObservedMetricType = "duration" + // QueryObservedMetricTypeExecutionCount ... + QueryObservedMetricTypeExecutionCount QueryObservedMetricType = "executionCount" + // QueryObservedMetricTypeIo ... + QueryObservedMetricTypeIo QueryObservedMetricType = "io" + // QueryObservedMetricTypeLogio ... + QueryObservedMetricTypeLogio QueryObservedMetricType = "logio" +) + +// PossibleQueryObservedMetricTypeValues returns an array of possible values for the QueryObservedMetricType const type. +func PossibleQueryObservedMetricTypeValues() []QueryObservedMetricType { + return []QueryObservedMetricType{QueryObservedMetricTypeCPU, QueryObservedMetricTypeDuration, QueryObservedMetricTypeExecutionCount, QueryObservedMetricTypeIo, QueryObservedMetricTypeLogio} +} + +// RecommendedSensitivityLabelUpdateKind enumerates the values for recommended sensitivity label update kind. +type RecommendedSensitivityLabelUpdateKind string + +const ( + // RecommendedSensitivityLabelUpdateKindDisable ... + RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = "disable" + // RecommendedSensitivityLabelUpdateKindEnable ... + RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = "enable" +) + +// PossibleRecommendedSensitivityLabelUpdateKindValues returns an array of possible values for the RecommendedSensitivityLabelUpdateKind const type. +func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitivityLabelUpdateKind { + return []RecommendedSensitivityLabelUpdateKind{RecommendedSensitivityLabelUpdateKindDisable, RecommendedSensitivityLabelUpdateKindEnable} +} + +// ReplicationRole enumerates the values for replication role. +type ReplicationRole string + +const ( + // ReplicationRoleCopy ... + ReplicationRoleCopy ReplicationRole = "Copy" + // ReplicationRoleNonReadableSecondary ... + ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" + // ReplicationRolePrimary ... + ReplicationRolePrimary ReplicationRole = "Primary" + // ReplicationRoleSecondary ... + ReplicationRoleSecondary ReplicationRole = "Secondary" + // ReplicationRoleSource ... + ReplicationRoleSource ReplicationRole = "Source" +) + +// PossibleReplicationRoleValues returns an array of possible values for the ReplicationRole const type. +func PossibleReplicationRoleValues() []ReplicationRole { + return []ReplicationRole{ReplicationRoleCopy, ReplicationRoleNonReadableSecondary, ReplicationRolePrimary, ReplicationRoleSecondary, ReplicationRoleSource} +} + +// ReplicationState enumerates the values for replication state. +type ReplicationState string + +const ( + // ReplicationStateCATCHUP ... + ReplicationStateCATCHUP ReplicationState = "CATCH_UP" + // ReplicationStatePENDING ... + ReplicationStatePENDING ReplicationState = "PENDING" + // ReplicationStateSEEDING ... + ReplicationStateSEEDING ReplicationState = "SEEDING" + // ReplicationStateSUSPENDED ... + ReplicationStateSUSPENDED ReplicationState = "SUSPENDED" +) + +// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. +func PossibleReplicationStateValues() []ReplicationState { + return []ReplicationState{ReplicationStateCATCHUP, ReplicationStatePENDING, ReplicationStateSEEDING, ReplicationStateSUSPENDED} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned,UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned} +} + +// RestorePointType enumerates the values for restore point type. +type RestorePointType string + +const ( + // RestorePointTypeCONTINUOUS ... + RestorePointTypeCONTINUOUS RestorePointType = "CONTINUOUS" + // RestorePointTypeDISCRETE ... + RestorePointTypeDISCRETE RestorePointType = "DISCRETE" +) + +// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. +func PossibleRestorePointTypeValues() []RestorePointType { + return []RestorePointType{RestorePointTypeCONTINUOUS, RestorePointTypeDISCRETE} +} + +// SecurityAlertPolicyState enumerates the values for security alert policy state. +type SecurityAlertPolicyState string + +const ( + // SecurityAlertPolicyStateDisabled ... + SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" + // SecurityAlertPolicyStateEnabled ... + SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" + // SecurityAlertPolicyStateNew ... + SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" +) + +// PossibleSecurityAlertPolicyStateValues returns an array of possible values for the SecurityAlertPolicyState const type. +func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { + return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew} +} + +// SelfHostedIntegrationRuntimeNodeStatus enumerates the values for self hosted integration runtime node +// status. +type SelfHostedIntegrationRuntimeNodeStatus string + +const ( + // SelfHostedIntegrationRuntimeNodeStatusInitializeFailed ... + SelfHostedIntegrationRuntimeNodeStatusInitializeFailed SelfHostedIntegrationRuntimeNodeStatus = "InitializeFailed" + // SelfHostedIntegrationRuntimeNodeStatusInitializing ... + SelfHostedIntegrationRuntimeNodeStatusInitializing SelfHostedIntegrationRuntimeNodeStatus = "Initializing" + // SelfHostedIntegrationRuntimeNodeStatusLimited ... + SelfHostedIntegrationRuntimeNodeStatusLimited SelfHostedIntegrationRuntimeNodeStatus = "Limited" + // SelfHostedIntegrationRuntimeNodeStatusNeedRegistration ... + SelfHostedIntegrationRuntimeNodeStatusNeedRegistration SelfHostedIntegrationRuntimeNodeStatus = "NeedRegistration" + // SelfHostedIntegrationRuntimeNodeStatusOffline ... + SelfHostedIntegrationRuntimeNodeStatusOffline SelfHostedIntegrationRuntimeNodeStatus = "Offline" + // SelfHostedIntegrationRuntimeNodeStatusOnline ... + SelfHostedIntegrationRuntimeNodeStatusOnline SelfHostedIntegrationRuntimeNodeStatus = "Online" + // SelfHostedIntegrationRuntimeNodeStatusUpgrading ... + SelfHostedIntegrationRuntimeNodeStatusUpgrading SelfHostedIntegrationRuntimeNodeStatus = "Upgrading" +) + +// PossibleSelfHostedIntegrationRuntimeNodeStatusValues returns an array of possible values for the SelfHostedIntegrationRuntimeNodeStatus const type. +func PossibleSelfHostedIntegrationRuntimeNodeStatusValues() []SelfHostedIntegrationRuntimeNodeStatus { + return []SelfHostedIntegrationRuntimeNodeStatus{SelfHostedIntegrationRuntimeNodeStatusInitializeFailed, SelfHostedIntegrationRuntimeNodeStatusInitializing, SelfHostedIntegrationRuntimeNodeStatusLimited, SelfHostedIntegrationRuntimeNodeStatusNeedRegistration, SelfHostedIntegrationRuntimeNodeStatusOffline, SelfHostedIntegrationRuntimeNodeStatusOnline, SelfHostedIntegrationRuntimeNodeStatusUpgrading} +} + +// SensitivityLabelRank enumerates the values for sensitivity label rank. +type SensitivityLabelRank string + +const ( + // SensitivityLabelRankCritical ... + SensitivityLabelRankCritical SensitivityLabelRank = "Critical" + // SensitivityLabelRankHigh ... + SensitivityLabelRankHigh SensitivityLabelRank = "High" + // SensitivityLabelRankLow ... + SensitivityLabelRankLow SensitivityLabelRank = "Low" + // SensitivityLabelRankMedium ... + SensitivityLabelRankMedium SensitivityLabelRank = "Medium" + // SensitivityLabelRankNone ... + SensitivityLabelRankNone SensitivityLabelRank = "None" +) + +// PossibleSensitivityLabelRankValues returns an array of possible values for the SensitivityLabelRank const type. +func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { + return []SensitivityLabelRank{SensitivityLabelRankCritical, SensitivityLabelRankHigh, SensitivityLabelRankLow, SensitivityLabelRankMedium, SensitivityLabelRankNone} +} + +// SensitivityLabelSource enumerates the values for sensitivity label source. +type SensitivityLabelSource string + +const ( + // SensitivityLabelSourceCurrent ... + SensitivityLabelSourceCurrent SensitivityLabelSource = "current" + // SensitivityLabelSourceRecommended ... + SensitivityLabelSourceRecommended SensitivityLabelSource = "recommended" +) + +// PossibleSensitivityLabelSourceValues returns an array of possible values for the SensitivityLabelSource const type. +func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { + return []SensitivityLabelSource{SensitivityLabelSourceCurrent, SensitivityLabelSourceRecommended} +} + +// SensitivityLabelUpdateKind enumerates the values for sensitivity label update kind. +type SensitivityLabelUpdateKind string + +const ( + // SensitivityLabelUpdateKindRemove ... + SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = "remove" + // SensitivityLabelUpdateKindSet ... + SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = "set" +) + +// PossibleSensitivityLabelUpdateKindValues returns an array of possible values for the SensitivityLabelUpdateKind const type. +func PossibleSensitivityLabelUpdateKindValues() []SensitivityLabelUpdateKind { + return []SensitivityLabelUpdateKind{SensitivityLabelUpdateKindRemove, SensitivityLabelUpdateKindSet} +} + +// ServerKeyType enumerates the values for server key type. +type ServerKeyType string + +const ( + // ServerKeyTypeAzureKeyVault ... + ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" + // ServerKeyTypeServiceManaged ... + ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" +) + +// PossibleServerKeyTypeValues returns an array of possible values for the ServerKeyType const type. +func PossibleServerKeyTypeValues() []ServerKeyType { + return []ServerKeyType{ServerKeyTypeAzureKeyVault, ServerKeyTypeServiceManaged} +} + +// SsisObjectMetadataType enumerates the values for ssis object metadata type. +type SsisObjectMetadataType string + +const ( + // SsisObjectMetadataTypeEnvironment ... + SsisObjectMetadataTypeEnvironment SsisObjectMetadataType = "Environment" + // SsisObjectMetadataTypeFolder ... + SsisObjectMetadataTypeFolder SsisObjectMetadataType = "Folder" + // SsisObjectMetadataTypePackage ... + SsisObjectMetadataTypePackage SsisObjectMetadataType = "Package" + // SsisObjectMetadataTypeProject ... + SsisObjectMetadataTypeProject SsisObjectMetadataType = "Project" +) + +// PossibleSsisObjectMetadataTypeValues returns an array of possible values for the SsisObjectMetadataType const type. +func PossibleSsisObjectMetadataTypeValues() []SsisObjectMetadataType { + return []SsisObjectMetadataType{SsisObjectMetadataTypeEnvironment, SsisObjectMetadataTypeFolder, SsisObjectMetadataTypePackage, SsisObjectMetadataTypeProject} +} + +// StorageAccountType enumerates the values for storage account type. +type StorageAccountType string + +const ( + // StorageAccountTypeGRS ... + StorageAccountTypeGRS StorageAccountType = "GRS" + // StorageAccountTypeLRS ... + StorageAccountTypeLRS StorageAccountType = "LRS" + // StorageAccountTypeZRS ... + StorageAccountTypeZRS StorageAccountType = "ZRS" +) + +// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. +func PossibleStorageAccountTypeValues() []StorageAccountType { + return []StorageAccountType{StorageAccountTypeGRS, StorageAccountTypeLRS, StorageAccountTypeZRS} +} + +// TransparentDataEncryptionStatus enumerates the values for transparent data encryption status. +type TransparentDataEncryptionStatus string + +const ( + // TransparentDataEncryptionStatusDisabled ... + TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled" + // TransparentDataEncryptionStatusEnabled ... + TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" +) + +// PossibleTransparentDataEncryptionStatusValues returns an array of possible values for the TransparentDataEncryptionStatus const type. +func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus { + return []TransparentDataEncryptionStatus{TransparentDataEncryptionStatusDisabled, TransparentDataEncryptionStatusEnabled} +} + +// Type enumerates the values for type. +type Type string + +const ( + // TypeIntegrationRuntime ... + TypeIntegrationRuntime Type = "IntegrationRuntime" + // TypeManaged ... + TypeManaged Type = "Managed" + // TypeSelfHosted ... + TypeSelfHosted Type = "SelfHosted" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{TypeIntegrationRuntime, TypeManaged, TypeSelfHosted} +} + +// TypeBasicCustomSetupBase enumerates the values for type basic custom setup base. +type TypeBasicCustomSetupBase string + +const ( + // TypeBasicCustomSetupBaseTypeCmdkeySetup ... + TypeBasicCustomSetupBaseTypeCmdkeySetup TypeBasicCustomSetupBase = "CmdkeySetup" + // TypeBasicCustomSetupBaseTypeComponentSetup ... + TypeBasicCustomSetupBaseTypeComponentSetup TypeBasicCustomSetupBase = "ComponentSetup" + // TypeBasicCustomSetupBaseTypeCustomSetupBase ... + TypeBasicCustomSetupBaseTypeCustomSetupBase TypeBasicCustomSetupBase = "CustomSetupBase" + // TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup ... + TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup TypeBasicCustomSetupBase = "EnvironmentVariableSetup" +) + +// PossibleTypeBasicCustomSetupBaseValues returns an array of possible values for the TypeBasicCustomSetupBase const type. +func PossibleTypeBasicCustomSetupBaseValues() []TypeBasicCustomSetupBase { + return []TypeBasicCustomSetupBase{TypeBasicCustomSetupBaseTypeCmdkeySetup, TypeBasicCustomSetupBaseTypeComponentSetup, TypeBasicCustomSetupBaseTypeCustomSetupBase, TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup} +} + +// TypeBasicIntegrationRuntimeStatus enumerates the values for type basic integration runtime status. +type TypeBasicIntegrationRuntimeStatus string + +const ( + // TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus ... + TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus TypeBasicIntegrationRuntimeStatus = "IntegrationRuntimeStatus" + // TypeBasicIntegrationRuntimeStatusTypeManaged ... + TypeBasicIntegrationRuntimeStatusTypeManaged TypeBasicIntegrationRuntimeStatus = "Managed" + // TypeBasicIntegrationRuntimeStatusTypeSelfHosted ... + TypeBasicIntegrationRuntimeStatusTypeSelfHosted TypeBasicIntegrationRuntimeStatus = "SelfHosted" +) + +// PossibleTypeBasicIntegrationRuntimeStatusValues returns an array of possible values for the TypeBasicIntegrationRuntimeStatus const type. +func PossibleTypeBasicIntegrationRuntimeStatusValues() []TypeBasicIntegrationRuntimeStatus { + return []TypeBasicIntegrationRuntimeStatus{TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus, TypeBasicIntegrationRuntimeStatusTypeManaged, TypeBasicIntegrationRuntimeStatusTypeSelfHosted} +} + +// TypeBasicSecretBase enumerates the values for type basic secret base. +type TypeBasicSecretBase string + +const ( + // TypeBasicSecretBaseTypeSecretBase ... + TypeBasicSecretBaseTypeSecretBase TypeBasicSecretBase = "SecretBase" + // TypeBasicSecretBaseTypeSecureString ... + TypeBasicSecretBaseTypeSecureString TypeBasicSecretBase = "SecureString" +) + +// PossibleTypeBasicSecretBaseValues returns an array of possible values for the TypeBasicSecretBase const type. +func PossibleTypeBasicSecretBaseValues() []TypeBasicSecretBase { + return []TypeBasicSecretBase{TypeBasicSecretBaseTypeSecretBase, TypeBasicSecretBaseTypeSecureString} +} + +// TypeBasicSsisObjectMetadata enumerates the values for type basic ssis object metadata. +type TypeBasicSsisObjectMetadata string + +const ( + // TypeBasicSsisObjectMetadataTypeEnvironment ... + TypeBasicSsisObjectMetadataTypeEnvironment TypeBasicSsisObjectMetadata = "Environment" + // TypeBasicSsisObjectMetadataTypeFolder ... + TypeBasicSsisObjectMetadataTypeFolder TypeBasicSsisObjectMetadata = "Folder" + // TypeBasicSsisObjectMetadataTypePackage ... + TypeBasicSsisObjectMetadataTypePackage TypeBasicSsisObjectMetadata = "Package" + // TypeBasicSsisObjectMetadataTypeProject ... + TypeBasicSsisObjectMetadataTypeProject TypeBasicSsisObjectMetadata = "Project" + // TypeBasicSsisObjectMetadataTypeSsisObjectMetadata ... + TypeBasicSsisObjectMetadataTypeSsisObjectMetadata TypeBasicSsisObjectMetadata = "SsisObjectMetadata" +) + +// PossibleTypeBasicSsisObjectMetadataValues returns an array of possible values for the TypeBasicSsisObjectMetadata const type. +func PossibleTypeBasicSsisObjectMetadataValues() []TypeBasicSsisObjectMetadata { + return []TypeBasicSsisObjectMetadata{TypeBasicSsisObjectMetadataTypeEnvironment, TypeBasicSsisObjectMetadataTypeFolder, TypeBasicSsisObjectMetadataTypePackage, TypeBasicSsisObjectMetadataTypeProject, TypeBasicSsisObjectMetadataTypeSsisObjectMetadata} +} + +// VulnerabilityAssessmentPolicyBaselineName enumerates the values for vulnerability assessment policy baseline +// name. +type VulnerabilityAssessmentPolicyBaselineName string + +const ( + // VulnerabilityAssessmentPolicyBaselineNameDefault ... + VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" + // VulnerabilityAssessmentPolicyBaselineNameMaster ... + VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" +) + +// PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns an array of possible values for the VulnerabilityAssessmentPolicyBaselineName const type. +func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName { + return []VulnerabilityAssessmentPolicyBaselineName{VulnerabilityAssessmentPolicyBaselineNameDefault, VulnerabilityAssessmentPolicyBaselineNameMaster} +} + +// VulnerabilityAssessmentScanState enumerates the values for vulnerability assessment scan state. +type VulnerabilityAssessmentScanState string + +const ( + // VulnerabilityAssessmentScanStateFailed ... + VulnerabilityAssessmentScanStateFailed VulnerabilityAssessmentScanState = "Failed" + // VulnerabilityAssessmentScanStateFailedToRun ... + VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = "FailedToRun" + // VulnerabilityAssessmentScanStateInProgress ... + VulnerabilityAssessmentScanStateInProgress VulnerabilityAssessmentScanState = "InProgress" + // VulnerabilityAssessmentScanStatePassed ... + VulnerabilityAssessmentScanStatePassed VulnerabilityAssessmentScanState = "Passed" +) + +// PossibleVulnerabilityAssessmentScanStateValues returns an array of possible values for the VulnerabilityAssessmentScanState const type. +func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentScanState { + return []VulnerabilityAssessmentScanState{VulnerabilityAssessmentScanStateFailed, VulnerabilityAssessmentScanStateFailedToRun, VulnerabilityAssessmentScanStateInProgress, VulnerabilityAssessmentScanStatePassed} +} + +// VulnerabilityAssessmentScanTriggerType enumerates the values for vulnerability assessment scan trigger type. +type VulnerabilityAssessmentScanTriggerType string + +const ( + // VulnerabilityAssessmentScanTriggerTypeOnDemand ... + VulnerabilityAssessmentScanTriggerTypeOnDemand VulnerabilityAssessmentScanTriggerType = "OnDemand" + // VulnerabilityAssessmentScanTriggerTypeRecurring ... + VulnerabilityAssessmentScanTriggerTypeRecurring VulnerabilityAssessmentScanTriggerType = "Recurring" +) + +// PossibleVulnerabilityAssessmentScanTriggerTypeValues returns an array of possible values for the VulnerabilityAssessmentScanTriggerType const type. +func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType { + return []VulnerabilityAssessmentScanTriggerType{VulnerabilityAssessmentScanTriggerTypeOnDemand, VulnerabilityAssessmentScanTriggerTypeRecurring} +} + +// WorkspacePublicNetworkAccess enumerates the values for workspace public network access. +type WorkspacePublicNetworkAccess string + +const ( + // WorkspacePublicNetworkAccessDisabled ... + WorkspacePublicNetworkAccessDisabled WorkspacePublicNetworkAccess = "Disabled" + // WorkspacePublicNetworkAccessEnabled ... + WorkspacePublicNetworkAccessEnabled WorkspacePublicNetworkAccess = "Enabled" +) + +// PossibleWorkspacePublicNetworkAccessValues returns an array of possible values for the WorkspacePublicNetworkAccess const type. +func PossibleWorkspacePublicNetworkAccessValues() []WorkspacePublicNetworkAccess { + return []WorkspacePublicNetworkAccess{WorkspacePublicNetworkAccessDisabled, WorkspacePublicNetworkAccessEnabled} +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/extendedsqlpoolblobauditingpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/extendedsqlpoolblobauditingpolicies.go new file mode 100644 index 000000000000..81aa3d7270bd --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/extendedsqlpoolblobauditingpolicies.go @@ -0,0 +1,342 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// ExtendedSQLPoolBlobAuditingPoliciesClient is the azure Synapse Analytics Management Client +type ExtendedSQLPoolBlobAuditingPoliciesClient struct { + BaseClient +} + +// NewExtendedSQLPoolBlobAuditingPoliciesClient creates an instance of the ExtendedSQLPoolBlobAuditingPoliciesClient +// client. +func NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID string) ExtendedSQLPoolBlobAuditingPoliciesClient { + return NewExtendedSQLPoolBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExtendedSQLPoolBlobAuditingPoliciesClientWithBaseURI creates an instance of the +// ExtendedSQLPoolBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewExtendedSQLPoolBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedSQLPoolBlobAuditingPoliciesClient { + return ExtendedSQLPoolBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an extended Sql pool's blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the extended Sql pool blob auditing policy. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters ExtendedSQLPoolBlobAuditingPolicy) (result ExtendedSQLPoolBlobAuditingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters ExtendedSQLPoolBlobAuditingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}", 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 ExtendedSQLPoolBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ExtendedSQLPoolBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets an extended Sql pool's blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ExtendedSQLPoolBlobAuditingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}", 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 ExtendedSQLPoolBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ExtendedSQLPoolBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySQLPool lists extended auditing settings of a Sql pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) ListBySQLPool(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ExtendedSQLPoolBlobAuditingPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPoliciesClient.ListBySQLPool") + defer func() { + sc := -1 + if result.espbaplr.Response.Response != nil { + sc = result.espbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", err.Error()) + } + + result.fn = client.listBySQLPoolNextResults + req, err := client.ListBySQLPoolPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySQLPoolSender(req) + if err != nil { + result.espbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", resp, "Failure sending request") + return + } + + result.espbaplr, err = client.ListBySQLPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", resp, "Failure responding to request") + return + } + if result.espbaplr.hasNextLink() && result.espbaplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySQLPoolPreparer prepares the ListBySQLPool request. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) ListBySQLPoolPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySQLPoolSender sends the ListBySQLPool request. The method will close the +// http.Response Body if it receives an error. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) ListBySQLPoolSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySQLPoolResponder handles the response to the ListBySQLPool request. The method always +// closes the http.Response Body. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) ListBySQLPoolResponder(resp *http.Response) (result ExtendedSQLPoolBlobAuditingPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySQLPoolNextResults retrieves the next set of results, if any. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) listBySQLPoolNextResults(ctx context.Context, lastResults ExtendedSQLPoolBlobAuditingPolicyListResult) (result ExtendedSQLPoolBlobAuditingPolicyListResult, err error) { + req, err := lastResults.extendedSQLPoolBlobAuditingPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "listBySQLPoolNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySQLPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "listBySQLPoolNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySQLPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.ExtendedSQLPoolBlobAuditingPoliciesClient", "listBySQLPoolNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySQLPoolComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExtendedSQLPoolBlobAuditingPoliciesClient) ListBySQLPoolComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ExtendedSQLPoolBlobAuditingPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPoliciesClient.ListBySQLPool") + 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.ListBySQLPool(ctx, resourceGroupName, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeauthkeys.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeauthkeys.go new file mode 100644 index 000000000000..3672f634c9f1 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeauthkeys.go @@ -0,0 +1,210 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeAuthKeysClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeAuthKeysClient struct { + BaseClient +} + +// NewIntegrationRuntimeAuthKeysClient creates an instance of the IntegrationRuntimeAuthKeysClient client. +func NewIntegrationRuntimeAuthKeysClient(subscriptionID string) IntegrationRuntimeAuthKeysClient { + return NewIntegrationRuntimeAuthKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeAuthKeysClientWithBaseURI creates an instance of the IntegrationRuntimeAuthKeysClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewIntegrationRuntimeAuthKeysClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeAuthKeysClient { + return IntegrationRuntimeAuthKeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list authentication keys in an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimeAuthKeysClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimeAuthKeys, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeAuthKeysClient.List") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeAuthKeysClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeAuthKeysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeAuthKeysClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeAuthKeysClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IntegrationRuntimeAuthKeysClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys", 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 IntegrationRuntimeAuthKeysClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeAuthKeysClient) ListResponder(resp *http.Response) (result IntegrationRuntimeAuthKeys, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Regenerate regenerate the authentication key for an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// regenerateKeyParameters - the parameters for regenerating integration runtime authentication key. +func (client IntegrationRuntimeAuthKeysClient) Regenerate(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, regenerateKeyParameters IntegrationRuntimeRegenerateKeyParameters) (result IntegrationRuntimeAuthKeys, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeAuthKeysClient.Regenerate") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeAuthKeysClient", "Regenerate", err.Error()) + } + + req, err := client.RegeneratePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, regenerateKeyParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeAuthKeysClient", "Regenerate", nil, "Failure preparing request") + return + } + + resp, err := client.RegenerateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeAuthKeysClient", "Regenerate", resp, "Failure sending request") + return + } + + result, err = client.RegenerateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeAuthKeysClient", "Regenerate", resp, "Failure responding to request") + return + } + + return +} + +// RegeneratePreparer prepares the Regenerate request. +func (client IntegrationRuntimeAuthKeysClient) RegeneratePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, regenerateKeyParameters IntegrationRuntimeRegenerateKeyParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey", pathParameters), + autorest.WithJSON(regenerateKeyParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegenerateSender sends the Regenerate request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimeAuthKeysClient) RegenerateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RegenerateResponder handles the response to the Regenerate request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeAuthKeysClient) RegenerateResponder(resp *http.Response) (result IntegrationRuntimeAuthKeys, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeconnectioninfos.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeconnectioninfos.go new file mode 100644 index 000000000000..fddcda29bf6e --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeconnectioninfos.go @@ -0,0 +1,121 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeConnectionInfosClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeConnectionInfosClient struct { + BaseClient +} + +// NewIntegrationRuntimeConnectionInfosClient creates an instance of the IntegrationRuntimeConnectionInfosClient +// client. +func NewIntegrationRuntimeConnectionInfosClient(subscriptionID string) IntegrationRuntimeConnectionInfosClient { + return NewIntegrationRuntimeConnectionInfosClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeConnectionInfosClientWithBaseURI creates an instance of the +// IntegrationRuntimeConnectionInfosClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIntegrationRuntimeConnectionInfosClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeConnectionInfosClient { + return IntegrationRuntimeConnectionInfosClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get connection info for an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimeConnectionInfosClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimeConnectionInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeConnectionInfosClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeConnectionInfosClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeConnectionInfosClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeConnectionInfosClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeConnectionInfosClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IntegrationRuntimeConnectionInfosClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo", 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 IntegrationRuntimeConnectionInfosClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeConnectionInfosClient) GetResponder(resp *http.Response) (result IntegrationRuntimeConnectionInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimecredentials.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimecredentials.go new file mode 100644 index 000000000000..6ff77750fc3d --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimecredentials.go @@ -0,0 +1,122 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeCredentialsClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeCredentialsClient struct { + BaseClient +} + +// NewIntegrationRuntimeCredentialsClient creates an instance of the IntegrationRuntimeCredentialsClient client. +func NewIntegrationRuntimeCredentialsClient(subscriptionID string) IntegrationRuntimeCredentialsClient { + return NewIntegrationRuntimeCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeCredentialsClientWithBaseURI creates an instance of the IntegrationRuntimeCredentialsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewIntegrationRuntimeCredentialsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeCredentialsClient { + return IntegrationRuntimeCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Sync force the integration runtime to synchronize credentials across integration runtime nodes, and this will +// override the credentials across all worker nodes with those available on the dispatcher node. If you already have +// the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime +// node than using this API directly. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimeCredentialsClient) Sync(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeCredentialsClient.Sync") + 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.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeCredentialsClient", "Sync", err.Error()) + } + + req, err := client.SyncPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeCredentialsClient", "Sync", nil, "Failure preparing request") + return + } + + resp, err := client.SyncSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeCredentialsClient", "Sync", resp, "Failure sending request") + return + } + + result, err = client.SyncResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeCredentialsClient", "Sync", resp, "Failure responding to request") + return + } + + return +} + +// SyncPreparer prepares the Sync request. +func (client IntegrationRuntimeCredentialsClient) SyncPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SyncSender sends the Sync request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimeCredentialsClient) SyncSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SyncResponder handles the response to the Sync request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeCredentialsClient) SyncResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimemonitoringdata.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimemonitoringdata.go new file mode 100644 index 000000000000..946e3b9c6a37 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimemonitoringdata.go @@ -0,0 +1,120 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeMonitoringDataClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeMonitoringDataClient struct { + BaseClient +} + +// NewIntegrationRuntimeMonitoringDataClient creates an instance of the IntegrationRuntimeMonitoringDataClient client. +func NewIntegrationRuntimeMonitoringDataClient(subscriptionID string) IntegrationRuntimeMonitoringDataClient { + return NewIntegrationRuntimeMonitoringDataClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeMonitoringDataClientWithBaseURI creates an instance of the +// IntegrationRuntimeMonitoringDataClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIntegrationRuntimeMonitoringDataClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeMonitoringDataClient { + return IntegrationRuntimeMonitoringDataClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List get monitoring data for an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimeMonitoringDataClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimeMonitoringData, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeMonitoringDataClient.List") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeMonitoringDataClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeMonitoringDataClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeMonitoringDataClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeMonitoringDataClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IntegrationRuntimeMonitoringDataClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/monitoringData", 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 IntegrationRuntimeMonitoringDataClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeMonitoringDataClient) ListResponder(resp *http.Response) (result IntegrationRuntimeMonitoringData, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodeipaddress.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodeipaddress.go new file mode 100644 index 000000000000..2fe9e6ed314c --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodeipaddress.go @@ -0,0 +1,122 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeNodeIPAddressClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeNodeIPAddressClient struct { + BaseClient +} + +// NewIntegrationRuntimeNodeIPAddressClient creates an instance of the IntegrationRuntimeNodeIPAddressClient client. +func NewIntegrationRuntimeNodeIPAddressClient(subscriptionID string) IntegrationRuntimeNodeIPAddressClient { + return NewIntegrationRuntimeNodeIPAddressClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeNodeIPAddressClientWithBaseURI creates an instance of the IntegrationRuntimeNodeIPAddressClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewIntegrationRuntimeNodeIPAddressClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeNodeIPAddressClient { + return IntegrationRuntimeNodeIPAddressClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the IP address of an integration runtime node +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// nodeName - integration runtime node name +func (client IntegrationRuntimeNodeIPAddressClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (result IntegrationRuntimeNodeIPAddress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeNodeIPAddressClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeNodeIPAddressClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodeIPAddressClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodeIPAddressClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodeIPAddressClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IntegrationRuntimeNodeIPAddressClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "nodeName": autorest.Encode("path", nodeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress", 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 IntegrationRuntimeNodeIPAddressClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeNodeIPAddressClient) GetResponder(resp *http.Response) (result IntegrationRuntimeNodeIPAddress, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodes.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodes.go new file mode 100644 index 000000000000..49256ca8e128 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimenodes.go @@ -0,0 +1,302 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeNodesClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeNodesClient struct { + BaseClient +} + +// NewIntegrationRuntimeNodesClient creates an instance of the IntegrationRuntimeNodesClient client. +func NewIntegrationRuntimeNodesClient(subscriptionID string) IntegrationRuntimeNodesClient { + return NewIntegrationRuntimeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeNodesClientWithBaseURI creates an instance of the IntegrationRuntimeNodesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewIntegrationRuntimeNodesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeNodesClient { + return IntegrationRuntimeNodesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete delete an integration runtime node +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// nodeName - integration runtime node name +func (client IntegrationRuntimeNodesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeNodesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeNodesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IntegrationRuntimeNodesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "nodeName": autorest.Encode("path", nodeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}", 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 IntegrationRuntimeNodesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeNodesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get an integration runtime node +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// nodeName - integration runtime node name +func (client IntegrationRuntimeNodesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (result SelfHostedIntegrationRuntimeNode, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeNodesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeNodesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IntegrationRuntimeNodesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "nodeName": autorest.Encode("path", nodeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}", 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 IntegrationRuntimeNodesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeNodesClient) GetResponder(resp *http.Response) (result SelfHostedIntegrationRuntimeNode, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update create an integration runtime node +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// nodeName - integration runtime node name +// updateIntegrationRuntimeNodeRequest - the parameters for updating an integration runtime node. +func (client IntegrationRuntimeNodesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest UpdateIntegrationRuntimeNodeRequest) (result SelfHostedIntegrationRuntimeNode, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeNodesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeNodesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeNodesClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client IntegrationRuntimeNodesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest UpdateIntegrationRuntimeNodeRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "nodeName": autorest.Encode("path", nodeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}", pathParameters), + autorest.WithJSON(updateIntegrationRuntimeNodeRequest), + 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 IntegrationRuntimeNodesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeNodesClient) UpdateResponder(resp *http.Response) (result SelfHostedIntegrationRuntimeNode, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeobjectmetadata.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeobjectmetadata.go new file mode 100644 index 000000000000..4fef9d469300 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimeobjectmetadata.go @@ -0,0 +1,215 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeObjectMetadataClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeObjectMetadataClient struct { + BaseClient +} + +// NewIntegrationRuntimeObjectMetadataClient creates an instance of the IntegrationRuntimeObjectMetadataClient client. +func NewIntegrationRuntimeObjectMetadataClient(subscriptionID string) IntegrationRuntimeObjectMetadataClient { + return NewIntegrationRuntimeObjectMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeObjectMetadataClientWithBaseURI creates an instance of the +// IntegrationRuntimeObjectMetadataClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIntegrationRuntimeObjectMetadataClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeObjectMetadataClient { + return IntegrationRuntimeObjectMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List get object metadata from an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// getMetadataRequest - the parameters for getting a SSIS object metadata. +func (client IntegrationRuntimeObjectMetadataClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, getMetadataRequest *GetSsisObjectMetadataRequest) (result SsisObjectMetadataListResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeObjectMetadataClient.List") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeObjectMetadataClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, getMetadataRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IntegrationRuntimeObjectMetadataClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, getMetadataRequest *GetSsisObjectMetadataRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if getMetadataRequest != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(getMetadataRequest)) + } + 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 IntegrationRuntimeObjectMetadataClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeObjectMetadataClient) ListResponder(resp *http.Response) (result SsisObjectMetadataListResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Refresh refresh the object metadata in an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimeObjectMetadataClient) Refresh(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimeObjectMetadataRefreshFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeObjectMetadataClient.Refresh") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeObjectMetadataClient", "Refresh", err.Error()) + } + + req, err := client.RefreshPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataClient", "Refresh", nil, "Failure preparing request") + return + } + + result, err = client.RefreshSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataClient", "Refresh", nil, "Failure sending request") + return + } + + return +} + +// RefreshPreparer prepares the Refresh request. +func (client IntegrationRuntimeObjectMetadataClient) RefreshPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata", 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 IntegrationRuntimeObjectMetadataClient) RefreshSender(req *http.Request) (future IntegrationRuntimeObjectMetadataRefreshFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RefreshResponder handles the response to the Refresh request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeObjectMetadataClient) RefreshResponder(resp *http.Response) (result SsisObjectMetadataStatusResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimes.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimes.go new file mode 100644 index 000000000000..ec7b794ab637 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimes.go @@ -0,0 +1,1056 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimesClient is the azure Synapse Analytics Management Client +type IntegrationRuntimesClient struct { + BaseClient +} + +// NewIntegrationRuntimesClient creates an instance of the IntegrationRuntimesClient client. +func NewIntegrationRuntimesClient(subscriptionID string) IntegrationRuntimesClient { + return NewIntegrationRuntimesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimesClientWithBaseURI creates an instance of the IntegrationRuntimesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewIntegrationRuntimesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimesClient { + return IntegrationRuntimesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// integrationRuntime - integration runtime resource definition. +// ifMatch - eTag of the integration runtime entity. Should only be specified for update, for which it should +// match existing entity or can be * for unconditional update. +func (client IntegrationRuntimesClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, ifMatch string) (result IntegrationRuntimesCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntime, ifMatch) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client IntegrationRuntimesClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, ifMatch string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", pathParameters), + autorest.WithJSON(integrationRuntime), + autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } + 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 IntegrationRuntimesClient) CreateSender(req *http.Request) (future IntegrationRuntimesCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) CreateResponder(resp *http.Response) (result IntegrationRuntimeResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IntegrationRuntimesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", 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 IntegrationRuntimesClient) DeleteSender(req *http.Request) (future IntegrationRuntimesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisableInteractiveQuery disable interactive query in integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) DisableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimesDisableInteractiveQueryFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.DisableInteractiveQuery") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "DisableInteractiveQuery", err.Error()) + } + + req, err := client.DisableInteractiveQueryPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "DisableInteractiveQuery", nil, "Failure preparing request") + return + } + + result, err = client.DisableInteractiveQuerySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "DisableInteractiveQuery", nil, "Failure sending request") + return + } + + return +} + +// DisableInteractiveQueryPreparer prepares the DisableInteractiveQuery request. +func (client IntegrationRuntimesClient) DisableInteractiveQueryPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/disableInteractiveQuery", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableInteractiveQuerySender sends the DisableInteractiveQuery request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) DisableInteractiveQuerySender(req *http.Request) (future IntegrationRuntimesDisableInteractiveQueryFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DisableInteractiveQueryResponder handles the response to the DisableInteractiveQuery request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) DisableInteractiveQueryResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableInteractiveQuery enable interactive query in integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) EnableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimesEnableInteractiveQueryFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.EnableInteractiveQuery") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "EnableInteractiveQuery", err.Error()) + } + + req, err := client.EnableInteractiveQueryPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "EnableInteractiveQuery", nil, "Failure preparing request") + return + } + + result, err = client.EnableInteractiveQuerySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "EnableInteractiveQuery", nil, "Failure sending request") + return + } + + return +} + +// EnableInteractiveQueryPreparer prepares the EnableInteractiveQuery request. +func (client IntegrationRuntimesClient) EnableInteractiveQueryPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableInteractiveQuery", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableInteractiveQuerySender sends the EnableInteractiveQuery request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) EnableInteractiveQuerySender(req *http.Request) (future IntegrationRuntimesEnableInteractiveQueryFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// EnableInteractiveQueryResponder handles the response to the EnableInteractiveQuery request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) EnableInteractiveQueryResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// ifNoneMatch - eTag of the integration runtime entity. Should only be specified for get. If the ETag matches +// the existing entity tag, or if * was provided, then no content will be returned. +func (client IntegrationRuntimesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, ifNoneMatch string) (result IntegrationRuntimeResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, ifNoneMatch) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IntegrationRuntimesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, ifNoneMatch string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if len(ifNoneMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch))) + } + 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 IntegrationRuntimesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) GetResponder(resp *http.Response) (result IntegrationRuntimeResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotModified), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace list all integration runtimes +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +func (client IntegrationRuntimesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result IntegrationRuntimeListResponsePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.ListByWorkspace") + defer func() { + sc := -1 + if result.irlr.Response.Response != nil { + sc = result.irlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.irlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.irlr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.irlr.hasNextLink() && result.irlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client IntegrationRuntimesClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) ListByWorkspaceResponder(resp *http.Response) (result IntegrationRuntimeListResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client IntegrationRuntimesClient) listByWorkspaceNextResults(ctx context.Context, lastResults IntegrationRuntimeListResponse) (result IntegrationRuntimeListResponse, err error) { + req, err := lastResults.integrationRuntimeListResponsePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client IntegrationRuntimesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result IntegrationRuntimeListResponseIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} + +// ListOutboundNetworkDependenciesEndpoints gets the list of outbound network dependencies for a given Azure-SSIS +// integration runtime. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "ListOutboundNetworkDependenciesEndpoints", err.Error()) + } + + req, err := client.ListOutboundNetworkDependenciesEndpointsPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "ListOutboundNetworkDependenciesEndpoints", nil, "Failure preparing request") + return + } + + resp, err := client.ListOutboundNetworkDependenciesEndpointsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "ListOutboundNetworkDependenciesEndpoints", resp, "Failure sending request") + return + } + + result, err = client.ListOutboundNetworkDependenciesEndpointsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "ListOutboundNetworkDependenciesEndpoints", resp, "Failure responding to request") + return + } + + return +} + +// ListOutboundNetworkDependenciesEndpointsPreparer prepares the ListOutboundNetworkDependenciesEndpoints request. +func (client IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpointsPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/outboundNetworkDependenciesEndpoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOutboundNetworkDependenciesEndpointsSender sends the ListOutboundNetworkDependenciesEndpoints request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpointsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListOutboundNetworkDependenciesEndpointsResponder handles the response to the ListOutboundNetworkDependenciesEndpoints request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpointsResponder(resp *http.Response) (result IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Start start an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) Start(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimesStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Start") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Start", err.Error()) + } + + req, err := client.StartPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Start", nil, "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client IntegrationRuntimesClient) StartPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartSender sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) StartSender(req *http.Request) (future IntegrationRuntimesStartFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) StartResponder(resp *http.Response) (result IntegrationRuntimeStatusResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Stop stop an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) Stop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimesStopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Stop") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Stop", err.Error()) + } + + req, err := client.StopPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Stop", nil, "Failure preparing request") + return + } + + result, err = client.StopSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Stop", nil, "Failure sending request") + return + } + + return +} + +// StopPreparer prepares the Stop request. +func (client IntegrationRuntimesClient) StopPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopSender sends the Stop request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) StopSender(req *http.Request) (future IntegrationRuntimesStopFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// StopResponder handles the response to the Stop request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update update an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +// updateIntegrationRuntimeRequest - the parameters for updating an integration runtime. +func (client IntegrationRuntimesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, updateIntegrationRuntimeRequest UpdateIntegrationRuntimeRequest) (result IntegrationRuntimeResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName, updateIntegrationRuntimeRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client IntegrationRuntimesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, updateIntegrationRuntimeRequest UpdateIntegrationRuntimeRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", pathParameters), + autorest.WithJSON(updateIntegrationRuntimeRequest), + 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 IntegrationRuntimesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) UpdateResponder(resp *http.Response) (result IntegrationRuntimeResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Upgrade upgrade an integration runtime +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimesClient) Upgrade(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Upgrade") + 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.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimesClient", "Upgrade", err.Error()) + } + + req, err := client.UpgradePreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Upgrade", nil, "Failure preparing request") + return + } + + resp, err := client.UpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Upgrade", resp, "Failure sending request") + return + } + + result, err = client.UpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Upgrade", resp, "Failure responding to request") + return + } + + return +} + +// UpgradePreparer prepares the Upgrade request. +func (client IntegrationRuntimesClient) UpgradePreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpgradeSender sends the Upgrade request. The method will close the +// http.Response Body if it receives an error. +func (client IntegrationRuntimesClient) UpgradeSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpgradeResponder handles the response to the Upgrade request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimesClient) UpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimestatus.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimestatus.go new file mode 100644 index 000000000000..fa9f754b4912 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/integrationruntimestatus.go @@ -0,0 +1,120 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IntegrationRuntimeStatusClient is the azure Synapse Analytics Management Client +type IntegrationRuntimeStatusClient struct { + BaseClient +} + +// NewIntegrationRuntimeStatusClient creates an instance of the IntegrationRuntimeStatusClient client. +func NewIntegrationRuntimeStatusClient(subscriptionID string) IntegrationRuntimeStatusClient { + return NewIntegrationRuntimeStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIntegrationRuntimeStatusClientWithBaseURI creates an instance of the IntegrationRuntimeStatusClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewIntegrationRuntimeStatusClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeStatusClient { + return IntegrationRuntimeStatusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the integration runtime status +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// integrationRuntimeName - integration runtime name +func (client IntegrationRuntimeStatusClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimeStatusResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeStatusClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IntegrationRuntimeStatusClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, integrationRuntimeName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeStatusClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeStatusClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeStatusClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IntegrationRuntimeStatusClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationRuntimeName": autorest.Encode("path", integrationRuntimeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getStatus", 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 IntegrationRuntimeStatusClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IntegrationRuntimeStatusClient) GetResponder(resp *http.Response) (result IntegrationRuntimeStatusResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/ipfirewallrules.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/ipfirewallrules.go new file mode 100644 index 000000000000..c7a6b4a9edb0 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/ipfirewallrules.go @@ -0,0 +1,517 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// IPFirewallRulesClient is the azure Synapse Analytics Management Client +type IPFirewallRulesClient struct { + BaseClient +} + +// NewIPFirewallRulesClient creates an instance of the IPFirewallRulesClient client. +func NewIPFirewallRulesClient(subscriptionID string) IPFirewallRulesClient { + return NewIPFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIPFirewallRulesClientWithBaseURI creates an instance of the IPFirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIPFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) IPFirewallRulesClient { + return IPFirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a firewall rule +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// ruleName - the IP firewall rule name +// IPFirewallRuleInfo - IP firewall rule properties +func (client IPFirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, IPFirewallRuleInfo IPFirewallRuleInfo) (result IPFirewallRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IPFirewallRulesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, ruleName, IPFirewallRuleInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client IPFirewallRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, IPFirewallRuleInfo IPFirewallRuleInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/firewallRules/{ruleName}", pathParameters), + autorest.WithJSON(IPFirewallRuleInfo), + 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 IPFirewallRulesClient) CreateOrUpdateSender(req *http.Request) (future IPFirewallRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client IPFirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (result IPFirewallRuleInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a firewall rule +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// ruleName - the IP firewall rule name +func (client IPFirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string) (result IPFirewallRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IPFirewallRulesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, ruleName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IPFirewallRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/firewallRules/{ruleName}", 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 IPFirewallRulesClient) DeleteSender(req *http.Request) (future IPFirewallRulesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IPFirewallRulesClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a firewall rule +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// ruleName - the IP firewall rule name +func (client IPFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string) (result IPFirewallRuleInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRulesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IPFirewallRulesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, ruleName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IPFirewallRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/firewallRules/{ruleName}", 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 IPFirewallRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IPFirewallRulesClient) GetResponder(resp *http.Response) (result IPFirewallRuleInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace returns a list of firewall rules +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client IPFirewallRulesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result IPFirewallRuleInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRulesClient.ListByWorkspace") + defer func() { + sc := -1 + if result.ifrilr.Response.Response != nil { + sc = result.ifrilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IPFirewallRulesClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.ifrilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.ifrilr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.ifrilr.hasNextLink() && result.ifrilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client IPFirewallRulesClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/firewallRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client IPFirewallRulesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client IPFirewallRulesClient) ListByWorkspaceResponder(resp *http.Response) (result IPFirewallRuleInfoListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client IPFirewallRulesClient) listByWorkspaceNextResults(ctx context.Context, lastResults IPFirewallRuleInfoListResult) (result IPFirewallRuleInfoListResult, err error) { + req, err := lastResults.iPFirewallRuleInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPFirewallRulesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result IPFirewallRuleInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRulesClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} + +// ReplaceAll replaces firewall rules +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// request - replace all IP firewall rules request +func (client IPFirewallRulesClient) ReplaceAll(ctx context.Context, resourceGroupName string, workspaceName string, request ReplaceAllIPFirewallRulesRequest) (result IPFirewallRulesReplaceAllFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRulesClient.ReplaceAll") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.IPFirewallRulesClient", "ReplaceAll", err.Error()) + } + + req, err := client.ReplaceAllPreparer(ctx, resourceGroupName, workspaceName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "ReplaceAll", nil, "Failure preparing request") + return + } + + result, err = client.ReplaceAllSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesClient", "ReplaceAll", nil, "Failure sending request") + return + } + + return +} + +// ReplaceAllPreparer prepares the ReplaceAll request. +func (client IPFirewallRulesClient) ReplaceAllPreparer(ctx context.Context, resourceGroupName string, workspaceName string, request ReplaceAllIPFirewallRulesRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/replaceAllIpFirewallRules", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReplaceAllSender sends the ReplaceAll request. The method will close the +// http.Response Body if it receives an error. +func (client IPFirewallRulesClient) ReplaceAllSender(req *http.Request) (future IPFirewallRulesReplaceAllFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ReplaceAllResponder handles the response to the ReplaceAll request. The method always +// closes the http.Response Body. +func (client IPFirewallRulesClient) ReplaceAllResponder(resp *http.Response) (result ReplaceAllFirewallRulesOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/keys.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/keys.go new file mode 100644 index 000000000000..c6d39f9021f9 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/keys.go @@ -0,0 +1,423 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// KeysClient is the azure Synapse Analytics Management Client +type KeysClient struct { + BaseClient +} + +// NewKeysClient creates an instance of the KeysClient client. +func NewKeysClient(subscriptionID string) KeysClient { + return NewKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewKeysClientWithBaseURI creates an instance of the KeysClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewKeysClientWithBaseURI(baseURI string, subscriptionID string) KeysClient { + return KeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a workspace key +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// keyName - the name of the workspace key +// keyProperties - key put request properties +func (client KeysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, keyProperties Key) (result Key, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeysClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.KeysClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, keyName, keyProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client KeysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, keyProperties Key) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/keys/{keyName}", pathParameters), + autorest.WithJSON(keyProperties), + 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 KeysClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client KeysClient) CreateOrUpdateResponder(resp *http.Response) (result Key, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a workspace key +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// keyName - the name of the workspace key +func (client KeysClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, keyName string) (result Key, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeysClient.Delete") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.KeysClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, keyName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client KeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, keyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/keys/{keyName}", 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 KeysClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client KeysClient) DeleteResponder(resp *http.Response) (result Key, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a workspace key +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// keyName - the name of the workspace key +func (client KeysClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, keyName string) (result Key, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeysClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.KeysClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, keyName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client KeysClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, keyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/keys/{keyName}", 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 KeysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client KeysClient) GetResponder(resp *http.Response) (result Key, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace returns a list of keys in a workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client KeysClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result KeyInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeysClient.ListByWorkspace") + defer func() { + sc := -1 + if result.kilr.Response.Response != nil { + sc = result.kilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.KeysClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.kilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.kilr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.kilr.hasNextLink() && result.kilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client KeysClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/keys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client KeysClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client KeysClient) ListByWorkspaceResponder(resp *http.Response) (result KeyInfoListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client KeysClient) listByWorkspaceNextResults(ctx context.Context, lastResults KeyInfoListResult) (result KeyInfoListResult, err error) { + req, err := lastResults.keyInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.KeysClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.KeysClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.KeysClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client KeysClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result KeyInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeysClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/libraries.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/libraries.go new file mode 100644 index 000000000000..9cd6d79a82f7 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/libraries.go @@ -0,0 +1,159 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LibrariesClient is the azure Synapse Analytics Management Client +type LibrariesClient struct { + BaseClient +} + +// NewLibrariesClient creates an instance of the LibrariesClient client. +func NewLibrariesClient(subscriptionID string) LibrariesClient { + return NewLibrariesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLibrariesClientWithBaseURI creates an instance of the LibrariesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLibrariesClientWithBaseURI(baseURI string, subscriptionID string) LibrariesClient { + return LibrariesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByWorkspace list libraries in a workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client LibrariesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result LibraryListResponsePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LibrariesClient.ListByWorkspace") + defer func() { + sc := -1 + if result.llr.Response.Response != nil { + sc = result.llr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.LibrariesClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.LibrariesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.llr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.LibrariesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.llr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.LibrariesClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.llr.hasNextLink() && result.llr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client LibrariesClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/libraries", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client LibrariesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client LibrariesClient) ListByWorkspaceResponder(resp *http.Response) (result LibraryListResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client LibrariesClient) listByWorkspaceNextResults(ctx context.Context, lastResults LibraryListResponse) (result LibraryListResponse, err error) { + req, err := lastResults.libraryListResponsePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.LibrariesClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.LibrariesClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.LibrariesClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client LibrariesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result LibraryListResponseIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LibrariesClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/library.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/library.go new file mode 100644 index 000000000000..2b89ef8a5491 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/library.go @@ -0,0 +1,119 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// LibraryClient is the azure Synapse Analytics Management Client +type LibraryClient struct { + BaseClient +} + +// NewLibraryClient creates an instance of the LibraryClient client. +func NewLibraryClient(subscriptionID string) LibraryClient { + return NewLibraryClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLibraryClientWithBaseURI creates an instance of the LibraryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLibraryClientWithBaseURI(baseURI string, subscriptionID string) LibraryClient { + return LibraryClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get library by name in a workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// libraryName - library name +// workspaceName - the name of the workspace +func (client LibraryClient) Get(ctx context.Context, resourceGroupName string, libraryName string, workspaceName string) (result LibraryResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LibraryClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.LibraryClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, libraryName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.LibraryClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.LibraryClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.LibraryClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LibraryClient) GetPreparer(ctx context.Context, resourceGroupName string, libraryName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "libraryName": autorest.Encode("path", libraryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/libraries/{libraryName}", 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 LibraryClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LibraryClient) GetResponder(resp *http.Response) (result LibraryResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/models.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/models.go new file mode 100644 index 000000000000..9775cd7f7469 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/models.go @@ -0,0 +1,17006 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" + "github.com/gofrs/uuid" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2021-06-01-preview/synapse" + +// AadAdminProperties workspace active directory administrator properties +type AadAdminProperties struct { + // TenantID - Tenant ID of the workspace active directory administrator + TenantID *string `json:"tenantId,omitempty"` + // Login - Login of the workspace active directory administrator + Login *string `json:"login,omitempty"` + // AdministratorType - Workspace active directory administrator type + AdministratorType *string `json:"administratorType,omitempty"` + // Sid - Object ID of the workspace active directory administrator + Sid *string `json:"sid,omitempty"` +} + +// AutoPauseProperties auto-pausing properties of a Big Data pool powered by Apache Spark +type AutoPauseProperties struct { + // DelayInMinutes - Number of minutes of idle time before the Big Data pool is automatically paused. + DelayInMinutes *int32 `json:"delayInMinutes,omitempty"` + // Enabled - Whether auto-pausing is enabled for the Big Data pool. + Enabled *bool `json:"enabled,omitempty"` +} + +// AutoScaleProperties auto-scaling properties of a Big Data pool powered by Apache Spark +type AutoScaleProperties struct { + // MinNodeCount - The minimum number of nodes the Big Data pool can support. + MinNodeCount *int32 `json:"minNodeCount,omitempty"` + // Enabled - Whether automatic scaling is enabled for the Big Data pool. + Enabled *bool `json:"enabled,omitempty"` + // MaxNodeCount - The maximum number of nodes the Big Data pool can support. + MaxNodeCount *int32 `json:"maxNodeCount,omitempty"` +} + +// AvailableRpOperation an operation that is available in this resource provider +type AvailableRpOperation struct { + // Display - Display properties of the operation + Display *AvailableRpOperationDisplayInfo `json:"display,omitempty"` + // IsDataAction - Whether this operation is a data action + IsDataAction *string `json:"isDataAction,omitempty"` + // Name - Operation name + Name *string `json:"name,omitempty"` + // OperationMetaPropertyInfo - Operation properties + *OperationMetaPropertyInfo `json:"properties,omitempty"` + // Origin - Operation origin + Origin *string `json:"origin,omitempty"` +} + +// MarshalJSON is the custom marshaler for AvailableRpOperation. +func (aro AvailableRpOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aro.Display != nil { + objectMap["display"] = aro.Display + } + if aro.IsDataAction != nil { + objectMap["isDataAction"] = aro.IsDataAction + } + if aro.Name != nil { + objectMap["name"] = aro.Name + } + if aro.OperationMetaPropertyInfo != nil { + objectMap["properties"] = aro.OperationMetaPropertyInfo + } + if aro.Origin != nil { + objectMap["origin"] = aro.Origin + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AvailableRpOperation struct. +func (aro *AvailableRpOperation) 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 "display": + if v != nil { + var display AvailableRpOperationDisplayInfo + err = json.Unmarshal(*v, &display) + if err != nil { + return err + } + aro.Display = &display + } + case "isDataAction": + if v != nil { + var isDataAction string + err = json.Unmarshal(*v, &isDataAction) + if err != nil { + return err + } + aro.IsDataAction = &isDataAction + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + aro.Name = &name + } + case "properties": + if v != nil { + var operationMetaPropertyInfo OperationMetaPropertyInfo + err = json.Unmarshal(*v, &operationMetaPropertyInfo) + if err != nil { + return err + } + aro.OperationMetaPropertyInfo = &operationMetaPropertyInfo + } + case "origin": + if v != nil { + var origin string + err = json.Unmarshal(*v, &origin) + if err != nil { + return err + } + aro.Origin = &origin + } + } + } + + return nil +} + +// AvailableRpOperationDisplayInfo description of an available operation +type AvailableRpOperationDisplayInfo struct { + // Description - Operation description + Description *string `json:"description,omitempty"` + // Resource - Resource type + Resource *string `json:"resource,omitempty"` + // Provider - Resource provider name + Provider *string `json:"provider,omitempty"` + // Operation - Operation name + Operation *string `json:"operation,omitempty"` +} + +// AzureADOnlyAuthentication azure Active Directory Only Authentication Info +type AzureADOnlyAuthentication struct { + autorest.Response `json:"-"` + // AzureADOnlyAuthenticationProperties - Azure Active Directory Only Authentication resource properties + *AzureADOnlyAuthenticationProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureADOnlyAuthentication. +func (aaoa AzureADOnlyAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aaoa.AzureADOnlyAuthenticationProperties != nil { + objectMap["properties"] = aaoa.AzureADOnlyAuthenticationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AzureADOnlyAuthentication struct. +func (aaoa *AzureADOnlyAuthentication) 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 azureADOnlyAuthenticationProperties AzureADOnlyAuthenticationProperties + err = json.Unmarshal(*v, &azureADOnlyAuthenticationProperties) + if err != nil { + return err + } + aaoa.AzureADOnlyAuthenticationProperties = &azureADOnlyAuthenticationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + aaoa.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + aaoa.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + aaoa.Type = &typeVar + } + } + } + + return nil +} + +// AzureADOnlyAuthenticationListResult a list of Azure Active Directory only authentications. +type AzureADOnlyAuthenticationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]AzureADOnlyAuthentication `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureADOnlyAuthenticationListResult. +func (aaoalr AzureADOnlyAuthenticationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AzureADOnlyAuthenticationListResultIterator provides access to a complete listing of +// AzureADOnlyAuthentication values. +type AzureADOnlyAuthenticationListResultIterator struct { + i int + page AzureADOnlyAuthenticationListResultPage +} + +// 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 *AzureADOnlyAuthenticationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationListResultIterator.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 *AzureADOnlyAuthenticationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AzureADOnlyAuthenticationListResultIterator) 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 AzureADOnlyAuthenticationListResultIterator) Response() AzureADOnlyAuthenticationListResult { + 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 AzureADOnlyAuthenticationListResultIterator) Value() AzureADOnlyAuthentication { + if !iter.page.NotDone() { + return AzureADOnlyAuthentication{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AzureADOnlyAuthenticationListResultIterator type. +func NewAzureADOnlyAuthenticationListResultIterator(page AzureADOnlyAuthenticationListResultPage) AzureADOnlyAuthenticationListResultIterator { + return AzureADOnlyAuthenticationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aaoalr AzureADOnlyAuthenticationListResult) IsEmpty() bool { + return aaoalr.Value == nil || len(*aaoalr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (aaoalr AzureADOnlyAuthenticationListResult) hasNextLink() bool { + return aaoalr.NextLink != nil && len(*aaoalr.NextLink) != 0 +} + +// azureADOnlyAuthenticationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aaoalr AzureADOnlyAuthenticationListResult) azureADOnlyAuthenticationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !aaoalr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aaoalr.NextLink))) +} + +// AzureADOnlyAuthenticationListResultPage contains a page of AzureADOnlyAuthentication values. +type AzureADOnlyAuthenticationListResultPage struct { + fn func(context.Context, AzureADOnlyAuthenticationListResult) (AzureADOnlyAuthenticationListResult, error) + aaoalr AzureADOnlyAuthenticationListResult +} + +// 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 *AzureADOnlyAuthenticationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.aaoalr) + if err != nil { + return err + } + page.aaoalr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *AzureADOnlyAuthenticationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AzureADOnlyAuthenticationListResultPage) NotDone() bool { + return !page.aaoalr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AzureADOnlyAuthenticationListResultPage) Response() AzureADOnlyAuthenticationListResult { + return page.aaoalr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AzureADOnlyAuthenticationListResultPage) Values() []AzureADOnlyAuthentication { + if page.aaoalr.IsEmpty() { + return nil + } + return *page.aaoalr.Value +} + +// Creates a new instance of the AzureADOnlyAuthenticationListResultPage type. +func NewAzureADOnlyAuthenticationListResultPage(cur AzureADOnlyAuthenticationListResult, getNextPage func(context.Context, AzureADOnlyAuthenticationListResult) (AzureADOnlyAuthenticationListResult, error)) AzureADOnlyAuthenticationListResultPage { + return AzureADOnlyAuthenticationListResultPage{ + fn: getNextPage, + aaoalr: cur, + } +} + +// AzureADOnlyAuthenticationProperties azure Active Directory Only Authentication properties +type AzureADOnlyAuthenticationProperties struct { + // AzureADOnlyAuthentication - Azure Active Directory Only Authentication enabled + AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` + // State - READ-ONLY; Azure Active Directory Only Authentication configuration state. Possible values include: 'AuthenticationStateConsistent', 'AuthenticationStateInConsistent', 'AuthenticationStateUpdating' + State AuthenticationState `json:"state,omitempty"` + // CreationDate - READ-ONLY; property configuration date + CreationDate *date.Time `json:"creationDate,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureADOnlyAuthenticationProperties. +func (aaoap AzureADOnlyAuthenticationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aaoap.AzureADOnlyAuthentication != nil { + objectMap["azureADOnlyAuthentication"] = aaoap.AzureADOnlyAuthentication + } + return json.Marshal(objectMap) +} + +// AzureADOnlyAuthenticationsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AzureADOnlyAuthenticationsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AzureADOnlyAuthenticationsClient) (AzureADOnlyAuthentication, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AzureADOnlyAuthenticationsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AzureADOnlyAuthenticationsCreateFuture.Result. +func (future *AzureADOnlyAuthenticationsCreateFuture) result(client AzureADOnlyAuthenticationsClient) (aaoa AzureADOnlyAuthentication, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + aaoa.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.AzureADOnlyAuthenticationsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if aaoa.Response.Response, err = future.GetResult(sender); err == nil && aaoa.Response.Response.StatusCode != http.StatusNoContent { + aaoa, err = client.CreateResponder(aaoa.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsCreateFuture", "Result", aaoa.Response.Response, "Failure responding to request") + } + } + return +} + +// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. +type AzureEntityResource struct { + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureEntityResource. +func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BigDataPoolPatchInfo properties patch for a Big Data pool +type BigDataPoolPatchInfo struct { + // Tags - Updated tags for the Big Data pool + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for BigDataPoolPatchInfo. +func (bdppi BigDataPoolPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bdppi.Tags != nil { + objectMap["tags"] = bdppi.Tags + } + return json.Marshal(objectMap) +} + +// BigDataPoolResourceInfo a Big Data pool +type BigDataPoolResourceInfo struct { + autorest.Response `json:"-"` + // BigDataPoolResourceProperties - Big Data pool properties + *BigDataPoolResourceProperties `json:"properties,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for BigDataPoolResourceInfo. +func (bdpri BigDataPoolResourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bdpri.BigDataPoolResourceProperties != nil { + objectMap["properties"] = bdpri.BigDataPoolResourceProperties + } + if bdpri.Tags != nil { + objectMap["tags"] = bdpri.Tags + } + if bdpri.Location != nil { + objectMap["location"] = bdpri.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BigDataPoolResourceInfo struct. +func (bdpri *BigDataPoolResourceInfo) 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 bigDataPoolResourceProperties BigDataPoolResourceProperties + err = json.Unmarshal(*v, &bigDataPoolResourceProperties) + if err != nil { + return err + } + bdpri.BigDataPoolResourceProperties = &bigDataPoolResourceProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bdpri.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bdpri.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bdpri.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bdpri.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bdpri.Type = &typeVar + } + } + } + + return nil +} + +// BigDataPoolResourceInfoListResult collection of Big Data pool information +type BigDataPoolResourceInfoListResult struct { + autorest.Response `json:"-"` + // NextLink - Link to the next page of results + NextLink *string `json:"nextLink,omitempty"` + // Value - List of Big Data pools + Value *[]BigDataPoolResourceInfo `json:"value,omitempty"` +} + +// BigDataPoolResourceInfoListResultIterator provides access to a complete listing of +// BigDataPoolResourceInfo values. +type BigDataPoolResourceInfoListResultIterator struct { + i int + page BigDataPoolResourceInfoListResultPage +} + +// 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 *BigDataPoolResourceInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolResourceInfoListResultIterator.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 *BigDataPoolResourceInfoListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BigDataPoolResourceInfoListResultIterator) 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 BigDataPoolResourceInfoListResultIterator) Response() BigDataPoolResourceInfoListResult { + 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 BigDataPoolResourceInfoListResultIterator) Value() BigDataPoolResourceInfo { + if !iter.page.NotDone() { + return BigDataPoolResourceInfo{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BigDataPoolResourceInfoListResultIterator type. +func NewBigDataPoolResourceInfoListResultIterator(page BigDataPoolResourceInfoListResultPage) BigDataPoolResourceInfoListResultIterator { + return BigDataPoolResourceInfoListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (bdprilr BigDataPoolResourceInfoListResult) IsEmpty() bool { + return bdprilr.Value == nil || len(*bdprilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (bdprilr BigDataPoolResourceInfoListResult) hasNextLink() bool { + return bdprilr.NextLink != nil && len(*bdprilr.NextLink) != 0 +} + +// bigDataPoolResourceInfoListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bdprilr BigDataPoolResourceInfoListResult) bigDataPoolResourceInfoListResultPreparer(ctx context.Context) (*http.Request, error) { + if !bdprilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bdprilr.NextLink))) +} + +// BigDataPoolResourceInfoListResultPage contains a page of BigDataPoolResourceInfo values. +type BigDataPoolResourceInfoListResultPage struct { + fn func(context.Context, BigDataPoolResourceInfoListResult) (BigDataPoolResourceInfoListResult, error) + bdprilr BigDataPoolResourceInfoListResult +} + +// 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 *BigDataPoolResourceInfoListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolResourceInfoListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.bdprilr) + if err != nil { + return err + } + page.bdprilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *BigDataPoolResourceInfoListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BigDataPoolResourceInfoListResultPage) NotDone() bool { + return !page.bdprilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BigDataPoolResourceInfoListResultPage) Response() BigDataPoolResourceInfoListResult { + return page.bdprilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BigDataPoolResourceInfoListResultPage) Values() []BigDataPoolResourceInfo { + if page.bdprilr.IsEmpty() { + return nil + } + return *page.bdprilr.Value +} + +// Creates a new instance of the BigDataPoolResourceInfoListResultPage type. +func NewBigDataPoolResourceInfoListResultPage(cur BigDataPoolResourceInfoListResult, getNextPage func(context.Context, BigDataPoolResourceInfoListResult) (BigDataPoolResourceInfoListResult, error)) BigDataPoolResourceInfoListResultPage { + return BigDataPoolResourceInfoListResultPage{ + fn: getNextPage, + bdprilr: cur, + } +} + +// BigDataPoolResourceProperties properties of a Big Data pool powered by Apache Spark +type BigDataPoolResourceProperties struct { + // ProvisioningState - The state of the Big Data pool. + ProvisioningState *string `json:"provisioningState,omitempty"` + // AutoScale - Auto-scaling properties + AutoScale *AutoScaleProperties `json:"autoScale,omitempty"` + // CreationDate - The time when the Big Data pool was created. + CreationDate *date.Time `json:"creationDate,omitempty"` + // AutoPause - Auto-pausing properties + AutoPause *AutoPauseProperties `json:"autoPause,omitempty"` + // IsComputeIsolationEnabled - Whether compute isolation is required or not. + IsComputeIsolationEnabled *bool `json:"isComputeIsolationEnabled,omitempty"` + // SessionLevelPackagesEnabled - Whether session level packages enabled. + SessionLevelPackagesEnabled *bool `json:"sessionLevelPackagesEnabled,omitempty"` + // CacheSize - The cache size + CacheSize *int32 `json:"cacheSize,omitempty"` + // DynamicExecutorAllocation - Dynamic Executor Allocation + DynamicExecutorAllocation *DynamicExecutorAllocation `json:"dynamicExecutorAllocation,omitempty"` + // SparkEventsFolder - The Spark events folder + SparkEventsFolder *string `json:"sparkEventsFolder,omitempty"` + // NodeCount - The number of nodes in the Big Data pool. + NodeCount *int32 `json:"nodeCount,omitempty"` + // LibraryRequirements - Library version requirements + LibraryRequirements *LibraryRequirements `json:"libraryRequirements,omitempty"` + // CustomLibraries - List of custom libraries/packages associated with the spark pool. + CustomLibraries *[]LibraryInfo `json:"customLibraries,omitempty"` + // SparkConfigProperties - Spark configuration file to specify additional properties + SparkConfigProperties *SparkConfigProperties `json:"sparkConfigProperties,omitempty"` + // SparkVersion - The Apache Spark version. + SparkVersion *string `json:"sparkVersion,omitempty"` + // DefaultSparkLogFolder - The default folder where Spark logs will be written. + DefaultSparkLogFolder *string `json:"defaultSparkLogFolder,omitempty"` + // NodeSize - The level of compute power that each node in the Big Data pool has. Possible values include: 'NodeSizeNone', 'NodeSizeSmall', 'NodeSizeMedium', 'NodeSizeLarge', 'NodeSizeXLarge', 'NodeSizeXXLarge', 'NodeSizeXXXLarge' + NodeSize NodeSize `json:"nodeSize,omitempty"` + // NodeSizeFamily - The kind of nodes that the Big Data pool provides. Possible values include: 'NodeSizeFamilyNone', 'NodeSizeFamilyMemoryOptimized', 'NodeSizeFamilyHardwareAcceleratedFPGA', 'NodeSizeFamilyHardwareAcceleratedGPU' + NodeSizeFamily NodeSizeFamily `json:"nodeSizeFamily,omitempty"` + // LastSucceededTimestamp - READ-ONLY; The time when the Big Data pool was updated successfully. + LastSucceededTimestamp *date.Time `json:"lastSucceededTimestamp,omitempty"` +} + +// MarshalJSON is the custom marshaler for BigDataPoolResourceProperties. +func (bdprp BigDataPoolResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bdprp.ProvisioningState != nil { + objectMap["provisioningState"] = bdprp.ProvisioningState + } + if bdprp.AutoScale != nil { + objectMap["autoScale"] = bdprp.AutoScale + } + if bdprp.CreationDate != nil { + objectMap["creationDate"] = bdprp.CreationDate + } + if bdprp.AutoPause != nil { + objectMap["autoPause"] = bdprp.AutoPause + } + if bdprp.IsComputeIsolationEnabled != nil { + objectMap["isComputeIsolationEnabled"] = bdprp.IsComputeIsolationEnabled + } + if bdprp.SessionLevelPackagesEnabled != nil { + objectMap["sessionLevelPackagesEnabled"] = bdprp.SessionLevelPackagesEnabled + } + if bdprp.CacheSize != nil { + objectMap["cacheSize"] = bdprp.CacheSize + } + if bdprp.DynamicExecutorAllocation != nil { + objectMap["dynamicExecutorAllocation"] = bdprp.DynamicExecutorAllocation + } + if bdprp.SparkEventsFolder != nil { + objectMap["sparkEventsFolder"] = bdprp.SparkEventsFolder + } + if bdprp.NodeCount != nil { + objectMap["nodeCount"] = bdprp.NodeCount + } + if bdprp.LibraryRequirements != nil { + objectMap["libraryRequirements"] = bdprp.LibraryRequirements + } + if bdprp.CustomLibraries != nil { + objectMap["customLibraries"] = bdprp.CustomLibraries + } + if bdprp.SparkConfigProperties != nil { + objectMap["sparkConfigProperties"] = bdprp.SparkConfigProperties + } + if bdprp.SparkVersion != nil { + objectMap["sparkVersion"] = bdprp.SparkVersion + } + if bdprp.DefaultSparkLogFolder != nil { + objectMap["defaultSparkLogFolder"] = bdprp.DefaultSparkLogFolder + } + if bdprp.NodeSize != "" { + objectMap["nodeSize"] = bdprp.NodeSize + } + if bdprp.NodeSizeFamily != "" { + objectMap["nodeSizeFamily"] = bdprp.NodeSizeFamily + } + return json.Marshal(objectMap) +} + +// BigDataPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BigDataPoolsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BigDataPoolsClient) (BigDataPoolResourceInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BigDataPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BigDataPoolsCreateOrUpdateFuture.Result. +func (future *BigDataPoolsCreateOrUpdateFuture) result(client BigDataPoolsClient) (bdpri BigDataPoolResourceInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bdpri.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.BigDataPoolsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bdpri.Response.Response, err = future.GetResult(sender); err == nil && bdpri.Response.Response.StatusCode != http.StatusNoContent { + bdpri, err = client.CreateOrUpdateResponder(bdpri.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsCreateOrUpdateFuture", "Result", bdpri.Response.Response, "Failure responding to request") + } + } + return +} + +// BigDataPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BigDataPoolsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BigDataPoolsClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BigDataPoolsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BigDataPoolsDeleteFuture.Result. +func (future *BigDataPoolsDeleteFuture) result(client BigDataPoolsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.BigDataPoolsDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeleteResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsDeleteFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// CheckNameAvailabilityRequest a request about whether a workspace name is available +type CheckNameAvailabilityRequest struct { + // Name - Workspace name + Name *string `json:"name,omitempty"` + // Type - Type: workspace + Type *string `json:"type,omitempty"` +} + +// CheckNameAvailabilityResponse a response saying whether the workspace name is available +type CheckNameAvailabilityResponse struct { + autorest.Response `json:"-"` + // Message - Validation message + Message *string `json:"message,omitempty"` + // Available - Whether the workspace name is available + Available *bool `json:"available,omitempty"` + // Reason - Reason the workspace name is or is not available + Reason *string `json:"reason,omitempty"` + // Name - Workspace name + Name *string `json:"name,omitempty"` +} + +// CmdkeySetup the custom setup of running cmdkey commands. +type CmdkeySetup struct { + // CmdkeySetupTypeProperties - Cmdkey command custom setup type properties. + *CmdkeySetupTypeProperties `json:"typeProperties,omitempty"` + // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' + Type TypeBasicCustomSetupBase `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for CmdkeySetup. +func (cs CmdkeySetup) MarshalJSON() ([]byte, error) { + cs.Type = TypeBasicCustomSetupBaseTypeCmdkeySetup + objectMap := make(map[string]interface{}) + if cs.CmdkeySetupTypeProperties != nil { + objectMap["typeProperties"] = cs.CmdkeySetupTypeProperties + } + if cs.Type != "" { + objectMap["type"] = cs.Type + } + return json.Marshal(objectMap) +} + +// AsCmdkeySetup is the BasicCustomSetupBase implementation for CmdkeySetup. +func (cs CmdkeySetup) AsCmdkeySetup() (*CmdkeySetup, bool) { + return &cs, true +} + +// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for CmdkeySetup. +func (cs CmdkeySetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { + return nil, false +} + +// AsComponentSetup is the BasicCustomSetupBase implementation for CmdkeySetup. +func (cs CmdkeySetup) AsComponentSetup() (*ComponentSetup, bool) { + return nil, false +} + +// AsCustomSetupBase is the BasicCustomSetupBase implementation for CmdkeySetup. +func (cs CmdkeySetup) AsCustomSetupBase() (*CustomSetupBase, bool) { + return nil, false +} + +// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for CmdkeySetup. +func (cs CmdkeySetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { + return &cs, true +} + +// UnmarshalJSON is the custom unmarshaler for CmdkeySetup struct. +func (cs *CmdkeySetup) 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 "typeProperties": + if v != nil { + var cmdkeySetupTypeProperties CmdkeySetupTypeProperties + err = json.Unmarshal(*v, &cmdkeySetupTypeProperties) + if err != nil { + return err + } + cs.CmdkeySetupTypeProperties = &cmdkeySetupTypeProperties + } + case "type": + if v != nil { + var typeVar TypeBasicCustomSetupBase + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cs.Type = typeVar + } + } + } + + return nil +} + +// CmdkeySetupTypeProperties cmdkey command custom setup type properties. +type CmdkeySetupTypeProperties struct { + // TargetName - The server name of data source access. + TargetName interface{} `json:"targetName,omitempty"` + // UserName - The user name of data source access. + UserName interface{} `json:"userName,omitempty"` + // Password - The password of data source access. + Password BasicSecretBase `json:"password,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CmdkeySetupTypeProperties struct. +func (cstp *CmdkeySetupTypeProperties) 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 "targetName": + if v != nil { + var targetName interface{} + err = json.Unmarshal(*v, &targetName) + if err != nil { + return err + } + cstp.TargetName = targetName + } + case "userName": + if v != nil { + var userName interface{} + err = json.Unmarshal(*v, &userName) + if err != nil { + return err + } + cstp.UserName = userName + } + case "password": + if v != nil { + password, err := unmarshalBasicSecretBase(*v) + if err != nil { + return err + } + cstp.Password = password + } + } + } + + return nil +} + +// ComponentSetup the custom setup of installing 3rd party components. +type ComponentSetup struct { + // LicensedComponentSetupTypeProperties - Install 3rd party component type properties. + *LicensedComponentSetupTypeProperties `json:"typeProperties,omitempty"` + // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' + Type TypeBasicCustomSetupBase `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ComponentSetup. +func (cs ComponentSetup) MarshalJSON() ([]byte, error) { + cs.Type = TypeBasicCustomSetupBaseTypeComponentSetup + objectMap := make(map[string]interface{}) + if cs.LicensedComponentSetupTypeProperties != nil { + objectMap["typeProperties"] = cs.LicensedComponentSetupTypeProperties + } + if cs.Type != "" { + objectMap["type"] = cs.Type + } + return json.Marshal(objectMap) +} + +// AsCmdkeySetup is the BasicCustomSetupBase implementation for ComponentSetup. +func (cs ComponentSetup) AsCmdkeySetup() (*CmdkeySetup, bool) { + return nil, false +} + +// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for ComponentSetup. +func (cs ComponentSetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { + return nil, false +} + +// AsComponentSetup is the BasicCustomSetupBase implementation for ComponentSetup. +func (cs ComponentSetup) AsComponentSetup() (*ComponentSetup, bool) { + return &cs, true +} + +// AsCustomSetupBase is the BasicCustomSetupBase implementation for ComponentSetup. +func (cs ComponentSetup) AsCustomSetupBase() (*CustomSetupBase, bool) { + return nil, false +} + +// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for ComponentSetup. +func (cs ComponentSetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { + return &cs, true +} + +// UnmarshalJSON is the custom unmarshaler for ComponentSetup struct. +func (cs *ComponentSetup) 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 "typeProperties": + if v != nil { + var licensedComponentSetupTypeProperties LicensedComponentSetupTypeProperties + err = json.Unmarshal(*v, &licensedComponentSetupTypeProperties) + if err != nil { + return err + } + cs.LicensedComponentSetupTypeProperties = &licensedComponentSetupTypeProperties + } + case "type": + if v != nil { + var typeVar TypeBasicCustomSetupBase + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cs.Type = typeVar + } + } + } + + return nil +} + +// CreateSQLPoolRestorePointDefinition contains the information necessary to perform a create Sql pool +// restore point operation. +type CreateSQLPoolRestorePointDefinition struct { + // RestorePointLabel - The restore point label to apply + RestorePointLabel *string `json:"restorePointLabel,omitempty"` +} + +// CspWorkspaceAdminProperties initial workspace AAD admin properties for a CSP subscription +type CspWorkspaceAdminProperties struct { + // InitialWorkspaceAdminObjectID - AAD object ID of initial workspace admin + InitialWorkspaceAdminObjectID *string `json:"initialWorkspaceAdminObjectId,omitempty"` +} + +// CustomerManagedKeyDetails details of the customer managed key associated with the workspace +type CustomerManagedKeyDetails struct { + // Status - READ-ONLY; The customer managed key status on the workspace + Status *string `json:"status,omitempty"` + // Key - The key object of the workspace + Key *WorkspaceKeyDetails `json:"key,omitempty"` + // KekIdentity - Key encryption key + KekIdentity *KekIdentityProperties `json:"kekIdentity,omitempty"` +} + +// MarshalJSON is the custom marshaler for CustomerManagedKeyDetails. +func (cmkd CustomerManagedKeyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cmkd.Key != nil { + objectMap["key"] = cmkd.Key + } + if cmkd.KekIdentity != nil { + objectMap["kekIdentity"] = cmkd.KekIdentity + } + return json.Marshal(objectMap) +} + +// BasicCustomSetupBase the base definition of the custom setup. +type BasicCustomSetupBase interface { + AsCmdkeySetup() (*CmdkeySetup, bool) + AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) + AsComponentSetup() (*ComponentSetup, bool) + AsCustomSetupBase() (*CustomSetupBase, bool) +} + +// CustomSetupBase the base definition of the custom setup. +type CustomSetupBase struct { + // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' + Type TypeBasicCustomSetupBase `json:"type,omitempty"` +} + +func unmarshalBasicCustomSetupBase(body []byte) (BasicCustomSetupBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeBasicCustomSetupBaseTypeCmdkeySetup): + var cs CmdkeySetup + err := json.Unmarshal(body, &cs) + return cs, err + case string(TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup): + var evs EnvironmentVariableSetup + err := json.Unmarshal(body, &evs) + return evs, err + case string(TypeBasicCustomSetupBaseTypeComponentSetup): + var cs ComponentSetup + err := json.Unmarshal(body, &cs) + return cs, err + default: + var csb CustomSetupBase + err := json.Unmarshal(body, &csb) + return csb, err + } +} +func unmarshalBasicCustomSetupBaseArray(body []byte) ([]BasicCustomSetupBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + csbArray := make([]BasicCustomSetupBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + csb, err := unmarshalBasicCustomSetupBase(*rawMessage) + if err != nil { + return nil, err + } + csbArray[index] = csb + } + return csbArray, nil +} + +// MarshalJSON is the custom marshaler for CustomSetupBase. +func (csb CustomSetupBase) MarshalJSON() ([]byte, error) { + csb.Type = TypeBasicCustomSetupBaseTypeCustomSetupBase + objectMap := make(map[string]interface{}) + if csb.Type != "" { + objectMap["type"] = csb.Type + } + return json.Marshal(objectMap) +} + +// AsCmdkeySetup is the BasicCustomSetupBase implementation for CustomSetupBase. +func (csb CustomSetupBase) AsCmdkeySetup() (*CmdkeySetup, bool) { + return nil, false +} + +// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for CustomSetupBase. +func (csb CustomSetupBase) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { + return nil, false +} + +// AsComponentSetup is the BasicCustomSetupBase implementation for CustomSetupBase. +func (csb CustomSetupBase) AsComponentSetup() (*ComponentSetup, bool) { + return nil, false +} + +// AsCustomSetupBase is the BasicCustomSetupBase implementation for CustomSetupBase. +func (csb CustomSetupBase) AsCustomSetupBase() (*CustomSetupBase, bool) { + return &csb, true +} + +// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for CustomSetupBase. +func (csb CustomSetupBase) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { + return &csb, true +} + +// DataLakeStorageAccountDetails details of the data lake storage account associated with the workspace +type DataLakeStorageAccountDetails struct { + // AccountURL - Account URL + AccountURL *string `json:"accountUrl,omitempty"` + // Filesystem - Filesystem name + Filesystem *string `json:"filesystem,omitempty"` + // ResourceID - ARM resource Id of this storage account + ResourceID *string `json:"resourceId,omitempty"` + // CreateManagedPrivateEndpoint - Create managed private endpoint to this storage account or not + CreateManagedPrivateEndpoint *bool `json:"createManagedPrivateEndpoint,omitempty"` +} + +// DataMaskingPolicy ... +type DataMaskingPolicy struct { + autorest.Response `json:"-"` + // DataMaskingPolicyProperties - The properties of the data masking policy. + *DataMaskingPolicyProperties `json:"properties,omitempty"` + // Location - READ-ONLY; The location of the data masking policy. + Location *string `json:"location,omitempty"` + // Kind - READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal. + Kind *string `json:"kind,omitempty"` + // ManagedBy - READ-ONLY; Fully qualified resource ID of the sql pool + ManagedBy *string `json:"managedBy,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataMaskingPolicy. +func (dmp DataMaskingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dmp.DataMaskingPolicyProperties != nil { + objectMap["properties"] = dmp.DataMaskingPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DataMaskingPolicy struct. +func (dmp *DataMaskingPolicy) 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 dataMaskingPolicyProperties DataMaskingPolicyProperties + err = json.Unmarshal(*v, &dataMaskingPolicyProperties) + if err != nil { + return err + } + dmp.DataMaskingPolicyProperties = &dataMaskingPolicyProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dmp.Location = &location + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + dmp.Kind = &kind + } + case "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + dmp.ManagedBy = &managedBy + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dmp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dmp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dmp.Type = &typeVar + } + } + } + + return nil +} + +// DataMaskingPolicyProperties the properties of a database data masking policy. +type DataMaskingPolicyProperties struct { + // DataMaskingState - The state of the data masking policy. Possible values include: 'DataMaskingStateDisabled', 'DataMaskingStateEnabled' + DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"` + // ExemptPrincipals - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries. + ExemptPrincipals *string `json:"exemptPrincipals,omitempty"` + // ApplicationPrincipals - READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used. + ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"` + // MaskingLevel - READ-ONLY; The masking level. This is a legacy parameter and is no longer used. + MaskingLevel *string `json:"maskingLevel,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataMaskingPolicyProperties. +func (dmpp DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dmpp.DataMaskingState != "" { + objectMap["dataMaskingState"] = dmpp.DataMaskingState + } + if dmpp.ExemptPrincipals != nil { + objectMap["exemptPrincipals"] = dmpp.ExemptPrincipals + } + return json.Marshal(objectMap) +} + +// DataMaskingRule represents a Sql pool data masking rule. +type DataMaskingRule struct { + autorest.Response `json:"-"` + // DataMaskingRuleProperties - The properties of the resource. + *DataMaskingRuleProperties `json:"properties,omitempty"` + // Location - READ-ONLY; The location of the data masking rule. + Location *string `json:"location,omitempty"` + // Kind - READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal. + Kind *string `json:"kind,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataMaskingRule. +func (dmr DataMaskingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dmr.DataMaskingRuleProperties != nil { + objectMap["properties"] = dmr.DataMaskingRuleProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DataMaskingRule struct. +func (dmr *DataMaskingRule) 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 dataMaskingRuleProperties DataMaskingRuleProperties + err = json.Unmarshal(*v, &dataMaskingRuleProperties) + if err != nil { + return err + } + dmr.DataMaskingRuleProperties = &dataMaskingRuleProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dmr.Location = &location + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + dmr.Kind = &kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dmr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dmr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dmr.Type = &typeVar + } + } + } + + return nil +} + +// DataMaskingRuleListResult the response to a list data masking rules request. +type DataMaskingRuleListResult struct { + autorest.Response `json:"-"` + // Value - The list of Sql pool data masking rules. + Value *[]DataMaskingRule `json:"value,omitempty"` +} + +// DataMaskingRuleProperties the properties of a Sql pool data masking rule. +type DataMaskingRuleProperties struct { + // ID - READ-ONLY; The rule Id. + ID *string `json:"id,omitempty"` + // AliasName - The alias name. This is a legacy parameter and is no longer used. + AliasName *string `json:"aliasName,omitempty"` + // RuleState - The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'DataMaskingRuleStateDisabled', 'DataMaskingRuleStateEnabled' + RuleState DataMaskingRuleState `json:"ruleState,omitempty"` + // SchemaName - The schema name on which the data masking rule is applied. + SchemaName *string `json:"schemaName,omitempty"` + // TableName - The table name on which the data masking rule is applied. + TableName *string `json:"tableName,omitempty"` + // ColumnName - The column name on which the data masking rule is applied. + ColumnName *string `json:"columnName,omitempty"` + // MaskingFunction - The masking function that is used for the data masking rule. Possible values include: 'DataMaskingFunctionDefault', 'DataMaskingFunctionCCN', 'DataMaskingFunctionEmail', 'DataMaskingFunctionNumber', 'DataMaskingFunctionSSN', 'DataMaskingFunctionText' + MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"` + // NumberFrom - The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. + NumberFrom *string `json:"numberFrom,omitempty"` + // NumberTo - The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. + NumberTo *string `json:"numberTo,omitempty"` + // PrefixSize - If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. + PrefixSize *string `json:"prefixSize,omitempty"` + // SuffixSize - If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. + SuffixSize *string `json:"suffixSize,omitempty"` + // ReplacementString - If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. + ReplacementString *string `json:"replacementString,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataMaskingRuleProperties. +func (dmrp DataMaskingRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dmrp.AliasName != nil { + objectMap["aliasName"] = dmrp.AliasName + } + if dmrp.RuleState != "" { + objectMap["ruleState"] = dmrp.RuleState + } + if dmrp.SchemaName != nil { + objectMap["schemaName"] = dmrp.SchemaName + } + if dmrp.TableName != nil { + objectMap["tableName"] = dmrp.TableName + } + if dmrp.ColumnName != nil { + objectMap["columnName"] = dmrp.ColumnName + } + if dmrp.MaskingFunction != "" { + objectMap["maskingFunction"] = dmrp.MaskingFunction + } + if dmrp.NumberFrom != nil { + objectMap["numberFrom"] = dmrp.NumberFrom + } + if dmrp.NumberTo != nil { + objectMap["numberTo"] = dmrp.NumberTo + } + if dmrp.PrefixSize != nil { + objectMap["prefixSize"] = dmrp.PrefixSize + } + if dmrp.SuffixSize != nil { + objectMap["suffixSize"] = dmrp.SuffixSize + } + if dmrp.ReplacementString != nil { + objectMap["replacementString"] = dmrp.ReplacementString + } + return json.Marshal(objectMap) +} + +// DataWarehouseUserActivities user activities of a data warehouse +type DataWarehouseUserActivities struct { + autorest.Response `json:"-"` + // DataWarehouseUserActivitiesProperties - Resource properties. + *DataWarehouseUserActivitiesProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataWarehouseUserActivities. +func (dwua DataWarehouseUserActivities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dwua.DataWarehouseUserActivitiesProperties != nil { + objectMap["properties"] = dwua.DataWarehouseUserActivitiesProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DataWarehouseUserActivities struct. +func (dwua *DataWarehouseUserActivities) 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 dataWarehouseUserActivitiesProperties DataWarehouseUserActivitiesProperties + err = json.Unmarshal(*v, &dataWarehouseUserActivitiesProperties) + if err != nil { + return err + } + dwua.DataWarehouseUserActivitiesProperties = &dataWarehouseUserActivitiesProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dwua.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dwua.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dwua.Type = &typeVar + } + } + } + + return nil +} + +// DataWarehouseUserActivitiesProperties user activities of a data warehouse. This currently includes the +// count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests +// dynamic management view (DMV). +type DataWarehouseUserActivitiesProperties struct { + // ActiveQueriesCount - READ-ONLY; Count of running and suspended queries. + ActiveQueriesCount *int32 `json:"activeQueriesCount,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataWarehouseUserActivitiesProperties. +func (dwuap DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DynamicExecutorAllocation dynamic Executor Allocation Properties +type DynamicExecutorAllocation struct { + // Enabled - Indicates whether Dynamic Executor Allocation is enabled or not. + Enabled *bool `json:"enabled,omitempty"` +} + +// EncryptionDetails details of the encryption associated with the workspace +type EncryptionDetails struct { + // DoubleEncryptionEnabled - READ-ONLY; Double Encryption enabled + DoubleEncryptionEnabled *bool `json:"doubleEncryptionEnabled,omitempty"` + // Cmk - Customer Managed Key Details + Cmk *CustomerManagedKeyDetails `json:"cmk,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionDetails. +func (ed EncryptionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ed.Cmk != nil { + objectMap["cmk"] = ed.Cmk + } + return json.Marshal(objectMap) +} + +// EncryptionProtector the server encryption protector. +type EncryptionProtector struct { + autorest.Response `json:"-"` + // Kind - READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. + Kind *string `json:"kind,omitempty"` + // Location - READ-ONLY; Resource location. + Location *string `json:"location,omitempty"` + // EncryptionProtectorProperties - Resource properties. + *EncryptionProtectorProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionProtector. +func (ep EncryptionProtector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ep.EncryptionProtectorProperties != nil { + objectMap["properties"] = ep.EncryptionProtectorProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for EncryptionProtector struct. +func (ep *EncryptionProtector) 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 "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ep.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ep.Location = &location + } + case "properties": + if v != nil { + var encryptionProtectorProperties EncryptionProtectorProperties + err = json.Unmarshal(*v, &encryptionProtectorProperties) + if err != nil { + return err + } + ep.EncryptionProtectorProperties = &encryptionProtectorProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ep.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ep.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ep.Type = &typeVar + } + } + } + + return nil +} + +// EncryptionProtectorListResult a list of server encryption protectors. +type EncryptionProtectorListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]EncryptionProtector `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionProtectorListResult. +func (eplr EncryptionProtectorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// EncryptionProtectorListResultIterator provides access to a complete listing of EncryptionProtector +// values. +type EncryptionProtectorListResultIterator struct { + i int + page EncryptionProtectorListResultPage +} + +// 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 *EncryptionProtectorListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultIterator.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 *EncryptionProtectorListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EncryptionProtectorListResultIterator) 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 EncryptionProtectorListResultIterator) Response() EncryptionProtectorListResult { + 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 EncryptionProtectorListResultIterator) Value() EncryptionProtector { + if !iter.page.NotDone() { + return EncryptionProtector{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EncryptionProtectorListResultIterator type. +func NewEncryptionProtectorListResultIterator(page EncryptionProtectorListResultPage) EncryptionProtectorListResultIterator { + return EncryptionProtectorListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (eplr EncryptionProtectorListResult) IsEmpty() bool { + return eplr.Value == nil || len(*eplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (eplr EncryptionProtectorListResult) hasNextLink() bool { + return eplr.NextLink != nil && len(*eplr.NextLink) != 0 +} + +// encryptionProtectorListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (eplr EncryptionProtectorListResult) encryptionProtectorListResultPreparer(ctx context.Context) (*http.Request, error) { + if !eplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(eplr.NextLink))) +} + +// EncryptionProtectorListResultPage contains a page of EncryptionProtector values. +type EncryptionProtectorListResultPage struct { + fn func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error) + eplr EncryptionProtectorListResult +} + +// 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 *EncryptionProtectorListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.eplr) + if err != nil { + return err + } + page.eplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *EncryptionProtectorListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EncryptionProtectorListResultPage) NotDone() bool { + return !page.eplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EncryptionProtectorListResultPage) Response() EncryptionProtectorListResult { + return page.eplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EncryptionProtectorListResultPage) Values() []EncryptionProtector { + if page.eplr.IsEmpty() { + return nil + } + return *page.eplr.Value +} + +// Creates a new instance of the EncryptionProtectorListResultPage type. +func NewEncryptionProtectorListResultPage(cur EncryptionProtectorListResult, getNextPage func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)) EncryptionProtectorListResultPage { + return EncryptionProtectorListResultPage{ + fn: getNextPage, + eplr: cur, + } +} + +// EncryptionProtectorProperties properties for an encryption protector execution. +type EncryptionProtectorProperties struct { + // Subregion - READ-ONLY; Subregion of the encryption protector. + Subregion *string `json:"subregion,omitempty"` + // ServerKeyName - The name of the server key. + ServerKeyName *string `json:"serverKeyName,omitempty"` + // ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServerKeyTypeServiceManaged', 'ServerKeyTypeAzureKeyVault' + ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"` + // URI - READ-ONLY; The URI of the server key. + URI *string `json:"uri,omitempty"` + // Thumbprint - READ-ONLY; Thumbprint of the server key. + Thumbprint *string `json:"thumbprint,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionProtectorProperties. +func (epp EncryptionProtectorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if epp.ServerKeyName != nil { + objectMap["serverKeyName"] = epp.ServerKeyName + } + if epp.ServerKeyType != "" { + objectMap["serverKeyType"] = epp.ServerKeyType + } + return json.Marshal(objectMap) +} + +// EntityReference the entity reference. +type EntityReference struct { + // Type - The type of this referenced entity. Possible values include: 'IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference', 'IntegrationRuntimeEntityReferenceTypeLinkedServiceReference' + Type IntegrationRuntimeEntityReferenceType `json:"type,omitempty"` + // ReferenceName - The name of this referenced entity. + ReferenceName *string `json:"referenceName,omitempty"` +} + +// EnvironmentVariableSetup the custom setup of setting environment variable. +type EnvironmentVariableSetup struct { + // EnvironmentVariableSetupTypeProperties - Add environment variable type properties. + *EnvironmentVariableSetupTypeProperties `json:"typeProperties,omitempty"` + // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' + Type TypeBasicCustomSetupBase `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for EnvironmentVariableSetup. +func (evs EnvironmentVariableSetup) MarshalJSON() ([]byte, error) { + evs.Type = TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup + objectMap := make(map[string]interface{}) + if evs.EnvironmentVariableSetupTypeProperties != nil { + objectMap["typeProperties"] = evs.EnvironmentVariableSetupTypeProperties + } + if evs.Type != "" { + objectMap["type"] = evs.Type + } + return json.Marshal(objectMap) +} + +// AsCmdkeySetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. +func (evs EnvironmentVariableSetup) AsCmdkeySetup() (*CmdkeySetup, bool) { + return nil, false +} + +// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. +func (evs EnvironmentVariableSetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { + return &evs, true +} + +// AsComponentSetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. +func (evs EnvironmentVariableSetup) AsComponentSetup() (*ComponentSetup, bool) { + return nil, false +} + +// AsCustomSetupBase is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. +func (evs EnvironmentVariableSetup) AsCustomSetupBase() (*CustomSetupBase, bool) { + return nil, false +} + +// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. +func (evs EnvironmentVariableSetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { + return &evs, true +} + +// UnmarshalJSON is the custom unmarshaler for EnvironmentVariableSetup struct. +func (evs *EnvironmentVariableSetup) 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 "typeProperties": + if v != nil { + var environmentVariableSetupTypeProperties EnvironmentVariableSetupTypeProperties + err = json.Unmarshal(*v, &environmentVariableSetupTypeProperties) + if err != nil { + return err + } + evs.EnvironmentVariableSetupTypeProperties = &environmentVariableSetupTypeProperties + } + case "type": + if v != nil { + var typeVar TypeBasicCustomSetupBase + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + evs.Type = typeVar + } + } + } + + return nil +} + +// EnvironmentVariableSetupTypeProperties environment variable custom setup type properties. +type EnvironmentVariableSetupTypeProperties struct { + // VariableName - The name of the environment variable. + VariableName *string `json:"variableName,omitempty"` + // VariableValue - The value of the environment variable. + VariableValue *string `json:"variableValue,omitempty"` +} + +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorDetail the error detail. +type ErrorDetail struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]ErrorDetail `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorDetail. +func (ed ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.). +type ErrorResponse struct { + // Error - The error object. + Error *ErrorDetail `json:"error,omitempty"` +} + +// ExtendedServerBlobAuditingPolicy an extended server blob auditing policy. +type ExtendedServerBlobAuditingPolicy struct { + autorest.Response `json:"-"` + // ExtendedServerBlobAuditingPolicyProperties - Resource properties. + *ExtendedServerBlobAuditingPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicy. +func (esbap ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esbap.ExtendedServerBlobAuditingPolicyProperties != nil { + objectMap["properties"] = esbap.ExtendedServerBlobAuditingPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExtendedServerBlobAuditingPolicy struct. +func (esbap *ExtendedServerBlobAuditingPolicy) 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 extendedServerBlobAuditingPolicyProperties ExtendedServerBlobAuditingPolicyProperties + err = json.Unmarshal(*v, &extendedServerBlobAuditingPolicyProperties) + if err != nil { + return err + } + esbap.ExtendedServerBlobAuditingPolicyProperties = &extendedServerBlobAuditingPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + esbap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + esbap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + esbap.Type = &typeVar + } + } + } + + return nil +} + +// ExtendedServerBlobAuditingPolicyListResult a list of server extended auditing settings. +type ExtendedServerBlobAuditingPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ExtendedServerBlobAuditingPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicyListResult. +func (esbaplr ExtendedServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExtendedServerBlobAuditingPolicyListResultIterator provides access to a complete listing of +// ExtendedServerBlobAuditingPolicy values. +type ExtendedServerBlobAuditingPolicyListResultIterator struct { + i int + page ExtendedServerBlobAuditingPolicyListResultPage +} + +// 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 *ExtendedServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultIterator.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 *ExtendedServerBlobAuditingPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExtendedServerBlobAuditingPolicyListResultIterator) 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 ExtendedServerBlobAuditingPolicyListResultIterator) Response() ExtendedServerBlobAuditingPolicyListResult { + 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 ExtendedServerBlobAuditingPolicyListResultIterator) Value() ExtendedServerBlobAuditingPolicy { + if !iter.page.NotDone() { + return ExtendedServerBlobAuditingPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultIterator type. +func NewExtendedServerBlobAuditingPolicyListResultIterator(page ExtendedServerBlobAuditingPolicyListResultPage) ExtendedServerBlobAuditingPolicyListResultIterator { + return ExtendedServerBlobAuditingPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (esbaplr ExtendedServerBlobAuditingPolicyListResult) IsEmpty() bool { + return esbaplr.Value == nil || len(*esbaplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (esbaplr ExtendedServerBlobAuditingPolicyListResult) hasNextLink() bool { + return esbaplr.NextLink != nil && len(*esbaplr.NextLink) != 0 +} + +// extendedServerBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (esbaplr ExtendedServerBlobAuditingPolicyListResult) extendedServerBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !esbaplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(esbaplr.NextLink))) +} + +// ExtendedServerBlobAuditingPolicyListResultPage contains a page of ExtendedServerBlobAuditingPolicy +// values. +type ExtendedServerBlobAuditingPolicyListResultPage struct { + fn func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error) + esbaplr ExtendedServerBlobAuditingPolicyListResult +} + +// 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 *ExtendedServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.esbaplr) + if err != nil { + return err + } + page.esbaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExtendedServerBlobAuditingPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExtendedServerBlobAuditingPolicyListResultPage) NotDone() bool { + return !page.esbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExtendedServerBlobAuditingPolicyListResultPage) Response() ExtendedServerBlobAuditingPolicyListResult { + return page.esbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExtendedServerBlobAuditingPolicyListResultPage) Values() []ExtendedServerBlobAuditingPolicy { + if page.esbaplr.IsEmpty() { + return nil + } + return *page.esbaplr.Value +} + +// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultPage type. +func NewExtendedServerBlobAuditingPolicyListResultPage(cur ExtendedServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error)) ExtendedServerBlobAuditingPolicyListResultPage { + return ExtendedServerBlobAuditingPolicyListResultPage{ + fn: getNextPage, + esbaplr: cur, + } +} + +// ExtendedServerBlobAuditingPolicyProperties properties of an extended server blob auditing policy. +type ExtendedServerBlobAuditingPolicyProperties struct { + // PredicateExpression - Specifies condition of where clause when creating an audit. + 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 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, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. + // + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + // + // BATCH_COMPLETED_GROUP, + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + // FAILED_DATABASE_AUTHENTICATION_GROUP. + // + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + // + // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + // BACKUP_RESTORE_GROUP + // DATABASE_LOGOUT_GROUP + // DATABASE_OBJECT_CHANGE_GROUP + // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + // DATABASE_OPERATION_GROUP + // DATABASE_PERMISSION_CHANGE_GROUP + // DATABASE_PRINCIPAL_CHANGE_GROUP + // DATABASE_PRINCIPAL_IMPERSONATION_GROUP + // DATABASE_ROLE_MEMBER_CHANGE_GROUP + // FAILED_DATABASE_AUTHENTICATION_GROUP + // SCHEMA_OBJECT_ACCESS_GROUP + // SCHEMA_OBJECT_CHANGE_GROUP + // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + // USER_CHANGE_PASSWORD_GROUP + // BATCH_STARTED_GROUP + // BATCH_COMPLETED_GROUP + // + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + // + // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + // + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + // SELECT + // UPDATE + // INSERT + // DELETE + // EXECUTE + // RECEIVE + // REFERENCES + // + // The general form for defining an action to be audited is: + // {action} ON {object} BY {principal} + // + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + // + // For example: + // SELECT on dbo.myTable by public + // SELECT on DATABASE::myDatabase by public + // SELECT on SCHEMA::mySchema by public + // + // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` + // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. + // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + // + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + // Note that for server level audit you should use the 'master' database as {databaseName}. + // + // Diagnostic Settings URI format: + // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // + // 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"` +} + +// ExtendedSQLPoolBlobAuditingPolicy an extended Sql pool blob auditing policy. +type ExtendedSQLPoolBlobAuditingPolicy struct { + autorest.Response `json:"-"` + // ExtendedSQLPoolBlobAuditingPolicyProperties - Resource properties. + *ExtendedSQLPoolBlobAuditingPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExtendedSQLPoolBlobAuditingPolicy. +func (espbap ExtendedSQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if espbap.ExtendedSQLPoolBlobAuditingPolicyProperties != nil { + objectMap["properties"] = espbap.ExtendedSQLPoolBlobAuditingPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExtendedSQLPoolBlobAuditingPolicy struct. +func (espbap *ExtendedSQLPoolBlobAuditingPolicy) 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 extendedSQLPoolBlobAuditingPolicyProperties ExtendedSQLPoolBlobAuditingPolicyProperties + err = json.Unmarshal(*v, &extendedSQLPoolBlobAuditingPolicyProperties) + if err != nil { + return err + } + espbap.ExtendedSQLPoolBlobAuditingPolicyProperties = &extendedSQLPoolBlobAuditingPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + espbap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + espbap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + espbap.Type = &typeVar + } + } + } + + return nil +} + +// ExtendedSQLPoolBlobAuditingPolicyListResult a list of sql pool extended auditing settings. +type ExtendedSQLPoolBlobAuditingPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ExtendedSQLPoolBlobAuditingPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExtendedSQLPoolBlobAuditingPolicyListResult. +func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExtendedSQLPoolBlobAuditingPolicyListResultIterator provides access to a complete listing of +// ExtendedSQLPoolBlobAuditingPolicy values. +type ExtendedSQLPoolBlobAuditingPolicyListResultIterator struct { + i int + page ExtendedSQLPoolBlobAuditingPolicyListResultPage +} + +// 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 *ExtendedSQLPoolBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPolicyListResultIterator.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 *ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) 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 ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Response() ExtendedSQLPoolBlobAuditingPolicyListResult { + 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 ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Value() ExtendedSQLPoolBlobAuditingPolicy { + if !iter.page.NotDone() { + return ExtendedSQLPoolBlobAuditingPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExtendedSQLPoolBlobAuditingPolicyListResultIterator type. +func NewExtendedSQLPoolBlobAuditingPolicyListResultIterator(page ExtendedSQLPoolBlobAuditingPolicyListResultPage) ExtendedSQLPoolBlobAuditingPolicyListResultIterator { + return ExtendedSQLPoolBlobAuditingPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) IsEmpty() bool { + return espbaplr.Value == nil || len(*espbaplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) hasNextLink() bool { + return espbaplr.NextLink != nil && len(*espbaplr.NextLink) != 0 +} + +// extendedSQLPoolBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) extendedSQLPoolBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !espbaplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(espbaplr.NextLink))) +} + +// ExtendedSQLPoolBlobAuditingPolicyListResultPage contains a page of ExtendedSQLPoolBlobAuditingPolicy +// values. +type ExtendedSQLPoolBlobAuditingPolicyListResultPage struct { + fn func(context.Context, ExtendedSQLPoolBlobAuditingPolicyListResult) (ExtendedSQLPoolBlobAuditingPolicyListResult, error) + espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult +} + +// 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 *ExtendedSQLPoolBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.espbaplr) + if err != nil { + return err + } + page.espbaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ExtendedSQLPoolBlobAuditingPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) NotDone() bool { + return !page.espbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) Response() ExtendedSQLPoolBlobAuditingPolicyListResult { + return page.espbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) Values() []ExtendedSQLPoolBlobAuditingPolicy { + if page.espbaplr.IsEmpty() { + return nil + } + return *page.espbaplr.Value +} + +// Creates a new instance of the ExtendedSQLPoolBlobAuditingPolicyListResultPage type. +func NewExtendedSQLPoolBlobAuditingPolicyListResultPage(cur ExtendedSQLPoolBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedSQLPoolBlobAuditingPolicyListResult) (ExtendedSQLPoolBlobAuditingPolicyListResult, error)) ExtendedSQLPoolBlobAuditingPolicyListResultPage { + return ExtendedSQLPoolBlobAuditingPolicyListResultPage{ + fn: getNextPage, + espbaplr: cur, + } +} + +// ExtendedSQLPoolBlobAuditingPolicyProperties properties of an extended Sql pool blob auditing policy. +type ExtendedSQLPoolBlobAuditingPolicyProperties struct { + // PredicateExpression - Specifies condition of where clause when creating an audit. + 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 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, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. + // + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + // + // BATCH_COMPLETED_GROUP, + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + // FAILED_DATABASE_AUTHENTICATION_GROUP. + // + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + // + // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + // BACKUP_RESTORE_GROUP + // DATABASE_LOGOUT_GROUP + // DATABASE_OBJECT_CHANGE_GROUP + // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + // DATABASE_OPERATION_GROUP + // DATABASE_PERMISSION_CHANGE_GROUP + // DATABASE_PRINCIPAL_CHANGE_GROUP + // DATABASE_PRINCIPAL_IMPERSONATION_GROUP + // DATABASE_ROLE_MEMBER_CHANGE_GROUP + // FAILED_DATABASE_AUTHENTICATION_GROUP + // SCHEMA_OBJECT_ACCESS_GROUP + // SCHEMA_OBJECT_CHANGE_GROUP + // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + // USER_CHANGE_PASSWORD_GROUP + // BATCH_STARTED_GROUP + // BATCH_COMPLETED_GROUP + // + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + // + // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + // + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + // SELECT + // UPDATE + // INSERT + // DELETE + // EXECUTE + // RECEIVE + // REFERENCES + // + // The general form for defining an action to be audited is: + // {action} ON {object} BY {principal} + // + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + // + // For example: + // SELECT on dbo.myTable by public + // SELECT on DATABASE::myDatabase by public + // SELECT on SCHEMA::mySchema by public + // + // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` + // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. + // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + // + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + // Note that for server level audit you should use the 'master' database as {databaseName}. + // + // Diagnostic Settings URI format: + // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // + // 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"` +} + +// GeoBackupPolicy a database geo backup policy. +type GeoBackupPolicy struct { + autorest.Response `json:"-"` + // GeoBackupPolicyProperties - The properties of the geo backup policy. + *GeoBackupPolicyProperties `json:"properties,omitempty"` + // Kind - READ-ONLY; Kind of geo backup policy. This is metadata used for the Azure portal experience. + Kind *string `json:"kind,omitempty"` + // Location - READ-ONLY; Backup policy location. + Location *string `json:"location,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for GeoBackupPolicy. +func (gbp GeoBackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gbp.GeoBackupPolicyProperties != nil { + objectMap["properties"] = gbp.GeoBackupPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GeoBackupPolicy struct. +func (gbp *GeoBackupPolicy) 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 geoBackupPolicyProperties GeoBackupPolicyProperties + err = json.Unmarshal(*v, &geoBackupPolicyProperties) + if err != nil { + return err + } + gbp.GeoBackupPolicyProperties = &geoBackupPolicyProperties + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + gbp.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + gbp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gbp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gbp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gbp.Type = &typeVar + } + } + } + + return nil +} + +// GeoBackupPolicyListResult the response to a list geo backup policies request. +type GeoBackupPolicyListResult struct { + autorest.Response `json:"-"` + // Value - The list of geo backup policies. + Value *[]GeoBackupPolicy `json:"value,omitempty"` +} + +// GeoBackupPolicyProperties the properties of the geo backup policy. +type GeoBackupPolicyProperties struct { + // State - The state of the geo backup policy. Possible values include: 'GeoBackupPolicyStateDisabled', 'GeoBackupPolicyStateEnabled' + State GeoBackupPolicyState `json:"state,omitempty"` + // StorageType - READ-ONLY; The storage type of the geo backup policy. + StorageType *string `json:"storageType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GeoBackupPolicyProperties. +func (gbpp GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gbpp.State != "" { + objectMap["state"] = gbpp.State + } + return json.Marshal(objectMap) +} + +// GetSsisObjectMetadataRequest the request payload of get SSIS object metadata. +type GetSsisObjectMetadataRequest struct { + // MetadataPath - Metadata path. + MetadataPath *string `json:"metadataPath,omitempty"` +} + +// BasicIntegrationRuntime azure Synapse nested object which serves as a compute resource for activities. +type BasicIntegrationRuntime interface { + AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) + AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) + AsIntegrationRuntime() (*IntegrationRuntime, bool) +} + +// IntegrationRuntime azure Synapse nested object which serves as a compute resource for activities. +type IntegrationRuntime struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Description - Integration runtime description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted' + Type Type `json:"type,omitempty"` +} + +func unmarshalBasicIntegrationRuntime(body []byte) (BasicIntegrationRuntime, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeManaged): + var mir ManagedIntegrationRuntime + err := json.Unmarshal(body, &mir) + return mir, err + case string(TypeSelfHosted): + var shir SelfHostedIntegrationRuntime + err := json.Unmarshal(body, &shir) + return shir, err + default: + var ir IntegrationRuntime + err := json.Unmarshal(body, &ir) + return ir, err + } +} +func unmarshalBasicIntegrationRuntimeArray(body []byte) ([]BasicIntegrationRuntime, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + irArray := make([]BasicIntegrationRuntime, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ir, err := unmarshalBasicIntegrationRuntime(*rawMessage) + if err != nil { + return nil, err + } + irArray[index] = ir + } + return irArray, nil +} + +// MarshalJSON is the custom marshaler for IntegrationRuntime. +func (ir IntegrationRuntime) MarshalJSON() ([]byte, error) { + ir.Type = TypeIntegrationRuntime + objectMap := make(map[string]interface{}) + if ir.Description != nil { + objectMap["description"] = ir.Description + } + if ir.Type != "" { + objectMap["type"] = ir.Type + } + for k, v := range ir.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. +func (ir IntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) { + return nil, false +} + +// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. +func (ir IntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) { + return nil, false +} + +// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. +func (ir IntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) { + return &ir, true +} + +// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. +func (ir IntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) { + return &ir, true +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntime struct. +func (ir *IntegrationRuntime) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if ir.AdditionalProperties == nil { + ir.AdditionalProperties = make(map[string]interface{}) + } + ir.AdditionalProperties[k] = additionalProperties + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + ir.Description = &description + } + case "type": + if v != nil { + var typeVar Type + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ir.Type = typeVar + } + } + } + + return nil +} + +// IntegrationRuntimeAuthKeys the integration runtime authentication keys. +type IntegrationRuntimeAuthKeys struct { + autorest.Response `json:"-"` + // AuthKey1 - The primary integration runtime authentication key. + AuthKey1 *string `json:"authKey1,omitempty"` + // AuthKey2 - The secondary integration runtime authentication key. + AuthKey2 *string `json:"authKey2,omitempty"` +} + +// IntegrationRuntimeComputeProperties the compute resource properties for managed integration runtime. +type IntegrationRuntimeComputeProperties struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Location - The location for managed integration runtime. The supported regions could be found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + Location *string `json:"location,omitempty"` + // NodeSize - The node size requirement to managed integration runtime. + NodeSize *string `json:"nodeSize,omitempty"` + // NumberOfNodes - The required number of nodes for managed integration runtime. + NumberOfNodes *int32 `json:"numberOfNodes,omitempty"` + // MaxParallelExecutionsPerNode - Maximum parallel executions count per node for managed integration runtime. + MaxParallelExecutionsPerNode *int32 `json:"maxParallelExecutionsPerNode,omitempty"` + // DataFlowProperties - Data flow properties for managed integration runtime. + DataFlowProperties *IntegrationRuntimeDataFlowProperties `json:"dataFlowProperties,omitempty"` + // VNetProperties - VNet properties for managed integration runtime. + VNetProperties *IntegrationRuntimeVNetProperties `json:"vNetProperties,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeComputeProperties. +func (ircp IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ircp.Location != nil { + objectMap["location"] = ircp.Location + } + if ircp.NodeSize != nil { + objectMap["nodeSize"] = ircp.NodeSize + } + if ircp.NumberOfNodes != nil { + objectMap["numberOfNodes"] = ircp.NumberOfNodes + } + if ircp.MaxParallelExecutionsPerNode != nil { + objectMap["maxParallelExecutionsPerNode"] = ircp.MaxParallelExecutionsPerNode + } + if ircp.DataFlowProperties != nil { + objectMap["dataFlowProperties"] = ircp.DataFlowProperties + } + if ircp.VNetProperties != nil { + objectMap["vNetProperties"] = ircp.VNetProperties + } + for k, v := range ircp.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeComputeProperties struct. +func (ircp *IntegrationRuntimeComputeProperties) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if ircp.AdditionalProperties == nil { + ircp.AdditionalProperties = make(map[string]interface{}) + } + ircp.AdditionalProperties[k] = additionalProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ircp.Location = &location + } + case "nodeSize": + if v != nil { + var nodeSize string + err = json.Unmarshal(*v, &nodeSize) + if err != nil { + return err + } + ircp.NodeSize = &nodeSize + } + case "numberOfNodes": + if v != nil { + var numberOfNodes int32 + err = json.Unmarshal(*v, &numberOfNodes) + if err != nil { + return err + } + ircp.NumberOfNodes = &numberOfNodes + } + case "maxParallelExecutionsPerNode": + if v != nil { + var maxParallelExecutionsPerNode int32 + err = json.Unmarshal(*v, &maxParallelExecutionsPerNode) + if err != nil { + return err + } + ircp.MaxParallelExecutionsPerNode = &maxParallelExecutionsPerNode + } + case "dataFlowProperties": + if v != nil { + var dataFlowProperties IntegrationRuntimeDataFlowProperties + err = json.Unmarshal(*v, &dataFlowProperties) + if err != nil { + return err + } + ircp.DataFlowProperties = &dataFlowProperties + } + case "vNetProperties": + if v != nil { + var vNetProperties IntegrationRuntimeVNetProperties + err = json.Unmarshal(*v, &vNetProperties) + if err != nil { + return err + } + ircp.VNetProperties = &vNetProperties + } + } + } + + return nil +} + +// IntegrationRuntimeConnectionInfo connection information for encrypting the on-premises data source +// credentials. +type IntegrationRuntimeConnectionInfo struct { + autorest.Response `json:"-"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // ServiceToken - READ-ONLY; The token generated in service. Callers use this token to authenticate to integration runtime. + ServiceToken *string `json:"serviceToken,omitempty"` + // IdentityCertThumbprint - READ-ONLY; The integration runtime SSL certificate thumbprint. Click-Once application uses it to do server validation. + IdentityCertThumbprint *string `json:"identityCertThumbprint,omitempty"` + // HostServiceURI - READ-ONLY; The on-premises integration runtime host URL. + HostServiceURI *string `json:"hostServiceUri,omitempty"` + // Version - READ-ONLY; The integration runtime version. + Version *string `json:"version,omitempty"` + // PublicKey - READ-ONLY; The public key for encrypting a credential when transferring the credential to the integration runtime. + PublicKey *string `json:"publicKey,omitempty"` + // IsIdentityCertExprired - READ-ONLY; Whether the identity certificate is expired. + IsIdentityCertExprired *bool `json:"isIdentityCertExprired,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeConnectionInfo. +func (irci IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + for k, v := range irci.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeConnectionInfo struct. +func (irci *IntegrationRuntimeConnectionInfo) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irci.AdditionalProperties == nil { + irci.AdditionalProperties = make(map[string]interface{}) + } + irci.AdditionalProperties[k] = additionalProperties + } + case "serviceToken": + if v != nil { + var serviceToken string + err = json.Unmarshal(*v, &serviceToken) + if err != nil { + return err + } + irci.ServiceToken = &serviceToken + } + case "identityCertThumbprint": + if v != nil { + var identityCertThumbprint string + err = json.Unmarshal(*v, &identityCertThumbprint) + if err != nil { + return err + } + irci.IdentityCertThumbprint = &identityCertThumbprint + } + case "hostServiceUri": + if v != nil { + var hostServiceURI string + err = json.Unmarshal(*v, &hostServiceURI) + if err != nil { + return err + } + irci.HostServiceURI = &hostServiceURI + } + case "version": + if v != nil { + var version string + err = json.Unmarshal(*v, &version) + if err != nil { + return err + } + irci.Version = &version + } + case "publicKey": + if v != nil { + var publicKey string + err = json.Unmarshal(*v, &publicKey) + if err != nil { + return err + } + irci.PublicKey = &publicKey + } + case "isIdentityCertExprired": + if v != nil { + var isIdentityCertExprired bool + err = json.Unmarshal(*v, &isIdentityCertExprired) + if err != nil { + return err + } + irci.IsIdentityCertExprired = &isIdentityCertExprired + } + } + } + + return nil +} + +// IntegrationRuntimeCustomSetupScriptProperties custom setup script properties for a managed dedicated +// integration runtime. +type IntegrationRuntimeCustomSetupScriptProperties struct { + // BlobContainerURI - The URI of the Azure blob container that contains the custom setup script. + BlobContainerURI *string `json:"blobContainerUri,omitempty"` + // SasToken - The SAS token of the Azure blob container. + SasToken *SecureString `json:"sasToken,omitempty"` +} + +// IntegrationRuntimeDataFlowProperties data flow properties for managed integration runtime. +type IntegrationRuntimeDataFlowProperties struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // ComputeType - Compute type of the cluster which will execute data flow job. Possible values include: 'DataFlowComputeTypeGeneral', 'DataFlowComputeTypeMemoryOptimized', 'DataFlowComputeTypeComputeOptimized' + ComputeType DataFlowComputeType `json:"computeType,omitempty"` + // CoreCount - Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + CoreCount *int32 `json:"coreCount,omitempty"` + // TimeToLive - Time to live (in minutes) setting of the cluster which will execute data flow job. + TimeToLive *int32 `json:"timeToLive,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeDataFlowProperties. +func (irdfp IntegrationRuntimeDataFlowProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if irdfp.ComputeType != "" { + objectMap["computeType"] = irdfp.ComputeType + } + if irdfp.CoreCount != nil { + objectMap["coreCount"] = irdfp.CoreCount + } + if irdfp.TimeToLive != nil { + objectMap["timeToLive"] = irdfp.TimeToLive + } + for k, v := range irdfp.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeDataFlowProperties struct. +func (irdfp *IntegrationRuntimeDataFlowProperties) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irdfp.AdditionalProperties == nil { + irdfp.AdditionalProperties = make(map[string]interface{}) + } + irdfp.AdditionalProperties[k] = additionalProperties + } + case "computeType": + if v != nil { + var computeType DataFlowComputeType + err = json.Unmarshal(*v, &computeType) + if err != nil { + return err + } + irdfp.ComputeType = computeType + } + case "coreCount": + if v != nil { + var coreCount int32 + err = json.Unmarshal(*v, &coreCount) + if err != nil { + return err + } + irdfp.CoreCount = &coreCount + } + case "timeToLive": + if v != nil { + var timeToLive int32 + err = json.Unmarshal(*v, &timeToLive) + if err != nil { + return err + } + irdfp.TimeToLive = &timeToLive + } + } + } + + return nil +} + +// IntegrationRuntimeDataProxyProperties data proxy properties for a managed dedicated integration runtime. +type IntegrationRuntimeDataProxyProperties struct { + // ConnectVia - The self-hosted integration runtime reference. + ConnectVia *EntityReference `json:"connectVia,omitempty"` + // StagingLinkedService - The staging linked service reference. + StagingLinkedService *EntityReference `json:"stagingLinkedService,omitempty"` + // Path - The path to contain the staged data in the Blob storage. + Path *string `json:"path,omitempty"` +} + +// IntegrationRuntimeListResponse a list of integration runtime resources. +type IntegrationRuntimeListResponse struct { + autorest.Response `json:"-"` + // Value - List of integration runtimes. + Value *[]IntegrationRuntimeResource `json:"value,omitempty"` + // NextLink - The link to the next page of results, if any remaining results exist. + NextLink *string `json:"nextLink,omitempty"` +} + +// IntegrationRuntimeListResponseIterator provides access to a complete listing of +// IntegrationRuntimeResource values. +type IntegrationRuntimeListResponseIterator struct { + i int + page IntegrationRuntimeListResponsePage +} + +// 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 *IntegrationRuntimeListResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeListResponseIterator.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 *IntegrationRuntimeListResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IntegrationRuntimeListResponseIterator) 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 IntegrationRuntimeListResponseIterator) Response() IntegrationRuntimeListResponse { + 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 IntegrationRuntimeListResponseIterator) Value() IntegrationRuntimeResource { + if !iter.page.NotDone() { + return IntegrationRuntimeResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IntegrationRuntimeListResponseIterator type. +func NewIntegrationRuntimeListResponseIterator(page IntegrationRuntimeListResponsePage) IntegrationRuntimeListResponseIterator { + return IntegrationRuntimeListResponseIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (irlr IntegrationRuntimeListResponse) IsEmpty() bool { + return irlr.Value == nil || len(*irlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (irlr IntegrationRuntimeListResponse) hasNextLink() bool { + return irlr.NextLink != nil && len(*irlr.NextLink) != 0 +} + +// integrationRuntimeListResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (irlr IntegrationRuntimeListResponse) integrationRuntimeListResponsePreparer(ctx context.Context) (*http.Request, error) { + if !irlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(irlr.NextLink))) +} + +// IntegrationRuntimeListResponsePage contains a page of IntegrationRuntimeResource values. +type IntegrationRuntimeListResponsePage struct { + fn func(context.Context, IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error) + irlr IntegrationRuntimeListResponse +} + +// 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 *IntegrationRuntimeListResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeListResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.irlr) + if err != nil { + return err + } + page.irlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *IntegrationRuntimeListResponsePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IntegrationRuntimeListResponsePage) NotDone() bool { + return !page.irlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IntegrationRuntimeListResponsePage) Response() IntegrationRuntimeListResponse { + return page.irlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IntegrationRuntimeListResponsePage) Values() []IntegrationRuntimeResource { + if page.irlr.IsEmpty() { + return nil + } + return *page.irlr.Value +} + +// Creates a new instance of the IntegrationRuntimeListResponsePage type. +func NewIntegrationRuntimeListResponsePage(cur IntegrationRuntimeListResponse, getNextPage func(context.Context, IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error)) IntegrationRuntimeListResponsePage { + return IntegrationRuntimeListResponsePage{ + fn: getNextPage, + irlr: cur, + } +} + +// IntegrationRuntimeMonitoringData get monitoring data response. +type IntegrationRuntimeMonitoringData struct { + autorest.Response `json:"-"` + // Name - Integration runtime name. + Name *string `json:"name,omitempty"` + // Nodes - Integration runtime node monitoring data. + Nodes *[]IntegrationRuntimeNodeMonitoringData `json:"nodes,omitempty"` +} + +// IntegrationRuntimeNodeIPAddress the IP address of self-hosted integration runtime node. +type IntegrationRuntimeNodeIPAddress struct { + autorest.Response `json:"-"` + // IPAddress - READ-ONLY; The IP address of self-hosted integration runtime node. + IPAddress *string `json:"ipAddress,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeNodeIPAddress. +func (irnia IntegrationRuntimeNodeIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// IntegrationRuntimeNodeMonitoringData monitoring data for integration runtime node. +type IntegrationRuntimeNodeMonitoringData struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // NodeName - READ-ONLY; Name of the integration runtime node. + NodeName *string `json:"nodeName,omitempty"` + // AvailableMemoryInMB - READ-ONLY; Available memory (MB) on the integration runtime node. + AvailableMemoryInMB *int32 `json:"availableMemoryInMB,omitempty"` + // CPUUtilization - READ-ONLY; CPU percentage on the integration runtime node. + CPUUtilization *int32 `json:"cpuUtilization,omitempty"` + // ConcurrentJobsLimit - READ-ONLY; Maximum concurrent jobs on the integration runtime node. + ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"` + // ConcurrentJobsRunning - READ-ONLY; The number of jobs currently running on the integration runtime node. + ConcurrentJobsRunning *int32 `json:"concurrentJobsRunning,omitempty"` + // MaxConcurrentJobs - READ-ONLY; The maximum concurrent jobs in this integration runtime. + MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"` + // SentBytes - READ-ONLY; Sent bytes on the integration runtime node. + SentBytes *float64 `json:"sentBytes,omitempty"` + // ReceivedBytes - READ-ONLY; Received bytes on the integration runtime node. + ReceivedBytes *float64 `json:"receivedBytes,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeNodeMonitoringData. +func (irnmd IntegrationRuntimeNodeMonitoringData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + for k, v := range irnmd.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeNodeMonitoringData struct. +func (irnmd *IntegrationRuntimeNodeMonitoringData) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irnmd.AdditionalProperties == nil { + irnmd.AdditionalProperties = make(map[string]interface{}) + } + irnmd.AdditionalProperties[k] = additionalProperties + } + case "nodeName": + if v != nil { + var nodeName string + err = json.Unmarshal(*v, &nodeName) + if err != nil { + return err + } + irnmd.NodeName = &nodeName + } + case "availableMemoryInMB": + if v != nil { + var availableMemoryInMB int32 + err = json.Unmarshal(*v, &availableMemoryInMB) + if err != nil { + return err + } + irnmd.AvailableMemoryInMB = &availableMemoryInMB + } + case "cpuUtilization": + if v != nil { + var CPUUtilization int32 + err = json.Unmarshal(*v, &CPUUtilization) + if err != nil { + return err + } + irnmd.CPUUtilization = &CPUUtilization + } + case "concurrentJobsLimit": + if v != nil { + var concurrentJobsLimit int32 + err = json.Unmarshal(*v, &concurrentJobsLimit) + if err != nil { + return err + } + irnmd.ConcurrentJobsLimit = &concurrentJobsLimit + } + case "concurrentJobsRunning": + if v != nil { + var concurrentJobsRunning int32 + err = json.Unmarshal(*v, &concurrentJobsRunning) + if err != nil { + return err + } + irnmd.ConcurrentJobsRunning = &concurrentJobsRunning + } + case "maxConcurrentJobs": + if v != nil { + var maxConcurrentJobs int32 + err = json.Unmarshal(*v, &maxConcurrentJobs) + if err != nil { + return err + } + irnmd.MaxConcurrentJobs = &maxConcurrentJobs + } + case "sentBytes": + if v != nil { + var sentBytes float64 + err = json.Unmarshal(*v, &sentBytes) + if err != nil { + return err + } + irnmd.SentBytes = &sentBytes + } + case "receivedBytes": + if v != nil { + var receivedBytes float64 + err = json.Unmarshal(*v, &receivedBytes) + if err != nil { + return err + } + irnmd.ReceivedBytes = &receivedBytes + } + } + } + + return nil +} + +// IntegrationRuntimeObjectMetadataRefreshFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type IntegrationRuntimeObjectMetadataRefreshFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimeObjectMetadataClient) (SsisObjectMetadataStatusResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimeObjectMetadataRefreshFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimeObjectMetadataRefreshFuture.Result. +func (future *IntegrationRuntimeObjectMetadataRefreshFuture) result(client IntegrationRuntimeObjectMetadataClient) (somsr SsisObjectMetadataStatusResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataRefreshFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + somsr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimeObjectMetadataRefreshFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if somsr.Response.Response, err = future.GetResult(sender); err == nil && somsr.Response.Response.StatusCode != http.StatusNoContent { + somsr, err = client.RefreshResponder(somsr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataRefreshFuture", "Result", somsr.Response.Response, "Failure responding to request") + } + } + return +} + +// IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint azure-SSIS integration runtime outbound +// network dependency endpoints for one category. +type IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint struct { + // Category - The category of outbound network dependency. + Category *string `json:"category,omitempty"` + // Endpoints - The endpoints for outbound network dependency. + Endpoints *[]IntegrationRuntimeOutboundNetworkDependenciesEndpoint `json:"endpoints,omitempty"` +} + +// IntegrationRuntimeOutboundNetworkDependenciesEndpoint the endpoint for Azure-SSIS integration runtime +// outbound network dependency. +type IntegrationRuntimeOutboundNetworkDependenciesEndpoint struct { + // DomainName - The domain name of endpoint. + DomainName *string `json:"domainName,omitempty"` + // EndpointDetails - The details of endpoint. + EndpointDetails *[]IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails `json:"endpointDetails,omitempty"` +} + +// IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails the details of Azure-SSIS integration +// runtime outbound network dependency endpoint. +type IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails struct { + // Port - The port of endpoint. + Port *int32 `json:"port,omitempty"` +} + +// IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse azure-SSIS integration runtime outbound +// network dependency endpoints. +type IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse struct { + autorest.Response `json:"-"` + // Value - The list of outbound network dependency endpoints. + Value *[]IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint `json:"value,omitempty"` +} + +// IntegrationRuntimeRegenerateKeyParameters parameters to regenerate the authentication key. +type IntegrationRuntimeRegenerateKeyParameters struct { + // KeyName - The name of the authentication key to regenerate. Possible values include: 'IntegrationRuntimeAuthKeyNameAuthKey1', 'IntegrationRuntimeAuthKeyNameAuthKey2' + KeyName IntegrationRuntimeAuthKeyName `json:"keyName,omitempty"` +} + +// IntegrationRuntimeResource integration runtime resource type. +type IntegrationRuntimeResource struct { + autorest.Response `json:"-"` + // Properties - Integration runtime properties. + Properties BasicIntegrationRuntime `json:"properties,omitempty"` + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeResource. +func (irr IntegrationRuntimeResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = irr.Properties + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeResource struct. +func (irr *IntegrationRuntimeResource) 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 := unmarshalBasicIntegrationRuntime(*v) + if err != nil { + return err + } + irr.Properties = properties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + irr.Etag = &etag + } + 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 + } + } + } + + return nil +} + +// IntegrationRuntimesCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type IntegrationRuntimesCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimesClient) (IntegrationRuntimeResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimesCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimesCreateFuture.Result. +func (future *IntegrationRuntimesCreateFuture) result(client IntegrationRuntimesClient) (irr IntegrationRuntimeResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + irr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if irr.Response.Response, err = future.GetResult(sender); err == nil && irr.Response.Response.StatusCode != http.StatusNoContent { + irr, err = client.CreateResponder(irr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesCreateFuture", "Result", irr.Response.Response, "Failure responding to request") + } + } + return +} + +// IntegrationRuntimesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type IntegrationRuntimesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimesDeleteFuture.Result. +func (future *IntegrationRuntimesDeleteFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// IntegrationRuntimesDisableInteractiveQueryFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type IntegrationRuntimesDisableInteractiveQueryFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimesDisableInteractiveQueryFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimesDisableInteractiveQueryFuture.Result. +func (future *IntegrationRuntimesDisableInteractiveQueryFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesDisableInteractiveQueryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesDisableInteractiveQueryFuture") + return + } + ar.Response = future.Response() + return +} + +// IntegrationRuntimesEnableInteractiveQueryFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type IntegrationRuntimesEnableInteractiveQueryFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimesEnableInteractiveQueryFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimesEnableInteractiveQueryFuture.Result. +func (future *IntegrationRuntimesEnableInteractiveQueryFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesEnableInteractiveQueryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesEnableInteractiveQueryFuture") + return + } + ar.Response = future.Response() + return +} + +// IntegrationRuntimeSsisCatalogInfo catalog information for managed dedicated integration runtime. +type IntegrationRuntimeSsisCatalogInfo struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // CatalogServerEndpoint - The catalog database server URL. + CatalogServerEndpoint *string `json:"catalogServerEndpoint,omitempty"` + // CatalogAdminUserName - The administrator user name of catalog database. + CatalogAdminUserName *string `json:"catalogAdminUserName,omitempty"` + // CatalogAdminPassword - The password of the administrator user account of the catalog database. + CatalogAdminPassword *SecureString `json:"catalogAdminPassword,omitempty"` + // CatalogPricingTier - The pricing tier for the catalog database. The valid values could be found in https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible values include: 'IntegrationRuntimeSsisCatalogPricingTierBasic', 'IntegrationRuntimeSsisCatalogPricingTierStandard', 'IntegrationRuntimeSsisCatalogPricingTierPremium', 'IntegrationRuntimeSsisCatalogPricingTierPremiumRS' + CatalogPricingTier IntegrationRuntimeSsisCatalogPricingTier `json:"catalogPricingTier,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisCatalogInfo. +func (irsci IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if irsci.CatalogServerEndpoint != nil { + objectMap["catalogServerEndpoint"] = irsci.CatalogServerEndpoint + } + if irsci.CatalogAdminUserName != nil { + objectMap["catalogAdminUserName"] = irsci.CatalogAdminUserName + } + if irsci.CatalogAdminPassword != nil { + objectMap["catalogAdminPassword"] = irsci.CatalogAdminPassword + } + if irsci.CatalogPricingTier != "" { + objectMap["catalogPricingTier"] = irsci.CatalogPricingTier + } + for k, v := range irsci.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeSsisCatalogInfo struct. +func (irsci *IntegrationRuntimeSsisCatalogInfo) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irsci.AdditionalProperties == nil { + irsci.AdditionalProperties = make(map[string]interface{}) + } + irsci.AdditionalProperties[k] = additionalProperties + } + case "catalogServerEndpoint": + if v != nil { + var catalogServerEndpoint string + err = json.Unmarshal(*v, &catalogServerEndpoint) + if err != nil { + return err + } + irsci.CatalogServerEndpoint = &catalogServerEndpoint + } + case "catalogAdminUserName": + if v != nil { + var catalogAdminUserName string + err = json.Unmarshal(*v, &catalogAdminUserName) + if err != nil { + return err + } + irsci.CatalogAdminUserName = &catalogAdminUserName + } + case "catalogAdminPassword": + if v != nil { + var catalogAdminPassword SecureString + err = json.Unmarshal(*v, &catalogAdminPassword) + if err != nil { + return err + } + irsci.CatalogAdminPassword = &catalogAdminPassword + } + case "catalogPricingTier": + if v != nil { + var catalogPricingTier IntegrationRuntimeSsisCatalogPricingTier + err = json.Unmarshal(*v, &catalogPricingTier) + if err != nil { + return err + } + irsci.CatalogPricingTier = catalogPricingTier + } + } + } + + return nil +} + +// IntegrationRuntimeSsisProperties SSIS properties for managed integration runtime. +type IntegrationRuntimeSsisProperties struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // CatalogInfo - Catalog information for managed dedicated integration runtime. + CatalogInfo *IntegrationRuntimeSsisCatalogInfo `json:"catalogInfo,omitempty"` + // LicenseType - License type for bringing your own license scenario. Possible values include: 'IntegrationRuntimeLicenseTypeBasePrice', 'IntegrationRuntimeLicenseTypeLicenseIncluded' + LicenseType IntegrationRuntimeLicenseType `json:"licenseType,omitempty"` + // CustomSetupScriptProperties - Custom setup script properties for a managed dedicated integration runtime. + CustomSetupScriptProperties *IntegrationRuntimeCustomSetupScriptProperties `json:"customSetupScriptProperties,omitempty"` + // DataProxyProperties - Data proxy properties for a managed dedicated integration runtime. + DataProxyProperties *IntegrationRuntimeDataProxyProperties `json:"dataProxyProperties,omitempty"` + // Edition - The edition for the SSIS Integration Runtime. Possible values include: 'IntegrationRuntimeEditionStandard', 'IntegrationRuntimeEditionEnterprise' + Edition IntegrationRuntimeEdition `json:"edition,omitempty"` + // ExpressCustomSetupProperties - Custom setup without script properties for a SSIS integration runtime. + ExpressCustomSetupProperties *[]BasicCustomSetupBase `json:"expressCustomSetupProperties,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisProperties. +func (irsp IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if irsp.CatalogInfo != nil { + objectMap["catalogInfo"] = irsp.CatalogInfo + } + if irsp.LicenseType != "" { + objectMap["licenseType"] = irsp.LicenseType + } + if irsp.CustomSetupScriptProperties != nil { + objectMap["customSetupScriptProperties"] = irsp.CustomSetupScriptProperties + } + if irsp.DataProxyProperties != nil { + objectMap["dataProxyProperties"] = irsp.DataProxyProperties + } + if irsp.Edition != "" { + objectMap["edition"] = irsp.Edition + } + if irsp.ExpressCustomSetupProperties != nil { + objectMap["expressCustomSetupProperties"] = irsp.ExpressCustomSetupProperties + } + for k, v := range irsp.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeSsisProperties struct. +func (irsp *IntegrationRuntimeSsisProperties) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irsp.AdditionalProperties == nil { + irsp.AdditionalProperties = make(map[string]interface{}) + } + irsp.AdditionalProperties[k] = additionalProperties + } + case "catalogInfo": + if v != nil { + var catalogInfo IntegrationRuntimeSsisCatalogInfo + err = json.Unmarshal(*v, &catalogInfo) + if err != nil { + return err + } + irsp.CatalogInfo = &catalogInfo + } + case "licenseType": + if v != nil { + var licenseType IntegrationRuntimeLicenseType + err = json.Unmarshal(*v, &licenseType) + if err != nil { + return err + } + irsp.LicenseType = licenseType + } + case "customSetupScriptProperties": + if v != nil { + var customSetupScriptProperties IntegrationRuntimeCustomSetupScriptProperties + err = json.Unmarshal(*v, &customSetupScriptProperties) + if err != nil { + return err + } + irsp.CustomSetupScriptProperties = &customSetupScriptProperties + } + case "dataProxyProperties": + if v != nil { + var dataProxyProperties IntegrationRuntimeDataProxyProperties + err = json.Unmarshal(*v, &dataProxyProperties) + if err != nil { + return err + } + irsp.DataProxyProperties = &dataProxyProperties + } + case "edition": + if v != nil { + var edition IntegrationRuntimeEdition + err = json.Unmarshal(*v, &edition) + if err != nil { + return err + } + irsp.Edition = edition + } + case "expressCustomSetupProperties": + if v != nil { + expressCustomSetupProperties, err := unmarshalBasicCustomSetupBaseArray(*v) + if err != nil { + return err + } + irsp.ExpressCustomSetupProperties = &expressCustomSetupProperties + } + } + } + + return nil +} + +// IntegrationRuntimesStartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type IntegrationRuntimesStartFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimesClient) (IntegrationRuntimeStatusResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimesStartFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimesStartFuture.Result. +func (future *IntegrationRuntimesStartFuture) result(client IntegrationRuntimesClient) (irsr IntegrationRuntimeStatusResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + irsr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesStartFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if irsr.Response.Response, err = future.GetResult(sender); err == nil && irsr.Response.Response.StatusCode != http.StatusNoContent { + irsr, err = client.StartResponder(irsr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesStartFuture", "Result", irsr.Response.Response, "Failure responding to request") + } + } + return +} + +// IntegrationRuntimesStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IntegrationRuntimesStopFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IntegrationRuntimesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IntegrationRuntimesStopFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IntegrationRuntimesStopFuture.Result. +func (future *IntegrationRuntimesStopFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesStopFuture") + return + } + ar.Response = future.Response() + return +} + +// BasicIntegrationRuntimeStatus integration runtime status. +type BasicIntegrationRuntimeStatus interface { + AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) + AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) + AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) +} + +// IntegrationRuntimeStatus integration runtime status. +type IntegrationRuntimeStatus struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to. + DataFactoryName *string `json:"dataFactoryName,omitempty"` + // State - READ-ONLY; The state of integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' + State IntegrationRuntimeState `json:"state,omitempty"` + // Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted' + Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"` +} + +func unmarshalBasicIntegrationRuntimeStatus(body []byte) (BasicIntegrationRuntimeStatus, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeBasicIntegrationRuntimeStatusTypeManaged): + var mirs ManagedIntegrationRuntimeStatus + err := json.Unmarshal(body, &mirs) + return mirs, err + case string(TypeBasicIntegrationRuntimeStatusTypeSelfHosted): + var shirs SelfHostedIntegrationRuntimeStatus + err := json.Unmarshal(body, &shirs) + return shirs, err + default: + var irs IntegrationRuntimeStatus + err := json.Unmarshal(body, &irs) + return irs, err + } +} +func unmarshalBasicIntegrationRuntimeStatusArray(body []byte) ([]BasicIntegrationRuntimeStatus, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + irsArray := make([]BasicIntegrationRuntimeStatus, len(rawMessages)) + + for index, rawMessage := range rawMessages { + irs, err := unmarshalBasicIntegrationRuntimeStatus(*rawMessage) + if err != nil { + return nil, err + } + irsArray[index] = irs + } + return irsArray, nil +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeStatus. +func (irs IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + irs.Type = TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus + objectMap := make(map[string]interface{}) + if irs.Type != "" { + objectMap["type"] = irs.Type + } + for k, v := range irs.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. +func (irs IntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) { + return nil, false +} + +// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. +func (irs IntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) { + return nil, false +} + +// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. +func (irs IntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) { + return &irs, true +} + +// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. +func (irs IntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) { + return &irs, true +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatus struct. +func (irs *IntegrationRuntimeStatus) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irs.AdditionalProperties == nil { + irs.AdditionalProperties = make(map[string]interface{}) + } + irs.AdditionalProperties[k] = additionalProperties + } + case "dataFactoryName": + if v != nil { + var dataFactoryName string + err = json.Unmarshal(*v, &dataFactoryName) + if err != nil { + return err + } + irs.DataFactoryName = &dataFactoryName + } + case "state": + if v != nil { + var state IntegrationRuntimeState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + irs.State = state + } + case "type": + if v != nil { + var typeVar TypeBasicIntegrationRuntimeStatus + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + irs.Type = typeVar + } + } + } + + return nil +} + +// IntegrationRuntimeStatusResponse integration runtime status response. +type IntegrationRuntimeStatusResponse struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; The integration runtime name. + Name *string `json:"name,omitempty"` + // Properties - Integration runtime properties. + Properties BasicIntegrationRuntimeStatus `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeStatusResponse. +func (irsr IntegrationRuntimeStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = irsr.Properties + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatusResponse struct. +func (irsr *IntegrationRuntimeStatusResponse) 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 + } + irsr.Name = &name + } + case "properties": + if v != nil { + properties, err := unmarshalBasicIntegrationRuntimeStatus(*v) + if err != nil { + return err + } + irsr.Properties = properties + } + } + } + + return nil +} + +// IntegrationRuntimeVNetProperties vNet properties for managed integration runtime. +type IntegrationRuntimeVNetProperties struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // VNetID - The ID of the VNet that this integration runtime will join. + 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"` + // SubnetID - The ID of subnet, to which this Azure-SSIS integration runtime will be joined. + SubnetID *string `json:"subnetId,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationRuntimeVNetProperties. +func (irvnp IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if irvnp.VNetID != nil { + objectMap["vNetId"] = irvnp.VNetID + } + if irvnp.Subnet != nil { + objectMap["subnet"] = irvnp.Subnet + } + if irvnp.PublicIPs != nil { + objectMap["publicIPs"] = irvnp.PublicIPs + } + if irvnp.SubnetID != nil { + objectMap["subnetId"] = irvnp.SubnetID + } + for k, v := range irvnp.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeVNetProperties struct. +func (irvnp *IntegrationRuntimeVNetProperties) 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 { + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if irvnp.AdditionalProperties == nil { + irvnp.AdditionalProperties = make(map[string]interface{}) + } + irvnp.AdditionalProperties[k] = additionalProperties + } + case "vNetId": + if v != nil { + var vNetID string + err = json.Unmarshal(*v, &vNetID) + if err != nil { + return err + } + irvnp.VNetID = &vNetID + } + case "subnet": + if v != nil { + var subnet string + err = json.Unmarshal(*v, &subnet) + if err != nil { + return err + } + irvnp.Subnet = &subnet + } + case "publicIPs": + if v != nil { + var publicIPs []string + err = json.Unmarshal(*v, &publicIPs) + if err != nil { + return err + } + irvnp.PublicIPs = &publicIPs + } + case "subnetId": + if v != nil { + var subnetID string + err = json.Unmarshal(*v, &subnetID) + if err != nil { + return err + } + irvnp.SubnetID = &subnetID + } + } + } + + return nil +} + +// IPFirewallRuleInfo IP firewall rule +type IPFirewallRuleInfo struct { + autorest.Response `json:"-"` + // IPFirewallRuleProperties - IP firewall rule properties + *IPFirewallRuleProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPFirewallRuleInfo. +func (ifri IPFirewallRuleInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ifri.IPFirewallRuleProperties != nil { + objectMap["properties"] = ifri.IPFirewallRuleProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IPFirewallRuleInfo struct. +func (ifri *IPFirewallRuleInfo) 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 IPFirewallRuleProperties IPFirewallRuleProperties + err = json.Unmarshal(*v, &IPFirewallRuleProperties) + if err != nil { + return err + } + ifri.IPFirewallRuleProperties = &IPFirewallRuleProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ifri.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ifri.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ifri.Type = &typeVar + } + } + } + + return nil +} + +// IPFirewallRuleInfoListResult list of IP firewall rules +type IPFirewallRuleInfoListResult struct { + autorest.Response `json:"-"` + // NextLink - Link to next page of results + NextLink *string `json:"nextLink,omitempty"` + // Value - List of IP firewall rules + Value *[]IPFirewallRuleInfo `json:"value,omitempty"` +} + +// IPFirewallRuleInfoListResultIterator provides access to a complete listing of IPFirewallRuleInfo values. +type IPFirewallRuleInfoListResultIterator struct { + i int + page IPFirewallRuleInfoListResultPage +} + +// 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 *IPFirewallRuleInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRuleInfoListResultIterator.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 *IPFirewallRuleInfoListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IPFirewallRuleInfoListResultIterator) 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 IPFirewallRuleInfoListResultIterator) Response() IPFirewallRuleInfoListResult { + 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 IPFirewallRuleInfoListResultIterator) Value() IPFirewallRuleInfo { + if !iter.page.NotDone() { + return IPFirewallRuleInfo{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IPFirewallRuleInfoListResultIterator type. +func NewIPFirewallRuleInfoListResultIterator(page IPFirewallRuleInfoListResultPage) IPFirewallRuleInfoListResultIterator { + return IPFirewallRuleInfoListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ifrilr IPFirewallRuleInfoListResult) IsEmpty() bool { + return ifrilr.Value == nil || len(*ifrilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ifrilr IPFirewallRuleInfoListResult) hasNextLink() bool { + return ifrilr.NextLink != nil && len(*ifrilr.NextLink) != 0 +} + +// iPFirewallRuleInfoListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ifrilr IPFirewallRuleInfoListResult) iPFirewallRuleInfoListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ifrilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ifrilr.NextLink))) +} + +// IPFirewallRuleInfoListResultPage contains a page of IPFirewallRuleInfo values. +type IPFirewallRuleInfoListResultPage struct { + fn func(context.Context, IPFirewallRuleInfoListResult) (IPFirewallRuleInfoListResult, error) + ifrilr IPFirewallRuleInfoListResult +} + +// 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 *IPFirewallRuleInfoListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRuleInfoListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ifrilr) + if err != nil { + return err + } + page.ifrilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *IPFirewallRuleInfoListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IPFirewallRuleInfoListResultPage) NotDone() bool { + return !page.ifrilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IPFirewallRuleInfoListResultPage) Response() IPFirewallRuleInfoListResult { + return page.ifrilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IPFirewallRuleInfoListResultPage) Values() []IPFirewallRuleInfo { + if page.ifrilr.IsEmpty() { + return nil + } + return *page.ifrilr.Value +} + +// Creates a new instance of the IPFirewallRuleInfoListResultPage type. +func NewIPFirewallRuleInfoListResultPage(cur IPFirewallRuleInfoListResult, getNextPage func(context.Context, IPFirewallRuleInfoListResult) (IPFirewallRuleInfoListResult, error)) IPFirewallRuleInfoListResultPage { + return IPFirewallRuleInfoListResultPage{ + fn: getNextPage, + ifrilr: cur, + } +} + +// IPFirewallRuleProperties IP firewall rule properties +type IPFirewallRuleProperties struct { + // EndIPAddress - The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress + EndIPAddress *string `json:"endIpAddress,omitempty"` + // ProvisioningState - READ-ONLY; Resource provisioning state. Possible values include: 'ProvisioningStateProvisioning', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateFailed', 'ProvisioningStateDeleteError' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // StartIPAddress - The start IP address of the firewall rule. Must be IPv4 format + StartIPAddress *string `json:"startIpAddress,omitempty"` +} + +// MarshalJSON is the custom marshaler for IPFirewallRuleProperties. +func (ifrp IPFirewallRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ifrp.EndIPAddress != nil { + objectMap["endIpAddress"] = ifrp.EndIPAddress + } + if ifrp.StartIPAddress != nil { + objectMap["startIpAddress"] = ifrp.StartIPAddress + } + return json.Marshal(objectMap) +} + +// IPFirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type IPFirewallRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPFirewallRulesClient) (IPFirewallRuleInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPFirewallRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPFirewallRulesCreateOrUpdateFuture.Result. +func (future *IPFirewallRulesCreateOrUpdateFuture) result(client IPFirewallRulesClient) (ifri IPFirewallRuleInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ifri.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IPFirewallRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ifri.Response.Response, err = future.GetResult(sender); err == nil && ifri.Response.Response.StatusCode != http.StatusNoContent { + ifri, err = client.CreateOrUpdateResponder(ifri.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesCreateOrUpdateFuture", "Result", ifri.Response.Response, "Failure responding to request") + } + } + return +} + +// IPFirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPFirewallRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPFirewallRulesClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPFirewallRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPFirewallRulesDeleteFuture.Result. +func (future *IPFirewallRulesDeleteFuture) result(client IPFirewallRulesClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IPFirewallRulesDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeleteResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesDeleteFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// IPFirewallRulesReplaceAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type IPFirewallRulesReplaceAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(IPFirewallRulesClient) (ReplaceAllFirewallRulesOperationResponse, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *IPFirewallRulesReplaceAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for IPFirewallRulesReplaceAllFuture.Result. +func (future *IPFirewallRulesReplaceAllFuture) result(client IPFirewallRulesClient) (rafror ReplaceAllFirewallRulesOperationResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesReplaceAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rafror.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.IPFirewallRulesReplaceAllFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rafror.Response.Response, err = future.GetResult(sender); err == nil && rafror.Response.Response.StatusCode != http.StatusNoContent { + rafror, err = client.ReplaceAllResponder(rafror.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesReplaceAllFuture", "Result", rafror.Response.Response, "Failure responding to request") + } + } + return +} + +// KekIdentityProperties key encryption key properties +type KekIdentityProperties struct { + // UserAssignedIdentity - User assigned identity resource Id + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` + // UseSystemAssignedIdentity - Boolean specifying whether to use system assigned identity or not + UseSystemAssignedIdentity interface{} `json:"useSystemAssignedIdentity,omitempty"` +} + +// Key a workspace key +type Key struct { + autorest.Response `json:"-"` + // KeyProperties - Keys resource properties + *KeyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Key. +func (kVar Key) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if kVar.KeyProperties != nil { + objectMap["properties"] = kVar.KeyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Key struct. +func (kVar *Key) 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 keyProperties KeyProperties + err = json.Unmarshal(*v, &keyProperties) + if err != nil { + return err + } + kVar.KeyProperties = &keyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + kVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + kVar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + kVar.Type = &typeVar + } + } + } + + return nil +} + +// KeyInfoListResult list of keys +type KeyInfoListResult struct { + autorest.Response `json:"-"` + // NextLink - Link to the next page of results + NextLink *string `json:"nextLink,omitempty"` + // Value - List of keys + Value *[]Key `json:"value,omitempty"` +} + +// KeyInfoListResultIterator provides access to a complete listing of Key values. +type KeyInfoListResultIterator struct { + i int + page KeyInfoListResultPage +} + +// 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 *KeyInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeyInfoListResultIterator.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 *KeyInfoListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter KeyInfoListResultIterator) 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 KeyInfoListResultIterator) Response() KeyInfoListResult { + 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 KeyInfoListResultIterator) Value() Key { + if !iter.page.NotDone() { + return Key{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the KeyInfoListResultIterator type. +func NewKeyInfoListResultIterator(page KeyInfoListResultPage) KeyInfoListResultIterator { + return KeyInfoListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (kilr KeyInfoListResult) IsEmpty() bool { + return kilr.Value == nil || len(*kilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (kilr KeyInfoListResult) hasNextLink() bool { + return kilr.NextLink != nil && len(*kilr.NextLink) != 0 +} + +// keyInfoListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (kilr KeyInfoListResult) keyInfoListResultPreparer(ctx context.Context) (*http.Request, error) { + if !kilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(kilr.NextLink))) +} + +// KeyInfoListResultPage contains a page of Key values. +type KeyInfoListResultPage struct { + fn func(context.Context, KeyInfoListResult) (KeyInfoListResult, error) + kilr KeyInfoListResult +} + +// 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 *KeyInfoListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/KeyInfoListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.kilr) + if err != nil { + return err + } + page.kilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *KeyInfoListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page KeyInfoListResultPage) NotDone() bool { + return !page.kilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page KeyInfoListResultPage) Response() KeyInfoListResult { + return page.kilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page KeyInfoListResultPage) Values() []Key { + if page.kilr.IsEmpty() { + return nil + } + return *page.kilr.Value +} + +// Creates a new instance of the KeyInfoListResultPage type. +func NewKeyInfoListResultPage(cur KeyInfoListResult, getNextPage func(context.Context, KeyInfoListResult) (KeyInfoListResult, error)) KeyInfoListResultPage { + return KeyInfoListResultPage{ + fn: getNextPage, + kilr: cur, + } +} + +// KeyProperties key properties +type KeyProperties struct { + // IsActiveCMK - Used to activate the workspace after a customer managed key is provided. + IsActiveCMK *bool `json:"isActiveCMK,omitempty"` + // KeyVaultURL - The Key Vault Url of the workspace key. + KeyVaultURL *string `json:"keyVaultUrl,omitempty"` +} + +// LibraryInfo library/package information of a Big Data pool powered by Apache Spark +type LibraryInfo struct { + // Name - Name of the library. + Name *string `json:"name,omitempty"` + // Path - Storage blob path of library. + Path *string `json:"path,omitempty"` + // ContainerName - Storage blob container name. + ContainerName *string `json:"containerName,omitempty"` + // UploadedTimestamp - READ-ONLY; The last update time of the library. + UploadedTimestamp *date.Time `json:"uploadedTimestamp,omitempty"` + // Type - Type of the library. + Type *string `json:"type,omitempty"` + // ProvisioningStatus - READ-ONLY; Provisioning status of the library/package. + ProvisioningStatus *string `json:"provisioningStatus,omitempty"` + // CreatorID - READ-ONLY; Creator Id of the library/package. + CreatorID *string `json:"creatorId,omitempty"` +} + +// MarshalJSON is the custom marshaler for LibraryInfo. +func (li LibraryInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if li.Name != nil { + objectMap["name"] = li.Name + } + if li.Path != nil { + objectMap["path"] = li.Path + } + if li.ContainerName != nil { + objectMap["containerName"] = li.ContainerName + } + if li.Type != nil { + objectMap["type"] = li.Type + } + return json.Marshal(objectMap) +} + +// LibraryListResponse a list of Library resources. +type LibraryListResponse struct { + autorest.Response `json:"-"` + // Value - List of Library. + Value *[]LibraryResource `json:"value,omitempty"` + // NextLink - The link to the next page of results, if any remaining results exist. + NextLink *string `json:"nextLink,omitempty"` +} + +// LibraryListResponseIterator provides access to a complete listing of LibraryResource values. +type LibraryListResponseIterator struct { + i int + page LibraryListResponsePage +} + +// 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 *LibraryListResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LibraryListResponseIterator.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 *LibraryListResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LibraryListResponseIterator) 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 LibraryListResponseIterator) Response() LibraryListResponse { + 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 LibraryListResponseIterator) Value() LibraryResource { + if !iter.page.NotDone() { + return LibraryResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LibraryListResponseIterator type. +func NewLibraryListResponseIterator(page LibraryListResponsePage) LibraryListResponseIterator { + return LibraryListResponseIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (llr LibraryListResponse) IsEmpty() bool { + return llr.Value == nil || len(*llr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (llr LibraryListResponse) hasNextLink() bool { + return llr.NextLink != nil && len(*llr.NextLink) != 0 +} + +// libraryListResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (llr LibraryListResponse) libraryListResponsePreparer(ctx context.Context) (*http.Request, error) { + if !llr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(llr.NextLink))) +} + +// LibraryListResponsePage contains a page of LibraryResource values. +type LibraryListResponsePage struct { + fn func(context.Context, LibraryListResponse) (LibraryListResponse, error) + llr LibraryListResponse +} + +// 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 *LibraryListResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LibraryListResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.llr) + if err != nil { + return err + } + page.llr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *LibraryListResponsePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LibraryListResponsePage) NotDone() bool { + return !page.llr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LibraryListResponsePage) Response() LibraryListResponse { + return page.llr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LibraryListResponsePage) Values() []LibraryResource { + if page.llr.IsEmpty() { + return nil + } + return *page.llr.Value +} + +// Creates a new instance of the LibraryListResponsePage type. +func NewLibraryListResponsePage(cur LibraryListResponse, getNextPage func(context.Context, LibraryListResponse) (LibraryListResponse, error)) LibraryListResponsePage { + return LibraryListResponsePage{ + fn: getNextPage, + llr: cur, + } +} + +// LibraryRequirements library requirements for a Big Data pool powered by Apache Spark +type LibraryRequirements struct { + // Time - READ-ONLY; The last update time of the library requirements file. + Time *date.Time `json:"time,omitempty"` + // Content - The library requirements. + Content *string `json:"content,omitempty"` + // Filename - The filename of the library requirements file. + Filename *string `json:"filename,omitempty"` +} + +// MarshalJSON is the custom marshaler for LibraryRequirements. +func (lr LibraryRequirements) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lr.Content != nil { + objectMap["content"] = lr.Content + } + if lr.Filename != nil { + objectMap["filename"] = lr.Filename + } + return json.Marshal(objectMap) +} + +// LibraryResource library response details +type LibraryResource struct { + autorest.Response `json:"-"` + // LibraryInfo - Library/package properties. + *LibraryInfo `json:"properties,omitempty"` + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for LibraryResource. +func (lr LibraryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lr.LibraryInfo != nil { + objectMap["properties"] = lr.LibraryInfo + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LibraryResource struct. +func (lr *LibraryResource) 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 libraryInfo LibraryInfo + err = json.Unmarshal(*v, &libraryInfo) + if err != nil { + return err + } + lr.LibraryInfo = &libraryInfo + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lr.Type = &typeVar + } + } + } + + return nil +} + +// LicensedComponentSetupTypeProperties installation of licensed component setup type properties. +type LicensedComponentSetupTypeProperties struct { + // ComponentName - The name of the 3rd party component. + ComponentName *string `json:"componentName,omitempty"` + // LicenseKey - The license key to activate the component. + LicenseKey BasicSecretBase `json:"licenseKey,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for LicensedComponentSetupTypeProperties struct. +func (lcstp *LicensedComponentSetupTypeProperties) 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 "componentName": + if v != nil { + var componentName string + err = json.Unmarshal(*v, &componentName) + if err != nil { + return err + } + lcstp.ComponentName = &componentName + } + case "licenseKey": + if v != nil { + licenseKey, err := unmarshalBasicSecretBase(*v) + if err != nil { + return err + } + lcstp.LicenseKey = licenseKey + } + } + } + + return nil +} + +// LinkedIntegrationRuntime the linked integration runtime information. +type LinkedIntegrationRuntime struct { + // Name - READ-ONLY; The name of the linked integration runtime. + Name *string `json:"name,omitempty"` + // SubscriptionID - READ-ONLY; The subscription ID for which the linked integration runtime belong to. + SubscriptionID *string `json:"subscriptionId,omitempty"` + // DataFactoryName - READ-ONLY; The name of the workspace for which the linked integration runtime belong to. + DataFactoryName *string `json:"dataFactoryName,omitempty"` + // DataFactoryLocation - READ-ONLY; The location of the workspace for which the linked integration runtime belong to. + DataFactoryLocation *string `json:"dataFactoryLocation,omitempty"` + // CreateTime - READ-ONLY; The creating time of the linked integration runtime. + CreateTime *date.Time `json:"createTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for LinkedIntegrationRuntime. +func (lir LinkedIntegrationRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// LinkedIntegrationRuntimeKeyAuthorization the key authorization type integration runtime. +type LinkedIntegrationRuntimeKeyAuthorization struct { + // Key - The key used for authorization. + Key *SecureString `json:"key,omitempty"` + // AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC' + AuthorizationType AuthorizationType `json:"authorizationType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeKeyAuthorization. +func (lirka LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) { + lirka.AuthorizationType = AuthorizationTypeKey + objectMap := make(map[string]interface{}) + if lirka.Key != nil { + objectMap["key"] = lirka.Key + } + if lirka.AuthorizationType != "" { + objectMap["authorizationType"] = lirka.AuthorizationType + } + return json.Marshal(objectMap) +} + +// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. +func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) { + return &lirka, true +} + +// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. +func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) { + return nil, false +} + +// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. +func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) { + return nil, false +} + +// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. +func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) { + return &lirka, true +} + +// LinkedIntegrationRuntimeRbacAuthorization the role based access control (RBAC) authorization type +// integration runtime. +type LinkedIntegrationRuntimeRbacAuthorization struct { + // ResourceID - The resource identifier of the integration runtime to be shared. + ResourceID *string `json:"resourceId,omitempty"` + // AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC' + AuthorizationType AuthorizationType `json:"authorizationType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeRbacAuthorization. +func (lirra LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) { + lirra.AuthorizationType = AuthorizationTypeRBAC + objectMap := make(map[string]interface{}) + if lirra.ResourceID != nil { + objectMap["resourceId"] = lirra.ResourceID + } + if lirra.AuthorizationType != "" { + objectMap["authorizationType"] = lirra.AuthorizationType + } + return json.Marshal(objectMap) +} + +// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. +func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) { + return nil, false +} + +// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. +func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) { + return &lirra, true +} + +// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. +func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) { + return nil, false +} + +// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. +func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) { + return &lirra, true +} + +// BasicLinkedIntegrationRuntimeType the base definition of a linked integration runtime. +type BasicLinkedIntegrationRuntimeType interface { + AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) + AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) + AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) +} + +// LinkedIntegrationRuntimeType the base definition of a linked integration runtime. +type LinkedIntegrationRuntimeType struct { + // AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC' + AuthorizationType AuthorizationType `json:"authorizationType,omitempty"` +} + +func unmarshalBasicLinkedIntegrationRuntimeType(body []byte) (BasicLinkedIntegrationRuntimeType, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["authorizationType"] { + case string(AuthorizationTypeKey): + var lirka LinkedIntegrationRuntimeKeyAuthorization + err := json.Unmarshal(body, &lirka) + return lirka, err + case string(AuthorizationTypeRBAC): + var lirra LinkedIntegrationRuntimeRbacAuthorization + err := json.Unmarshal(body, &lirra) + return lirra, err + default: + var lirt LinkedIntegrationRuntimeType + err := json.Unmarshal(body, &lirt) + return lirt, err + } +} +func unmarshalBasicLinkedIntegrationRuntimeTypeArray(body []byte) ([]BasicLinkedIntegrationRuntimeType, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + lirtArray := make([]BasicLinkedIntegrationRuntimeType, len(rawMessages)) + + for index, rawMessage := range rawMessages { + lirt, err := unmarshalBasicLinkedIntegrationRuntimeType(*rawMessage) + if err != nil { + return nil, err + } + lirtArray[index] = lirt + } + return lirtArray, nil +} + +// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeType. +func (lirt LinkedIntegrationRuntimeType) MarshalJSON() ([]byte, error) { + lirt.AuthorizationType = AuthorizationTypeLinkedIntegrationRuntimeType + objectMap := make(map[string]interface{}) + if lirt.AuthorizationType != "" { + objectMap["authorizationType"] = lirt.AuthorizationType + } + return json.Marshal(objectMap) +} + +// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. +func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) { + return nil, false +} + +// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. +func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) { + return nil, false +} + +// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. +func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) { + return &lirt, true +} + +// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. +func (lirt LinkedIntegrationRuntimeType) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) { + return &lirt, true +} + +// ListAvailableRpOperation ... +type ListAvailableRpOperation struct { + autorest.Response `json:"-"` + Value *[]AvailableRpOperation `json:"value,omitempty"` +} + +// ListSQLPoolSecurityAlertPolicies a list of SQL pool security alert policies. +type ListSQLPoolSecurityAlertPolicies struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolSecurityAlertPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ListSQLPoolSecurityAlertPolicies. +func (lspsap ListSQLPoolSecurityAlertPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ListSQLPoolSecurityAlertPoliciesIterator provides access to a complete listing of +// SQLPoolSecurityAlertPolicy values. +type ListSQLPoolSecurityAlertPoliciesIterator struct { + i int + page ListSQLPoolSecurityAlertPoliciesPage +} + +// 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 *ListSQLPoolSecurityAlertPoliciesIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListSQLPoolSecurityAlertPoliciesIterator.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 *ListSQLPoolSecurityAlertPoliciesIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListSQLPoolSecurityAlertPoliciesIterator) 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 ListSQLPoolSecurityAlertPoliciesIterator) Response() ListSQLPoolSecurityAlertPolicies { + 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 ListSQLPoolSecurityAlertPoliciesIterator) Value() SQLPoolSecurityAlertPolicy { + if !iter.page.NotDone() { + return SQLPoolSecurityAlertPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListSQLPoolSecurityAlertPoliciesIterator type. +func NewListSQLPoolSecurityAlertPoliciesIterator(page ListSQLPoolSecurityAlertPoliciesPage) ListSQLPoolSecurityAlertPoliciesIterator { + return ListSQLPoolSecurityAlertPoliciesIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lspsap ListSQLPoolSecurityAlertPolicies) IsEmpty() bool { + return lspsap.Value == nil || len(*lspsap.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lspsap ListSQLPoolSecurityAlertPolicies) hasNextLink() bool { + return lspsap.NextLink != nil && len(*lspsap.NextLink) != 0 +} + +// listSQLPoolSecurityAlertPoliciesPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lspsap ListSQLPoolSecurityAlertPolicies) listSQLPoolSecurityAlertPoliciesPreparer(ctx context.Context) (*http.Request, error) { + if !lspsap.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lspsap.NextLink))) +} + +// ListSQLPoolSecurityAlertPoliciesPage contains a page of SQLPoolSecurityAlertPolicy values. +type ListSQLPoolSecurityAlertPoliciesPage struct { + fn func(context.Context, ListSQLPoolSecurityAlertPolicies) (ListSQLPoolSecurityAlertPolicies, error) + lspsap ListSQLPoolSecurityAlertPolicies +} + +// 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 *ListSQLPoolSecurityAlertPoliciesPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListSQLPoolSecurityAlertPoliciesPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lspsap) + if err != nil { + return err + } + page.lspsap = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ListSQLPoolSecurityAlertPoliciesPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListSQLPoolSecurityAlertPoliciesPage) NotDone() bool { + return !page.lspsap.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListSQLPoolSecurityAlertPoliciesPage) Response() ListSQLPoolSecurityAlertPolicies { + return page.lspsap +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListSQLPoolSecurityAlertPoliciesPage) Values() []SQLPoolSecurityAlertPolicy { + if page.lspsap.IsEmpty() { + return nil + } + return *page.lspsap.Value +} + +// Creates a new instance of the ListSQLPoolSecurityAlertPoliciesPage type. +func NewListSQLPoolSecurityAlertPoliciesPage(cur ListSQLPoolSecurityAlertPolicies, getNextPage func(context.Context, ListSQLPoolSecurityAlertPolicies) (ListSQLPoolSecurityAlertPolicies, error)) ListSQLPoolSecurityAlertPoliciesPage { + return ListSQLPoolSecurityAlertPoliciesPage{ + fn: getNextPage, + lspsap: cur, + } +} + +// MaintenanceWindowOptions maintenance window options. +type MaintenanceWindowOptions struct { + autorest.Response `json:"-"` + // MaintenanceWindowOptionsProperties - Resource properties. + *MaintenanceWindowOptionsProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MaintenanceWindowOptions. +func (mwo MaintenanceWindowOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mwo.MaintenanceWindowOptionsProperties != nil { + objectMap["properties"] = mwo.MaintenanceWindowOptionsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MaintenanceWindowOptions struct. +func (mwo *MaintenanceWindowOptions) 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 maintenanceWindowOptionsProperties MaintenanceWindowOptionsProperties + err = json.Unmarshal(*v, &maintenanceWindowOptionsProperties) + if err != nil { + return err + } + mwo.MaintenanceWindowOptionsProperties = &maintenanceWindowOptionsProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mwo.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mwo.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mwo.Type = &typeVar + } + } + } + + return nil +} + +// MaintenanceWindowOptionsProperties maintenance window options properties. +type MaintenanceWindowOptionsProperties struct { + // IsEnabled - Whether maintenance windows are enabled for the database. + IsEnabled *bool `json:"isEnabled,omitempty"` + // MaintenanceWindowCycles - Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. + MaintenanceWindowCycles *[]MaintenanceWindowTimeRange `json:"maintenanceWindowCycles,omitempty"` + // MinDurationInMinutes - Minimum duration of maintenance window. + MinDurationInMinutes *int32 `json:"minDurationInMinutes,omitempty"` + // DefaultDurationInMinutes - Default duration for maintenance window. + DefaultDurationInMinutes *int32 `json:"defaultDurationInMinutes,omitempty"` + // MinCycles - Minimum number of maintenance windows cycles to be set on the database. + MinCycles *int32 `json:"minCycles,omitempty"` + // TimeGranularityInMinutes - Time granularity in minutes for maintenance windows. + TimeGranularityInMinutes *int32 `json:"timeGranularityInMinutes,omitempty"` + // AllowMultipleMaintenanceWindowsPerCycle - Whether we allow multiple maintenance windows per cycle. + AllowMultipleMaintenanceWindowsPerCycle *bool `json:"allowMultipleMaintenanceWindowsPerCycle,omitempty"` +} + +// MaintenanceWindows maintenance windows. +type MaintenanceWindows struct { + autorest.Response `json:"-"` + // MaintenanceWindowsProperties - Resource properties. + *MaintenanceWindowsProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MaintenanceWindows. +func (mw MaintenanceWindows) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mw.MaintenanceWindowsProperties != nil { + objectMap["properties"] = mw.MaintenanceWindowsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MaintenanceWindows struct. +func (mw *MaintenanceWindows) 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 maintenanceWindowsProperties MaintenanceWindowsProperties + err = json.Unmarshal(*v, &maintenanceWindowsProperties) + if err != nil { + return err + } + mw.MaintenanceWindowsProperties = &maintenanceWindowsProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mw.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mw.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mw.Type = &typeVar + } + } + } + + return nil +} + +// MaintenanceWindowsProperties maintenance windows resource properties. +type MaintenanceWindowsProperties struct { + TimeRanges *[]MaintenanceWindowTimeRange `json:"timeRanges,omitempty"` +} + +// MaintenanceWindowTimeRange maintenance window time range. +type MaintenanceWindowTimeRange struct { + // DayOfWeek - Day of maintenance window. Possible values include: 'DayOfWeekSunday', 'DayOfWeekMonday', 'DayOfWeekTuesday', 'DayOfWeekWednesday', 'DayOfWeekThursday', 'DayOfWeekFriday', 'DayOfWeekSaturday' + DayOfWeek DayOfWeek `json:"dayOfWeek,omitempty"` + // StartTime - Start time minutes offset from 12am. + StartTime *string `json:"startTime,omitempty"` + // Duration - Duration of maintenance window in minutes. + Duration *string `json:"duration,omitempty"` +} + +// ManagedIdentity the workspace managed identity +type ManagedIdentity struct { + // PrincipalID - READ-ONLY; The principal ID of the workspace managed identity + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of the workspace managed identity + TenantID *uuid.UUID `json:"tenantId,omitempty"` + // Type - The type of managed identity for the workspace. Possible values include: 'ResourceIdentityTypeNone', 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The user assigned managed identities. + UserAssignedIdentities map[string]*UserAssignedManagedIdentity `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ManagedIdentity. +func (mi ManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mi.Type != "" { + objectMap["type"] = mi.Type + } + if mi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = mi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// ManagedIdentitySQLControlSettingsModel sql Control Settings for workspace managed identity +type ManagedIdentitySQLControlSettingsModel struct { + autorest.Response `json:"-"` + // ManagedIdentitySQLControlSettingsModelProperties - Sql Control Settings for workspace managed identity + *ManagedIdentitySQLControlSettingsModelProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIdentitySQLControlSettingsModel. +func (miscsm ManagedIdentitySQLControlSettingsModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if miscsm.ManagedIdentitySQLControlSettingsModelProperties != nil { + objectMap["properties"] = miscsm.ManagedIdentitySQLControlSettingsModelProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedIdentitySQLControlSettingsModel struct. +func (miscsm *ManagedIdentitySQLControlSettingsModel) 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 managedIdentitySQLControlSettingsModelProperties ManagedIdentitySQLControlSettingsModelProperties + err = json.Unmarshal(*v, &managedIdentitySQLControlSettingsModelProperties) + if err != nil { + return err + } + miscsm.ManagedIdentitySQLControlSettingsModelProperties = &managedIdentitySQLControlSettingsModelProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + miscsm.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + miscsm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + miscsm.Type = &typeVar + } + } + } + + return nil +} + +// ManagedIdentitySQLControlSettingsModelProperties sql Control Settings for workspace managed identity +type ManagedIdentitySQLControlSettingsModelProperties struct { + // GrantSQLControlToManagedIdentity - Grant sql control to managed identity + GrantSQLControlToManagedIdentity *ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity `json:"grantSqlControlToManagedIdentity,omitempty"` +} + +// ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity grant sql control to +// managed identity +type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity struct { + // DesiredState - Desired state. Possible values include: 'DesiredStateEnabled', 'DesiredStateDisabled' + DesiredState DesiredState `json:"desiredState,omitempty"` + // ActualState - READ-ONLY; Actual state. Possible values include: 'ActualStateEnabling', 'ActualStateEnabled', 'ActualStateDisabling', 'ActualStateDisabled', 'ActualStateUnknown' + ActualState ActualState `json:"actualState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity. +func (miscsmSctmi ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if miscsmSctmi.DesiredState != "" { + objectMap["desiredState"] = miscsmSctmi.DesiredState + } + return json.Marshal(objectMap) +} + +// ManagedIntegrationRuntime managed integration runtime, including managed elastic and managed dedicated +// integration runtimes. +type ManagedIntegrationRuntime struct { + // State - READ-ONLY; Integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' + State IntegrationRuntimeState `json:"state,omitempty"` + // ManagedIntegrationRuntimeTypeProperties - Managed integration runtime properties. + *ManagedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Description - Integration runtime description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIntegrationRuntime. +func (mir ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { + mir.Type = TypeManaged + objectMap := make(map[string]interface{}) + if mir.ManagedIntegrationRuntimeTypeProperties != nil { + objectMap["typeProperties"] = mir.ManagedIntegrationRuntimeTypeProperties + } + if mir.Description != nil { + objectMap["description"] = mir.Description + } + if mir.Type != "" { + objectMap["type"] = mir.Type + } + for k, v := range mir.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. +func (mir ManagedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) { + return &mir, true +} + +// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. +func (mir ManagedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) { + return nil, false +} + +// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. +func (mir ManagedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) { + return nil, false +} + +// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. +func (mir ManagedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) { + return &mir, true +} + +// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntime struct. +func (mir *ManagedIntegrationRuntime) 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 IntegrationRuntimeState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + mir.State = state + } + case "typeProperties": + if v != nil { + var managedIntegrationRuntimeTypeProperties ManagedIntegrationRuntimeTypeProperties + err = json.Unmarshal(*v, &managedIntegrationRuntimeTypeProperties) + if err != nil { + return err + } + mir.ManagedIntegrationRuntimeTypeProperties = &managedIntegrationRuntimeTypeProperties + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if mir.AdditionalProperties == nil { + mir.AdditionalProperties = make(map[string]interface{}) + } + mir.AdditionalProperties[k] = additionalProperties + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + mir.Description = &description + } + case "type": + if v != nil { + var typeVar Type + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mir.Type = typeVar + } + } + } + + return nil +} + +// ManagedIntegrationRuntimeError error definition for managed integration runtime. +type ManagedIntegrationRuntimeError struct { + // Time - READ-ONLY; The time when the error occurred. + Time *date.Time `json:"time,omitempty"` + // Code - READ-ONLY; Error code. + Code *string `json:"code,omitempty"` + // Parameters - READ-ONLY; Managed integration runtime error parameters. + Parameters *[]string `json:"parameters,omitempty"` + // Message - READ-ONLY; Error message. + Message *string `json:"message,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeError. +func (mire ManagedIntegrationRuntimeError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ManagedIntegrationRuntimeNode properties of integration runtime node. +type ManagedIntegrationRuntimeNode struct { + // NodeID - READ-ONLY; The managed integration runtime node id. + NodeID *string `json:"nodeId,omitempty"` + // Status - READ-ONLY; The managed integration runtime node status. Possible values include: 'ManagedIntegrationRuntimeNodeStatusStarting', 'ManagedIntegrationRuntimeNodeStatusAvailable', 'ManagedIntegrationRuntimeNodeStatusRecycling', 'ManagedIntegrationRuntimeNodeStatusUnavailable' + Status ManagedIntegrationRuntimeNodeStatus `json:"status,omitempty"` + // Errors - The errors that occurred on this integration runtime node. + Errors *[]ManagedIntegrationRuntimeError `json:"errors,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeNode. +func (mirn ManagedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mirn.Errors != nil { + objectMap["errors"] = mirn.Errors + } + return json.Marshal(objectMap) +} + +// ManagedIntegrationRuntimeOperationResult properties of managed integration runtime operation result. +type ManagedIntegrationRuntimeOperationResult struct { + // Type - READ-ONLY; The operation type. Could be start or stop. + Type *string `json:"type,omitempty"` + // StartTime - READ-ONLY; The start time of the operation. + StartTime *date.Time `json:"startTime,omitempty"` + // Result - READ-ONLY; The operation result. + Result *string `json:"result,omitempty"` + // ErrorCode - READ-ONLY; The error code. + ErrorCode *string `json:"errorCode,omitempty"` + // Parameters - READ-ONLY; Managed integration runtime error parameters. + Parameters *[]string `json:"parameters,omitempty"` + // ActivityID - READ-ONLY; The activity id for the operation request. + ActivityID *string `json:"activityId,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeOperationResult. +func (miror ManagedIntegrationRuntimeOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ManagedIntegrationRuntimeStatus managed integration runtime status. +type ManagedIntegrationRuntimeStatus struct { + // ManagedIntegrationRuntimeStatusTypeProperties - Managed integration runtime status type properties. + *ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to. + DataFactoryName *string `json:"dataFactoryName,omitempty"` + // State - READ-ONLY; The state of integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' + State IntegrationRuntimeState `json:"state,omitempty"` + // Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted' + Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeStatus. +func (mirs ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + mirs.Type = TypeBasicIntegrationRuntimeStatusTypeManaged + objectMap := make(map[string]interface{}) + if mirs.ManagedIntegrationRuntimeStatusTypeProperties != nil { + objectMap["typeProperties"] = mirs.ManagedIntegrationRuntimeStatusTypeProperties + } + if mirs.Type != "" { + objectMap["type"] = mirs.Type + } + for k, v := range mirs.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. +func (mirs ManagedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) { + return &mirs, true +} + +// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. +func (mirs ManagedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) { + return nil, false +} + +// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. +func (mirs ManagedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) { + return nil, false +} + +// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. +func (mirs ManagedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) { + return &mirs, true +} + +// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntimeStatus struct. +func (mirs *ManagedIntegrationRuntimeStatus) 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 "typeProperties": + if v != nil { + var managedIntegrationRuntimeStatusTypeProperties ManagedIntegrationRuntimeStatusTypeProperties + err = json.Unmarshal(*v, &managedIntegrationRuntimeStatusTypeProperties) + if err != nil { + return err + } + mirs.ManagedIntegrationRuntimeStatusTypeProperties = &managedIntegrationRuntimeStatusTypeProperties + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if mirs.AdditionalProperties == nil { + mirs.AdditionalProperties = make(map[string]interface{}) + } + mirs.AdditionalProperties[k] = additionalProperties + } + case "dataFactoryName": + if v != nil { + var dataFactoryName string + err = json.Unmarshal(*v, &dataFactoryName) + if err != nil { + return err + } + mirs.DataFactoryName = &dataFactoryName + } + case "state": + if v != nil { + var state IntegrationRuntimeState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + mirs.State = state + } + case "type": + if v != nil { + var typeVar TypeBasicIntegrationRuntimeStatus + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mirs.Type = typeVar + } + } + } + + return nil +} + +// ManagedIntegrationRuntimeStatusTypeProperties managed integration runtime status type properties. +type ManagedIntegrationRuntimeStatusTypeProperties struct { + // CreateTime - READ-ONLY; The time at which the integration runtime was created, in ISO8601 format. + CreateTime *date.Time `json:"createTime,omitempty"` + // Nodes - READ-ONLY; The list of nodes for managed integration runtime. + Nodes *[]ManagedIntegrationRuntimeNode `json:"nodes,omitempty"` + // OtherErrors - READ-ONLY; The errors that occurred on this integration runtime. + OtherErrors *[]ManagedIntegrationRuntimeError `json:"otherErrors,omitempty"` + // LastOperation - READ-ONLY; The last operation result that occurred on this integration runtime. + LastOperation *ManagedIntegrationRuntimeOperationResult `json:"lastOperation,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeStatusTypeProperties. +func (mirstp ManagedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ManagedIntegrationRuntimeTypeProperties managed integration runtime type properties. +type ManagedIntegrationRuntimeTypeProperties struct { + // ComputeProperties - The compute resource for managed integration runtime. + ComputeProperties *IntegrationRuntimeComputeProperties `json:"computeProperties,omitempty"` + // SsisProperties - SSIS properties for managed integration runtime. + SsisProperties *IntegrationRuntimeSsisProperties `json:"ssisProperties,omitempty"` +} + +// ManagedVirtualNetworkSettings managed Virtual Network Settings +type ManagedVirtualNetworkSettings struct { + // PreventDataExfiltration - Prevent Data Exfiltration + PreventDataExfiltration *bool `json:"preventDataExfiltration,omitempty"` + // LinkedAccessCheckOnTargetResource - Linked Access Check On Target Resource + LinkedAccessCheckOnTargetResource *bool `json:"linkedAccessCheckOnTargetResource,omitempty"` + // AllowedAadTenantIdsForLinking - Allowed Aad Tenant Ids For Linking + AllowedAadTenantIdsForLinking *[]string `json:"allowedAadTenantIdsForLinking,omitempty"` +} + +// MetadataSyncConfig configuration for metadata sync +type MetadataSyncConfig struct { + autorest.Response `json:"-"` + // MetadataSyncConfigProperties - Metadata Sync Config properties + *MetadataSyncConfigProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MetadataSyncConfig. +func (msc MetadataSyncConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msc.MetadataSyncConfigProperties != nil { + objectMap["properties"] = msc.MetadataSyncConfigProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MetadataSyncConfig struct. +func (msc *MetadataSyncConfig) 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 metadataSyncConfigProperties MetadataSyncConfigProperties + err = json.Unmarshal(*v, &metadataSyncConfigProperties) + if err != nil { + return err + } + msc.MetadataSyncConfigProperties = &metadataSyncConfigProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + msc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + msc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + msc.Type = &typeVar + } + } + } + + return nil +} + +// MetadataSyncConfigProperties metadata Sync Config properties +type MetadataSyncConfigProperties struct { + // Enabled - Indicates whether the metadata sync is enabled or disabled + Enabled *bool `json:"enabled,omitempty"` + // SyncIntervalInMinutes - The Sync Interval in minutes. + SyncIntervalInMinutes *int32 `json:"syncIntervalInMinutes,omitempty"` +} + +// OperationMetaLogSpecification what is this? +type OperationMetaLogSpecification struct { + // DisplayName - Log display name + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - Time range the log covers + BlobDuration *string `json:"blobDuration,omitempty"` + // Name - Log unique name + Name *string `json:"name,omitempty"` +} + +// OperationMetaMetricDimensionSpecification what is this? +type OperationMetaMetricDimensionSpecification struct { + // DisplayName - Dimension display name + DisplayName *string `json:"displayName,omitempty"` + // Name - Dimension unique name + Name *string `json:"name,omitempty"` + // ToBeExportedForShoebox - Whether this metric should be exported for Shoebox + ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` +} + +// OperationMetaMetricSpecification what is this? +type OperationMetaMetricSpecification struct { + // SourceMdmNamespace - The source MDM namespace + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + // DisplayName - Metric display name + DisplayName *string `json:"displayName,omitempty"` + // Name - Metric unique name + Name *string `json:"name,omitempty"` + // AggregationType - Metric aggregation type + AggregationType *string `json:"aggregationType,omitempty"` + // DisplayDescription - Metric description + DisplayDescription *string `json:"displayDescription,omitempty"` + // SourceMdmAccount - The source MDM account + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + // EnableRegionalMdmAccount - Whether the regional MDM account is enabled + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + // Unit - Metric units + Unit *string `json:"unit,omitempty"` + // Dimensions - Metric dimensions + Dimensions *[]OperationMetaMetricDimensionSpecification `json:"dimensions,omitempty"` + // SupportsInstanceLevelAggregation - Whether the metric supports instance-level aggregation + SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"` + // MetricFilterPattern - Metric filter + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` +} + +// OperationMetaPropertyInfo what is this? +type OperationMetaPropertyInfo struct { + // ServiceSpecification - Operation service specification + ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// OperationMetaServiceSpecification what is this? +type OperationMetaServiceSpecification struct { + // MetricSpecifications - Service metric specifications + MetricSpecifications *[]OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"` + // LogSpecifications - Service log specifications + LogSpecifications *[]OperationMetaLogSpecification `json:"logSpecifications,omitempty"` +} + +// OperationResource an operation +type OperationResource struct { + autorest.Response `json:"-"` + // ID - Operation ID + ID *string `json:"id,omitempty"` + // Name - Operation name + Name *string `json:"name,omitempty"` + // Status - Operation status. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed', 'OperationStatusCanceled' + Status OperationStatus `json:"status,omitempty"` + // Properties - Operation properties + Properties interface{} `json:"properties,omitempty"` + // Error - Errors from the operation + Error *ErrorDetail `json:"error,omitempty"` + // StartTime - Operation start time + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Operation start time + EndTime *date.Time `json:"endTime,omitempty"` + // PercentComplete - Completion percentage of the operation + PercentComplete *float64 `json:"percentComplete,omitempty"` +} + +// PrivateEndpoint private endpoint details +type PrivateEndpoint struct { + // ID - READ-ONLY; Resource id of the private endpoint. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpoint. +func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateEndpointConnection a private endpoint connection +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Private endpoint connection properties. + *PrivateEndpointConnectionProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. +func (pec *PrivateEndpointConnection) 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 privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pec.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pec.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pec.Type = &typeVar + } + } + } + + return nil +} + +// PrivateEndpointConnectionForPrivateLinkHub ... +type PrivateEndpointConnectionForPrivateLinkHub struct { + autorest.Response `json:"-"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; identifier + ID *string `json:"id,omitempty"` + // PrivateEndpointConnectionProperties - Properties of private endpoint connection for private link hub + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionForPrivateLinkHub. +func (pecfplh PrivateEndpointConnectionForPrivateLinkHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecfplh.Name != nil { + objectMap["name"] = pecfplh.Name + } + if pecfplh.Type != nil { + objectMap["type"] = pecfplh.Type + } + if pecfplh.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pecfplh.PrivateEndpointConnectionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionForPrivateLinkHub struct. +func (pecfplh *PrivateEndpointConnectionForPrivateLinkHub) 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 + } + pecfplh.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pecfplh.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pecfplh.ID = &ID + } + case "properties": + if v != nil { + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pecfplh.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + } + } + + return nil +} + +// PrivateEndpointConnectionForPrivateLinkHubBasic private Endpoint Connection For Private Link Hub - Basic +type PrivateEndpointConnectionForPrivateLinkHubBasic struct { + // ID - READ-ONLY; identifier + ID *string `json:"id,omitempty"` + // PrivateEndpointConnectionProperties - Properties of private endpoint connection for private link hub + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionForPrivateLinkHubBasic. +func (pecfplhb PrivateEndpointConnectionForPrivateLinkHubBasic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecfplhb.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pecfplhb.PrivateEndpointConnectionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionForPrivateLinkHubBasic struct. +func (pecfplhb *PrivateEndpointConnectionForPrivateLinkHubBasic) 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 + } + pecfplhb.ID = &ID + } + case "properties": + if v != nil { + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pecfplhb.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + } + } + + return nil +} + +// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse ... +type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse struct { + autorest.Response `json:"-"` + Value *[]PrivateEndpointConnectionForPrivateLinkHub `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator provides access to a +// complete listing of PrivateEndpointConnectionForPrivateLinkHub values. +type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator struct { + i int + page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage +} + +// 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 *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator.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 *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) 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 PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Response() PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse { + 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 PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Value() PrivateEndpointConnectionForPrivateLinkHub { + if !iter.page.NotDone() { + return PrivateEndpointConnectionForPrivateLinkHub{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator type. +func NewPrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator(page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator { + return PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) IsEmpty() bool { + return pecfplhRcr.Value == nil || len(*pecfplhRcr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) hasNextLink() bool { + return pecfplhRcr.NextLink != nil && len(*pecfplhRcr.NextLink) != 0 +} + +// privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer(ctx context.Context) (*http.Request, error) { + if !pecfplhRcr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pecfplhRcr.NextLink))) +} + +// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage contains a page of +// PrivateEndpointConnectionForPrivateLinkHub values. +type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage struct { + fn func(context.Context, PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, error) + pecfplhrcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse +} + +// 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 *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.pecfplhrcr) + if err != nil { + return err + } + page.pecfplhrcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) NotDone() bool { + return !page.pecfplhrcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Response() PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse { + return page.pecfplhrcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Values() []PrivateEndpointConnectionForPrivateLinkHub { + if page.pecfplhrcr.IsEmpty() { + return nil + } + return *page.pecfplhrcr.Value +} + +// Creates a new instance of the PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage type. +func NewPrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage(cur PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, getNextPage func(context.Context, PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, error)) PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage { + return PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage{ + fn: getNextPage, + pecfplhrcr: cur, + } +} + +// PrivateEndpointConnectionList a list of private endpoint connections +type PrivateEndpointConnectionList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]PrivateEndpointConnection `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionList. +func (pecl PrivateEndpointConnectionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateEndpointConnectionListIterator provides access to a complete listing of PrivateEndpointConnection +// values. +type PrivateEndpointConnectionListIterator struct { + i int + page PrivateEndpointConnectionListPage +} + +// 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 *PrivateEndpointConnectionListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListIterator.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 *PrivateEndpointConnectionListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointConnectionListIterator) 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 PrivateEndpointConnectionListIterator) Response() PrivateEndpointConnectionList { + 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 PrivateEndpointConnectionListIterator) Value() PrivateEndpointConnection { + if !iter.page.NotDone() { + return PrivateEndpointConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointConnectionListIterator type. +func NewPrivateEndpointConnectionListIterator(page PrivateEndpointConnectionListPage) PrivateEndpointConnectionListIterator { + return PrivateEndpointConnectionListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pecl PrivateEndpointConnectionList) IsEmpty() bool { + return pecl.Value == nil || len(*pecl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (pecl PrivateEndpointConnectionList) hasNextLink() bool { + return pecl.NextLink != nil && len(*pecl.NextLink) != 0 +} + +// privateEndpointConnectionListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pecl PrivateEndpointConnectionList) privateEndpointConnectionListPreparer(ctx context.Context) (*http.Request, error) { + if !pecl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pecl.NextLink))) +} + +// PrivateEndpointConnectionListPage contains a page of PrivateEndpointConnection values. +type PrivateEndpointConnectionListPage struct { + fn func(context.Context, PrivateEndpointConnectionList) (PrivateEndpointConnectionList, error) + pecl PrivateEndpointConnectionList +} + +// 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 *PrivateEndpointConnectionListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.pecl) + if err != nil { + return err + } + page.pecl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateEndpointConnectionListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointConnectionListPage) NotDone() bool { + return !page.pecl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointConnectionListPage) Response() PrivateEndpointConnectionList { + return page.pecl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointConnectionListPage) Values() []PrivateEndpointConnection { + if page.pecl.IsEmpty() { + return nil + } + return *page.pecl.Value +} + +// Creates a new instance of the PrivateEndpointConnectionListPage type. +func NewPrivateEndpointConnectionListPage(cur PrivateEndpointConnectionList, getNextPage func(context.Context, PrivateEndpointConnectionList) (PrivateEndpointConnectionList, error)) PrivateEndpointConnectionListPage { + return PrivateEndpointConnectionListPage{ + fn: getNextPage, + pecl: cur, + } +} + +// PrivateEndpointConnectionProperties properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - The private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the private endpoint connection. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. +func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecp.PrivateEndpoint != nil { + objectMap["privateEndpoint"] = pecp.PrivateEndpoint + } + if pecp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + +// PrivateEndpointConnectionsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointConnectionsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointConnectionsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointConnectionsCreateFuture.Result. +func (future *PrivateEndpointConnectionsCreateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pec.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.PrivateEndpointConnectionsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent { + pec, err = client.CreateResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsCreateFuture", "Result", pec.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointConnectionsClient) (OperationResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result. +func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (or OperationResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + or.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.PrivateEndpointConnectionsDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { + or, err = client.DeleteResponder(or.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsDeleteFuture", "Result", or.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateLinkHub a privateLinkHub +type PrivateLinkHub struct { + autorest.Response `json:"-"` + // PrivateLinkHubProperties - PrivateLinkHub resource properties + *PrivateLinkHubProperties `json:"properties,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkHub. +func (plh PrivateLinkHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plh.PrivateLinkHubProperties != nil { + objectMap["properties"] = plh.PrivateLinkHubProperties + } + if plh.Tags != nil { + objectMap["tags"] = plh.Tags + } + if plh.Location != nil { + objectMap["location"] = plh.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateLinkHub struct. +func (plh *PrivateLinkHub) 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 privateLinkHubProperties PrivateLinkHubProperties + err = json.Unmarshal(*v, &privateLinkHubProperties) + if err != nil { + return err + } + plh.PrivateLinkHubProperties = &privateLinkHubProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + plh.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + plh.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + plh.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + plh.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + plh.Type = &typeVar + } + } + } + + return nil +} + +// PrivateLinkHubInfoListResult list of privateLinkHubs +type PrivateLinkHubInfoListResult struct { + autorest.Response `json:"-"` + // NextLink - Link to the next page of results + NextLink *string `json:"nextLink,omitempty"` + // Value - List of privateLinkHubs + Value *[]PrivateLinkHub `json:"value,omitempty"` +} + +// PrivateLinkHubInfoListResultIterator provides access to a complete listing of PrivateLinkHub values. +type PrivateLinkHubInfoListResultIterator struct { + i int + page PrivateLinkHubInfoListResultPage +} + +// 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 *PrivateLinkHubInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubInfoListResultIterator.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 *PrivateLinkHubInfoListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateLinkHubInfoListResultIterator) 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 PrivateLinkHubInfoListResultIterator) Response() PrivateLinkHubInfoListResult { + 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 PrivateLinkHubInfoListResultIterator) Value() PrivateLinkHub { + if !iter.page.NotDone() { + return PrivateLinkHub{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateLinkHubInfoListResultIterator type. +func NewPrivateLinkHubInfoListResultIterator(page PrivateLinkHubInfoListResultPage) PrivateLinkHubInfoListResultIterator { + return PrivateLinkHubInfoListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (plhilr PrivateLinkHubInfoListResult) IsEmpty() bool { + return plhilr.Value == nil || len(*plhilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (plhilr PrivateLinkHubInfoListResult) hasNextLink() bool { + return plhilr.NextLink != nil && len(*plhilr.NextLink) != 0 +} + +// privateLinkHubInfoListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (plhilr PrivateLinkHubInfoListResult) privateLinkHubInfoListResultPreparer(ctx context.Context) (*http.Request, error) { + if !plhilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(plhilr.NextLink))) +} + +// PrivateLinkHubInfoListResultPage contains a page of PrivateLinkHub values. +type PrivateLinkHubInfoListResultPage struct { + fn func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error) + plhilr PrivateLinkHubInfoListResult +} + +// 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 *PrivateLinkHubInfoListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubInfoListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.plhilr) + if err != nil { + return err + } + page.plhilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateLinkHubInfoListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateLinkHubInfoListResultPage) NotDone() bool { + return !page.plhilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateLinkHubInfoListResultPage) Response() PrivateLinkHubInfoListResult { + return page.plhilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateLinkHubInfoListResultPage) Values() []PrivateLinkHub { + if page.plhilr.IsEmpty() { + return nil + } + return *page.plhilr.Value +} + +// Creates a new instance of the PrivateLinkHubInfoListResultPage type. +func NewPrivateLinkHubInfoListResultPage(cur PrivateLinkHubInfoListResult, getNextPage func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error)) PrivateLinkHubInfoListResultPage { + return PrivateLinkHubInfoListResultPage{ + fn: getNextPage, + plhilr: cur, + } +} + +// PrivateLinkHubPatchInfo privateLinkHub patch details +type PrivateLinkHubPatchInfo struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkHubPatchInfo. +func (plhpi PrivateLinkHubPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plhpi.Tags != nil { + objectMap["tags"] = plhpi.Tags + } + return json.Marshal(objectMap) +} + +// PrivateLinkHubProperties privateLinkHub properties +type PrivateLinkHubProperties struct { + // ProvisioningState - PrivateLinkHub provisioning state + ProvisioningState *string `json:"provisioningState,omitempty"` + // PrivateEndpointConnections - READ-ONLY; List of private endpoint connections + PrivateEndpointConnections *[]PrivateEndpointConnectionForPrivateLinkHubBasic `json:"privateEndpointConnections,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkHubProperties. +func (plhp PrivateLinkHubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plhp.ProvisioningState != nil { + objectMap["provisioningState"] = plhp.ProvisioningState + } + return json.Marshal(objectMap) +} + +// PrivateLinkHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PrivateLinkHubsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateLinkHubsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateLinkHubsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateLinkHubsDeleteFuture.Result. +func (future *PrivateLinkHubsDeleteFuture) result(client PrivateLinkHubsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.PrivateLinkHubsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + autorest.Response `json:"-"` + // Properties - READ-ONLY; The private link resource properties. + Properties *PrivateLinkResourceProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkResource. +func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateLinkResourceListResult a list of private link resources +type PrivateLinkResourceListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]PrivateLinkResource `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkResourceListResult. +func (plrlr PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateLinkResourceListResultIterator provides access to a complete listing of PrivateLinkResource +// values. +type PrivateLinkResourceListResultIterator struct { + i int + page PrivateLinkResourceListResultPage +} + +// 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 *PrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultIterator.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 *PrivateLinkResourceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateLinkResourceListResultIterator) 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 PrivateLinkResourceListResultIterator) Response() PrivateLinkResourceListResult { + 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 PrivateLinkResourceListResultIterator) Value() PrivateLinkResource { + if !iter.page.NotDone() { + return PrivateLinkResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateLinkResourceListResultIterator type. +func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { + return PrivateLinkResourceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (plrlr PrivateLinkResourceListResult) IsEmpty() bool { + return plrlr.Value == nil || len(*plrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (plrlr PrivateLinkResourceListResult) hasNextLink() bool { + return plrlr.NextLink != nil && len(*plrlr.NextLink) != 0 +} + +// privateLinkResourceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (plrlr PrivateLinkResourceListResult) privateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !plrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(plrlr.NextLink))) +} + +// PrivateLinkResourceListResultPage contains a page of PrivateLinkResource values. +type PrivateLinkResourceListResultPage struct { + fn func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error) + plrlr PrivateLinkResourceListResult +} + +// 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 *PrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.plrlr) + if err != nil { + return err + } + page.plrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *PrivateLinkResourceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateLinkResourceListResultPage) NotDone() bool { + return !page.plrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateLinkResourceListResultPage) Response() PrivateLinkResourceListResult { + return page.plrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateLinkResourceListResultPage) Values() []PrivateLinkResource { + if page.plrlr.IsEmpty() { + return nil + } + return *page.plrlr.Value +} + +// Creates a new instance of the PrivateLinkResourceListResultPage type. +func NewPrivateLinkResourceListResultPage(cur PrivateLinkResourceListResult, getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return PrivateLinkResourceListResultPage{ + fn: getNextPage, + plrlr: cur, + } +} + +// PrivateLinkResourceProperties properties of a private link resource. +type PrivateLinkResourceProperties struct { + // GroupID - READ-ONLY; The private link resource group id. + GroupID *string `json:"groupId,omitempty"` + // RequiredMembers - READ-ONLY; The private link resource required member names. + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + // RequiredZoneNames - READ-ONLY; Required DNS zone names of the the private link resource. + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties. +func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateLinkServiceConnectionState connection state details of the private endpoint +type PrivateLinkServiceConnectionState struct { + // Status - The private link service connection status. + Status *string `json:"status,omitempty"` + // Description - The private link service connection description. + Description *string `json:"description,omitempty"` + // ActionsRequired - READ-ONLY; The actions required for private link service connection. + ActionsRequired *string `json:"actionsRequired,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionState. +func (plscs PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plscs.Status != nil { + objectMap["status"] = plscs.Status + } + if plscs.Description != nil { + objectMap["description"] = plscs.Description + } + return json.Marshal(objectMap) +} + +// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not +// have tags and a location +type ProxyResource struct { + // 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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProxyResource. +func (pr ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PurviewConfiguration purview Configuration +type PurviewConfiguration struct { + // PurviewResourceID - Purview Resource ID + PurviewResourceID *string `json:"purviewResourceId,omitempty"` +} + +// QueryInterval a database query. +type QueryInterval struct { + // IntervalStartTime - READ-ONLY; The start time of the measurement interval (ISO8601 format). + IntervalStartTime *date.Time `json:"intervalStartTime,omitempty"` + // ExecutionCount - READ-ONLY; The number of times the query was executed during this interval. + ExecutionCount *float64 `json:"executionCount,omitempty"` + // Metrics - READ-ONLY; The list of query metrics during this interval. + Metrics *[]QueryMetric `json:"metrics,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueryInterval. +func (qi QueryInterval) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// QueryMetric a database query. +type QueryMetric struct { + // Name - READ-ONLY; The name of the metric + Name *string `json:"name,omitempty"` + // DisplayName - READ-ONLY; The name of the metric for display in user interface + DisplayName *string `json:"displayName,omitempty"` + // Unit - READ-ONLY; The unit of measurement. Possible values include: 'QueryMetricUnitPercentage', 'QueryMetricUnitKB', 'QueryMetricUnitMicroseconds' + Unit QueryMetricUnit `json:"unit,omitempty"` + // Value - READ-ONLY; The measured value + Value *float64 `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueryMetric. +func (qm QueryMetric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// QueryStatistic a database query. +type QueryStatistic struct { + // QueryID - READ-ONLY; The id of the query + QueryID *string `json:"queryId,omitempty"` + // Intervals - READ-ONLY; The list of query intervals. + Intervals *[]QueryInterval `json:"intervals,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueryStatistic. +func (qs QueryStatistic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RecommendedSensitivityLabelUpdate a recommended sensitivity label update operation. +type RecommendedSensitivityLabelUpdate struct { + // RecommendedSensitivityLabelUpdateProperties - Resource properties. + *RecommendedSensitivityLabelUpdateProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecommendedSensitivityLabelUpdate. +func (rslu RecommendedSensitivityLabelUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rslu.RecommendedSensitivityLabelUpdateProperties != nil { + objectMap["properties"] = rslu.RecommendedSensitivityLabelUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RecommendedSensitivityLabelUpdate struct. +func (rslu *RecommendedSensitivityLabelUpdate) 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 recommendedSensitivityLabelUpdateProperties RecommendedSensitivityLabelUpdateProperties + err = json.Unmarshal(*v, &recommendedSensitivityLabelUpdateProperties) + if err != nil { + return err + } + rslu.RecommendedSensitivityLabelUpdateProperties = &recommendedSensitivityLabelUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rslu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rslu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rslu.Type = &typeVar + } + } + } + + return nil +} + +// RecommendedSensitivityLabelUpdateList a list of recommended sensitivity label update operations. +type RecommendedSensitivityLabelUpdateList struct { + Operations *[]RecommendedSensitivityLabelUpdate `json:"operations,omitempty"` +} + +// RecommendedSensitivityLabelUpdateProperties properties of an operation executed on a recommended +// sensitivity label. +type RecommendedSensitivityLabelUpdateProperties struct { + // Op - Possible values include: 'RecommendedSensitivityLabelUpdateKindEnable', 'RecommendedSensitivityLabelUpdateKindDisable' + Op RecommendedSensitivityLabelUpdateKind `json:"op,omitempty"` + // Schema - Schema name of the column to update. + Schema *string `json:"schema,omitempty"` + // Table - Table name of the column to update. + Table *string `json:"table,omitempty"` + // Column - Column name to update. + Column *string `json:"column,omitempty"` +} + +// RecoverableSQLPool a recoverable sql pool +type RecoverableSQLPool struct { + autorest.Response `json:"-"` + // RecoverableSQLPoolProperties - The properties of a recoverable sql pool + *RecoverableSQLPoolProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoverableSQLPool. +func (rsp RecoverableSQLPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rsp.RecoverableSQLPoolProperties != nil { + objectMap["properties"] = rsp.RecoverableSQLPoolProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RecoverableSQLPool struct. +func (rsp *RecoverableSQLPool) 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 recoverableSQLPoolProperties RecoverableSQLPoolProperties + err = json.Unmarshal(*v, &recoverableSQLPoolProperties) + if err != nil { + return err + } + rsp.RecoverableSQLPoolProperties = &recoverableSQLPoolProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rsp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rsp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rsp.Type = &typeVar + } + } + } + + return nil +} + +// RecoverableSQLPoolListResult the response to a list recoverable sql pools request +type RecoverableSQLPoolListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; A list of recoverable sql pool + Value *[]RecoverableSQLPool `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoverableSQLPoolListResult. +func (rsplr RecoverableSQLPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RecoverableSQLPoolListResultIterator provides access to a complete listing of RecoverableSQLPool values. +type RecoverableSQLPoolListResultIterator struct { + i int + page RecoverableSQLPoolListResultPage +} + +// 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 *RecoverableSQLPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableSQLPoolListResultIterator.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 *RecoverableSQLPoolListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecoverableSQLPoolListResultIterator) 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 RecoverableSQLPoolListResultIterator) Response() RecoverableSQLPoolListResult { + 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 RecoverableSQLPoolListResultIterator) Value() RecoverableSQLPool { + if !iter.page.NotDone() { + return RecoverableSQLPool{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecoverableSQLPoolListResultIterator type. +func NewRecoverableSQLPoolListResultIterator(page RecoverableSQLPoolListResultPage) RecoverableSQLPoolListResultIterator { + return RecoverableSQLPoolListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rsplr RecoverableSQLPoolListResult) IsEmpty() bool { + return rsplr.Value == nil || len(*rsplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rsplr RecoverableSQLPoolListResult) hasNextLink() bool { + return rsplr.NextLink != nil && len(*rsplr.NextLink) != 0 +} + +// recoverableSQLPoolListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rsplr RecoverableSQLPoolListResult) recoverableSQLPoolListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rsplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rsplr.NextLink))) +} + +// RecoverableSQLPoolListResultPage contains a page of RecoverableSQLPool values. +type RecoverableSQLPoolListResultPage struct { + fn func(context.Context, RecoverableSQLPoolListResult) (RecoverableSQLPoolListResult, error) + rsplr RecoverableSQLPoolListResult +} + +// 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 *RecoverableSQLPoolListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableSQLPoolListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rsplr) + if err != nil { + return err + } + page.rsplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RecoverableSQLPoolListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecoverableSQLPoolListResultPage) NotDone() bool { + return !page.rsplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecoverableSQLPoolListResultPage) Response() RecoverableSQLPoolListResult { + return page.rsplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecoverableSQLPoolListResultPage) Values() []RecoverableSQLPool { + if page.rsplr.IsEmpty() { + return nil + } + return *page.rsplr.Value +} + +// Creates a new instance of the RecoverableSQLPoolListResultPage type. +func NewRecoverableSQLPoolListResultPage(cur RecoverableSQLPoolListResult, getNextPage func(context.Context, RecoverableSQLPoolListResult) (RecoverableSQLPoolListResult, error)) RecoverableSQLPoolListResultPage { + return RecoverableSQLPoolListResultPage{ + fn: getNextPage, + rsplr: cur, + } +} + +// RecoverableSQLPoolProperties the properties of a recoverable sql pool +type RecoverableSQLPoolProperties struct { + // Edition - READ-ONLY; The edition of the database + Edition *string `json:"edition,omitempty"` + // ServiceLevelObjective - READ-ONLY; The service level objective name of the database + ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` + // ElasticPoolName - READ-ONLY; The elastic pool name of the database + ElasticPoolName *string `json:"elasticPoolName,omitempty"` + // LastAvailableBackupDate - READ-ONLY; The last available backup date of the database (ISO8601 format) + LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoverableSQLPoolProperties. +func (rspp RecoverableSQLPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ReplaceAllFirewallRulesOperationResponse an existing operation for replacing the firewall rules +type ReplaceAllFirewallRulesOperationResponse struct { + autorest.Response `json:"-"` + // OperationID - The operation ID + OperationID *string `json:"operationId,omitempty"` +} + +// ReplaceAllIPFirewallRulesRequest replace all IP firewall rules request +type ReplaceAllIPFirewallRulesRequest struct { + // IPFirewallRules - IP firewall rule properties + IPFirewallRules map[string]*IPFirewallRuleProperties `json:"ipFirewallRules"` +} + +// MarshalJSON is the custom marshaler for ReplaceAllIPFirewallRulesRequest. +func (raifrr ReplaceAllIPFirewallRulesRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if raifrr.IPFirewallRules != nil { + objectMap["ipFirewallRules"] = raifrr.IPFirewallRules + } + return json.Marshal(objectMap) +} + +// ReplicationLink represents a Sql pool replication link. +type ReplicationLink struct { + autorest.Response `json:"-"` + // Location - READ-ONLY; Location of the workspace that contains this firewall rule. + Location *string `json:"location,omitempty"` + // ReplicationLinkProperties - The properties representing the resource. + *ReplicationLinkProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicationLink. +func (rl ReplicationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rl.ReplicationLinkProperties != nil { + objectMap["properties"] = rl.ReplicationLinkProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ReplicationLink struct. +func (rl *ReplicationLink) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rl.Location = &location + } + case "properties": + if v != nil { + var replicationLinkProperties ReplicationLinkProperties + err = json.Unmarshal(*v, &replicationLinkProperties) + if err != nil { + return err + } + rl.ReplicationLinkProperties = &replicationLinkProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rl.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rl.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rl.Type = &typeVar + } + } + } + + return nil +} + +// ReplicationLinkListResult represents the response to a List Sql pool replication link request. +type ReplicationLinkListResult struct { + autorest.Response `json:"-"` + // Value - The list of Sql pool replication links housed in the Sql pool. + Value *[]ReplicationLink `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicationLinkListResult. +func (rllr ReplicationLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rllr.Value != nil { + objectMap["value"] = rllr.Value + } + return json.Marshal(objectMap) +} + +// ReplicationLinkListResultIterator provides access to a complete listing of ReplicationLink values. +type ReplicationLinkListResultIterator struct { + i int + page ReplicationLinkListResultPage +} + +// 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 *ReplicationLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinkListResultIterator.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 *ReplicationLinkListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ReplicationLinkListResultIterator) 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 ReplicationLinkListResultIterator) Response() ReplicationLinkListResult { + 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 ReplicationLinkListResultIterator) Value() ReplicationLink { + if !iter.page.NotDone() { + return ReplicationLink{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ReplicationLinkListResultIterator type. +func NewReplicationLinkListResultIterator(page ReplicationLinkListResultPage) ReplicationLinkListResultIterator { + return ReplicationLinkListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rllr ReplicationLinkListResult) IsEmpty() bool { + return rllr.Value == nil || len(*rllr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rllr ReplicationLinkListResult) hasNextLink() bool { + return rllr.NextLink != nil && len(*rllr.NextLink) != 0 +} + +// replicationLinkListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rllr ReplicationLinkListResult) replicationLinkListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rllr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rllr.NextLink))) +} + +// ReplicationLinkListResultPage contains a page of ReplicationLink values. +type ReplicationLinkListResultPage struct { + fn func(context.Context, ReplicationLinkListResult) (ReplicationLinkListResult, error) + rllr ReplicationLinkListResult +} + +// 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 *ReplicationLinkListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinkListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rllr) + if err != nil { + return err + } + page.rllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ReplicationLinkListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ReplicationLinkListResultPage) NotDone() bool { + return !page.rllr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ReplicationLinkListResultPage) Response() ReplicationLinkListResult { + return page.rllr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ReplicationLinkListResultPage) Values() []ReplicationLink { + if page.rllr.IsEmpty() { + return nil + } + return *page.rllr.Value +} + +// Creates a new instance of the ReplicationLinkListResultPage type. +func NewReplicationLinkListResultPage(cur ReplicationLinkListResult, getNextPage func(context.Context, ReplicationLinkListResult) (ReplicationLinkListResult, error)) ReplicationLinkListResultPage { + return ReplicationLinkListResultPage{ + fn: getNextPage, + rllr: cur, + } +} + +// ReplicationLinkProperties represents the properties of a Sql pool replication link. +type ReplicationLinkProperties struct { + // IsTerminationAllowed - READ-ONLY; Legacy value indicating whether termination is allowed. Currently always returns true. + IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"` + // ReplicationMode - READ-ONLY; Replication mode of this replication link. + ReplicationMode *string `json:"replicationMode,omitempty"` + // PartnerServer - READ-ONLY; The name of the workspace hosting the partner Sql pool. + PartnerServer *string `json:"partnerServer,omitempty"` + // PartnerDatabase - READ-ONLY; The name of the partner Sql pool. + PartnerDatabase *string `json:"partnerDatabase,omitempty"` + // PartnerLocation - READ-ONLY; The Azure Region of the partner Sql pool. + PartnerLocation *string `json:"partnerLocation,omitempty"` + // Role - READ-ONLY; The role of the Sql pool in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy' + Role ReplicationRole `json:"role,omitempty"` + // PartnerRole - READ-ONLY; The role of the partner Sql pool in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy' + PartnerRole ReplicationRole `json:"partnerRole,omitempty"` + // StartTime - READ-ONLY; The start time for the replication link. + StartTime *date.Time `json:"startTime,omitempty"` + // PercentComplete - READ-ONLY; The percentage of seeding complete for the replication link. + PercentComplete *int32 `json:"percentComplete,omitempty"` + // ReplicationState - READ-ONLY; The replication state for the replication link. Possible values include: 'ReplicationStatePENDING', 'ReplicationStateSEEDING', 'ReplicationStateCATCHUP', 'ReplicationStateSUSPENDED' + ReplicationState ReplicationState `json:"replicationState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicationLinkProperties. +func (rlp ReplicationLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// Resource common fields that are returned in the response for all Azure Resource Manager resources +type Resource struct { + // 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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceMoveDefinition contains the information necessary to perform a resource move (rename). +type ResourceMoveDefinition struct { + // ID - The target ID for the resource + ID *string `json:"id,omitempty"` +} + +// RestorableDroppedSQLPool a restorable dropped Sql pool +type RestorableDroppedSQLPool struct { + autorest.Response `json:"-"` + // Location - READ-ONLY; The geo-location where the resource lives + Location *string `json:"location,omitempty"` + // RestorableDroppedSQLPoolProperties - The properties of a restorable dropped Sql pool + *RestorableDroppedSQLPoolProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorableDroppedSQLPool. +func (rdsp RestorableDroppedSQLPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rdsp.RestorableDroppedSQLPoolProperties != nil { + objectMap["properties"] = rdsp.RestorableDroppedSQLPoolProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestorableDroppedSQLPool struct. +func (rdsp *RestorableDroppedSQLPool) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rdsp.Location = &location + } + case "properties": + if v != nil { + var restorableDroppedSQLPoolProperties RestorableDroppedSQLPoolProperties + err = json.Unmarshal(*v, &restorableDroppedSQLPoolProperties) + if err != nil { + return err + } + rdsp.RestorableDroppedSQLPoolProperties = &restorableDroppedSQLPoolProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rdsp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rdsp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rdsp.Type = &typeVar + } + } + } + + return nil +} + +// RestorableDroppedSQLPoolListResult the response to a list restorable dropped Sql pools request +type RestorableDroppedSQLPoolListResult struct { + autorest.Response `json:"-"` + // Value - A list of restorable dropped Sql pools + Value *[]RestorableDroppedSQLPool `json:"value,omitempty"` +} + +// RestorableDroppedSQLPoolProperties the properties of a restorable dropped Sql pool +type RestorableDroppedSQLPoolProperties struct { + // DatabaseName - READ-ONLY; The name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // Edition - READ-ONLY; The edition of the database + Edition *string `json:"edition,omitempty"` + // MaxSizeBytes - READ-ONLY; The max size in bytes of the database + MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` + // ServiceLevelObjective - READ-ONLY; The service level objective name of the database + ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` + // ElasticPoolName - READ-ONLY; The elastic pool name of the database + ElasticPoolName *string `json:"elasticPoolName,omitempty"` + // CreationDate - READ-ONLY; The creation date of the database (ISO8601 format) + CreationDate *date.Time `json:"creationDate,omitempty"` + // DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format) + DeletionDate *date.Time `json:"deletionDate,omitempty"` + // EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format) + EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorableDroppedSQLPoolProperties. +func (rdspp RestorableDroppedSQLPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RestorePoint database restore points. +type RestorePoint struct { + autorest.Response `json:"-"` + // Location - READ-ONLY; Resource location. + Location *string `json:"location,omitempty"` + // RestorePointProperties - Resource properties. + *RestorePointProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePoint. +func (rp RestorePoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rp.RestorePointProperties != nil { + objectMap["properties"] = rp.RestorePointProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestorePoint struct. +func (rp *RestorePoint) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rp.Location = &location + } + case "properties": + if v != nil { + var restorePointProperties RestorePointProperties + err = json.Unmarshal(*v, &restorePointProperties) + if err != nil { + return err + } + rp.RestorePointProperties = &restorePointProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rp.Type = &typeVar + } + } + } + + return nil +} + +// RestorePointListResult a list of long term retention backups. +type RestorePointListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]RestorePoint `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePointListResult. +func (rplr RestorePointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RestorePointListResultIterator provides access to a complete listing of RestorePoint values. +type RestorePointListResultIterator struct { + i int + page RestorePointListResultPage +} + +// 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 *RestorePointListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointListResultIterator.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 *RestorePointListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RestorePointListResultIterator) 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 RestorePointListResultIterator) Response() RestorePointListResult { + 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 RestorePointListResultIterator) Value() RestorePoint { + if !iter.page.NotDone() { + return RestorePoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RestorePointListResultIterator type. +func NewRestorePointListResultIterator(page RestorePointListResultPage) RestorePointListResultIterator { + return RestorePointListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rplr RestorePointListResult) IsEmpty() bool { + return rplr.Value == nil || len(*rplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rplr RestorePointListResult) hasNextLink() bool { + return rplr.NextLink != nil && len(*rplr.NextLink) != 0 +} + +// restorePointListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rplr RestorePointListResult) restorePointListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rplr.NextLink))) +} + +// RestorePointListResultPage contains a page of RestorePoint values. +type RestorePointListResultPage struct { + fn func(context.Context, RestorePointListResult) (RestorePointListResult, error) + rplr RestorePointListResult +} + +// 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 *RestorePointListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rplr) + if err != nil { + return err + } + page.rplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *RestorePointListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RestorePointListResultPage) NotDone() bool { + return !page.rplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RestorePointListResultPage) Response() RestorePointListResult { + return page.rplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RestorePointListResultPage) Values() []RestorePoint { + if page.rplr.IsEmpty() { + return nil + } + return *page.rplr.Value +} + +// Creates a new instance of the RestorePointListResultPage type. +func NewRestorePointListResultPage(cur RestorePointListResult, getNextPage func(context.Context, RestorePointListResult) (RestorePointListResult, error)) RestorePointListResultPage { + return RestorePointListResultPage{ + fn: getNextPage, + rplr: cur, + } +} + +// RestorePointProperties properties of a database restore point +type RestorePointProperties struct { + // RestorePointType - READ-ONLY; The type of restore point. Possible values include: 'RestorePointTypeCONTINUOUS', 'RestorePointTypeDISCRETE' + RestorePointType RestorePointType `json:"restorePointType,omitempty"` + // EarliestRestoreDate - READ-ONLY; The earliest time to which this database can be restored + EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` + // RestorePointCreationDate - READ-ONLY; The time the backup was taken + RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"` + // RestorePointLabel - READ-ONLY; The label of restore point for backup request by user + RestorePointLabel *string `json:"restorePointLabel,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePointProperties. +func (rpp RestorePointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// BasicSecretBase the base definition of a secret type. +type BasicSecretBase interface { + AsSecureString() (*SecureString, bool) + AsSecretBase() (*SecretBase, bool) +} + +// SecretBase the base definition of a secret type. +type SecretBase struct { + // Type - Possible values include: 'TypeBasicSecretBaseTypeSecretBase', 'TypeBasicSecretBaseTypeSecureString' + Type TypeBasicSecretBase `json:"type,omitempty"` +} + +func unmarshalBasicSecretBase(body []byte) (BasicSecretBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeBasicSecretBaseTypeSecureString): + var ss SecureString + err := json.Unmarshal(body, &ss) + return ss, err + default: + var sb SecretBase + err := json.Unmarshal(body, &sb) + return sb, err + } +} +func unmarshalBasicSecretBaseArray(body []byte) ([]BasicSecretBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sbArray := make([]BasicSecretBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sb, err := unmarshalBasicSecretBase(*rawMessage) + if err != nil { + return nil, err + } + sbArray[index] = sb + } + return sbArray, nil +} + +// MarshalJSON is the custom marshaler for SecretBase. +func (sb SecretBase) MarshalJSON() ([]byte, error) { + sb.Type = TypeBasicSecretBaseTypeSecretBase + objectMap := make(map[string]interface{}) + if sb.Type != "" { + objectMap["type"] = sb.Type + } + return json.Marshal(objectMap) +} + +// AsSecureString is the BasicSecretBase implementation for SecretBase. +func (sb SecretBase) AsSecureString() (*SecureString, bool) { + return nil, false +} + +// AsSecretBase is the BasicSecretBase implementation for SecretBase. +func (sb SecretBase) AsSecretBase() (*SecretBase, bool) { + return &sb, true +} + +// AsBasicSecretBase is the BasicSecretBase implementation for SecretBase. +func (sb SecretBase) AsBasicSecretBase() (BasicSecretBase, bool) { + return &sb, true +} + +// SecureString azure Synapse secure string definition. The string value will be masked with asterisks '*' +// during Get or List API calls. +type SecureString struct { + // Value - Value of secure string. + Value *string `json:"value,omitempty"` + // Type - Possible values include: 'TypeBasicSecretBaseTypeSecretBase', 'TypeBasicSecretBaseTypeSecureString' + Type TypeBasicSecretBase `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecureString. +func (ss SecureString) MarshalJSON() ([]byte, error) { + ss.Type = TypeBasicSecretBaseTypeSecureString + objectMap := make(map[string]interface{}) + if ss.Value != nil { + objectMap["value"] = ss.Value + } + if ss.Type != "" { + objectMap["type"] = ss.Type + } + return json.Marshal(objectMap) +} + +// AsSecureString is the BasicSecretBase implementation for SecureString. +func (ss SecureString) AsSecureString() (*SecureString, bool) { + return &ss, true +} + +// AsSecretBase is the BasicSecretBase implementation for SecureString. +func (ss SecureString) AsSecretBase() (*SecretBase, bool) { + return nil, false +} + +// AsBasicSecretBase is the BasicSecretBase implementation for SecureString. +func (ss SecureString) AsBasicSecretBase() (BasicSecretBase, bool) { + return &ss, true +} + +// SecurityAlertPolicyProperties properties of a security alert policy. +type SecurityAlertPolicyProperties struct { + // State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific Sql pool. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' + State SecurityAlertPolicyState `json:"state,omitempty"` + // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action + DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` + // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. + EmailAddresses *[]string `json:"emailAddresses,omitempty"` + // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. + EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + StorageEndpoint *string `json:"storageEndpoint,omitempty"` + // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // CreationTime - READ-ONLY; Specifies the UTC creation time of the policy. + CreationTime *date.Time `json:"creationTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityAlertPolicyProperties. +func (sapp SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sapp.State != "" { + objectMap["state"] = sapp.State + } + if sapp.DisabledAlerts != nil { + objectMap["disabledAlerts"] = sapp.DisabledAlerts + } + if sapp.EmailAddresses != nil { + objectMap["emailAddresses"] = sapp.EmailAddresses + } + if sapp.EmailAccountAdmins != nil { + objectMap["emailAccountAdmins"] = sapp.EmailAccountAdmins + } + if sapp.StorageEndpoint != nil { + objectMap["storageEndpoint"] = sapp.StorageEndpoint + } + if sapp.StorageAccountAccessKey != nil { + objectMap["storageAccountAccessKey"] = sapp.StorageAccountAccessKey + } + if sapp.RetentionDays != nil { + objectMap["retentionDays"] = sapp.RetentionDays + } + return json.Marshal(objectMap) +} + +// SelfHostedIntegrationRuntime self-hosted integration runtime. +type SelfHostedIntegrationRuntime struct { + // SelfHostedIntegrationRuntimeTypeProperties - When this property is not null, means this is a linked integration runtime. The property is used to access original integration runtime. + *SelfHostedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Description - Integration runtime description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntime. +func (shir SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { + shir.Type = TypeSelfHosted + objectMap := make(map[string]interface{}) + if shir.SelfHostedIntegrationRuntimeTypeProperties != nil { + objectMap["typeProperties"] = shir.SelfHostedIntegrationRuntimeTypeProperties + } + if shir.Description != nil { + objectMap["description"] = shir.Description + } + if shir.Type != "" { + objectMap["type"] = shir.Type + } + for k, v := range shir.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. +func (shir SelfHostedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) { + return nil, false +} + +// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. +func (shir SelfHostedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) { + return &shir, true +} + +// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. +func (shir SelfHostedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) { + return nil, false +} + +// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. +func (shir SelfHostedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) { + return &shir, true +} + +// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntime struct. +func (shir *SelfHostedIntegrationRuntime) 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 "typeProperties": + if v != nil { + var selfHostedIntegrationRuntimeTypeProperties SelfHostedIntegrationRuntimeTypeProperties + err = json.Unmarshal(*v, &selfHostedIntegrationRuntimeTypeProperties) + if err != nil { + return err + } + shir.SelfHostedIntegrationRuntimeTypeProperties = &selfHostedIntegrationRuntimeTypeProperties + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if shir.AdditionalProperties == nil { + shir.AdditionalProperties = make(map[string]interface{}) + } + shir.AdditionalProperties[k] = additionalProperties + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + shir.Description = &description + } + case "type": + if v != nil { + var typeVar Type + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + shir.Type = typeVar + } + } + } + + return nil +} + +// SelfHostedIntegrationRuntimeNode properties of Self-hosted integration runtime node. +type SelfHostedIntegrationRuntimeNode struct { + autorest.Response `json:"-"` + // NodeName - READ-ONLY; Name of the integration runtime node. + NodeName *string `json:"nodeName,omitempty"` + // MachineName - READ-ONLY; Machine name of the integration runtime node. + MachineName *string `json:"machineName,omitempty"` + // HostServiceURI - READ-ONLY; URI for the host machine of the integration runtime. + HostServiceURI *string `json:"hostServiceUri,omitempty"` + // Status - READ-ONLY; Status of the integration runtime node. Possible values include: 'SelfHostedIntegrationRuntimeNodeStatusNeedRegistration', 'SelfHostedIntegrationRuntimeNodeStatusOnline', 'SelfHostedIntegrationRuntimeNodeStatusLimited', 'SelfHostedIntegrationRuntimeNodeStatusOffline', 'SelfHostedIntegrationRuntimeNodeStatusUpgrading', 'SelfHostedIntegrationRuntimeNodeStatusInitializing', 'SelfHostedIntegrationRuntimeNodeStatusInitializeFailed' + Status SelfHostedIntegrationRuntimeNodeStatus `json:"status,omitempty"` + // Capabilities - READ-ONLY; The integration runtime capabilities dictionary + Capabilities map[string]*string `json:"capabilities"` + // VersionStatus - READ-ONLY; Status of the integration runtime node version. + VersionStatus *string `json:"versionStatus,omitempty"` + // Version - READ-ONLY; Version of the integration runtime node. + Version *string `json:"version,omitempty"` + // RegisterTime - READ-ONLY; The time at which the integration runtime node was registered in ISO8601 format. + RegisterTime *date.Time `json:"registerTime,omitempty"` + // LastConnectTime - READ-ONLY; The most recent time at which the integration runtime was connected in ISO8601 format. + LastConnectTime *date.Time `json:"lastConnectTime,omitempty"` + // ExpiryTime - READ-ONLY; The time at which the integration runtime will expire in ISO8601 format. + ExpiryTime *date.Time `json:"expiryTime,omitempty"` + // LastStartTime - READ-ONLY; The time the node last started up. + LastStartTime *date.Time `json:"lastStartTime,omitempty"` + // LastStopTime - READ-ONLY; The integration runtime node last stop time. + LastStopTime *date.Time `json:"lastStopTime,omitempty"` + // LastUpdateResult - READ-ONLY; The result of the last integration runtime node update. Possible values include: 'IntegrationRuntimeUpdateResultNone', 'IntegrationRuntimeUpdateResultSucceed', 'IntegrationRuntimeUpdateResultFail' + LastUpdateResult IntegrationRuntimeUpdateResult `json:"lastUpdateResult,omitempty"` + // LastStartUpdateTime - READ-ONLY; The last time for the integration runtime node update start. + LastStartUpdateTime *date.Time `json:"lastStartUpdateTime,omitempty"` + // LastEndUpdateTime - READ-ONLY; The last time for the integration runtime node update end. + LastEndUpdateTime *date.Time `json:"lastEndUpdateTime,omitempty"` + // IsActiveDispatcher - READ-ONLY; Indicates whether this node is the active dispatcher for integration runtime requests. + IsActiveDispatcher *bool `json:"isActiveDispatcher,omitempty"` + // ConcurrentJobsLimit - READ-ONLY; Maximum concurrent jobs on the integration runtime node. + ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"` + // MaxConcurrentJobs - READ-ONLY; The maximum concurrent jobs in this integration runtime. + MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"` +} + +// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeNode. +func (shirn SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SelfHostedIntegrationRuntimeStatus self-hosted integration runtime status. +type SelfHostedIntegrationRuntimeStatus struct { + // SelfHostedIntegrationRuntimeStatusTypeProperties - Self-hosted integration runtime status type properties. + *SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to. + DataFactoryName *string `json:"dataFactoryName,omitempty"` + // State - READ-ONLY; The state of integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' + State IntegrationRuntimeState `json:"state,omitempty"` + // Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted' + Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatus. +func (shirs SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + shirs.Type = TypeBasicIntegrationRuntimeStatusTypeSelfHosted + objectMap := make(map[string]interface{}) + if shirs.SelfHostedIntegrationRuntimeStatusTypeProperties != nil { + objectMap["typeProperties"] = shirs.SelfHostedIntegrationRuntimeStatusTypeProperties + } + if shirs.Type != "" { + objectMap["type"] = shirs.Type + } + for k, v := range shirs.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. +func (shirs SelfHostedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) { + return nil, false +} + +// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. +func (shirs SelfHostedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) { + return &shirs, true +} + +// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. +func (shirs SelfHostedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) { + return nil, false +} + +// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. +func (shirs SelfHostedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) { + return &shirs, true +} + +// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeStatus struct. +func (shirs *SelfHostedIntegrationRuntimeStatus) 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 "typeProperties": + if v != nil { + var selfHostedIntegrationRuntimeStatusTypeProperties SelfHostedIntegrationRuntimeStatusTypeProperties + err = json.Unmarshal(*v, &selfHostedIntegrationRuntimeStatusTypeProperties) + if err != nil { + return err + } + shirs.SelfHostedIntegrationRuntimeStatusTypeProperties = &selfHostedIntegrationRuntimeStatusTypeProperties + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if shirs.AdditionalProperties == nil { + shirs.AdditionalProperties = make(map[string]interface{}) + } + shirs.AdditionalProperties[k] = additionalProperties + } + case "dataFactoryName": + if v != nil { + var dataFactoryName string + err = json.Unmarshal(*v, &dataFactoryName) + if err != nil { + return err + } + shirs.DataFactoryName = &dataFactoryName + } + case "state": + if v != nil { + var state IntegrationRuntimeState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + shirs.State = state + } + case "type": + if v != nil { + var typeVar TypeBasicIntegrationRuntimeStatus + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + shirs.Type = typeVar + } + } + } + + return nil +} + +// SelfHostedIntegrationRuntimeStatusTypeProperties self-hosted integration runtime status type properties. +type SelfHostedIntegrationRuntimeStatusTypeProperties struct { + // CreateTime - READ-ONLY; The time at which the integration runtime was created, in ISO8601 format. + CreateTime *date.Time `json:"createTime,omitempty"` + // TaskQueueID - READ-ONLY; The task queue id of the integration runtime. + TaskQueueID *string `json:"taskQueueId,omitempty"` + // NodeCommunicationChannelEncryptionMode - READ-ONLY; The node communication Channel encryption mode + NodeCommunicationChannelEncryptionMode *string `json:"nodeCommunicationChannelEncryptionMode,omitempty"` + // InternalChannelEncryption - READ-ONLY; It is used to set the encryption mode for node-node communication channel (when more than 2 self-hosted integration runtime nodes exist). Possible values include: 'IntegrationRuntimeInternalChannelEncryptionModeNotSet', 'IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted', 'IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted' + InternalChannelEncryption IntegrationRuntimeInternalChannelEncryptionMode `json:"internalChannelEncryption,omitempty"` + // Version - READ-ONLY; Version of the integration runtime. + Version *string `json:"version,omitempty"` + // Nodes - The list of nodes for this integration runtime. + Nodes *[]SelfHostedIntegrationRuntimeNode `json:"nodes,omitempty"` + // ScheduledUpdateDate - READ-ONLY; The date at which the integration runtime will be scheduled to update, in ISO8601 format. + ScheduledUpdateDate *date.Time `json:"scheduledUpdateDate,omitempty"` + // UpdateDelayOffset - READ-ONLY; The time in the date scheduled by service to update the integration runtime, e.g., PT03H is 3 hours + UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"` + // LocalTimeZoneOffset - READ-ONLY; The local time zone offset in hours. + LocalTimeZoneOffset *string `json:"localTimeZoneOffset,omitempty"` + // Capabilities - READ-ONLY; Object with additional information about integration runtime capabilities. + Capabilities map[string]*string `json:"capabilities"` + // ServiceUrls - READ-ONLY; The URLs for the services used in integration runtime backend service. + ServiceUrls *[]string `json:"serviceUrls,omitempty"` + // AutoUpdate - READ-ONLY; Whether Self-hosted integration runtime auto update has been turned on. Possible values include: 'IntegrationRuntimeAutoUpdateOn', 'IntegrationRuntimeAutoUpdateOff' + AutoUpdate IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"` + // VersionStatus - READ-ONLY; Status of the integration runtime version. + VersionStatus *string `json:"versionStatus,omitempty"` + // Links - The list of linked integration runtimes that are created to share with this integration runtime. + Links *[]LinkedIntegrationRuntime `json:"links,omitempty"` + // PushedVersion - READ-ONLY; The version that the integration runtime is going to update to. + PushedVersion *string `json:"pushedVersion,omitempty"` + // LatestVersion - READ-ONLY; The latest version on download center. + LatestVersion *string `json:"latestVersion,omitempty"` + // AutoUpdateETA - READ-ONLY; The estimated time when the self-hosted integration runtime will be updated. + AutoUpdateETA *date.Time `json:"autoUpdateETA,omitempty"` +} + +// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatusTypeProperties. +func (shirstp SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if shirstp.Nodes != nil { + objectMap["nodes"] = shirstp.Nodes + } + if shirstp.Links != nil { + objectMap["links"] = shirstp.Links + } + return json.Marshal(objectMap) +} + +// SelfHostedIntegrationRuntimeTypeProperties the self-hosted integration runtime properties. +type SelfHostedIntegrationRuntimeTypeProperties struct { + // LinkedInfo - Linked integration runtime type from data factory + LinkedInfo BasicLinkedIntegrationRuntimeType `json:"linkedInfo,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeTypeProperties struct. +func (shirtp *SelfHostedIntegrationRuntimeTypeProperties) 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 "linkedInfo": + if v != nil { + linkedInfo, err := unmarshalBasicLinkedIntegrationRuntimeType(*v) + if err != nil { + return err + } + shirtp.LinkedInfo = linkedInfo + } + } + } + + return nil +} + +// SensitivityLabel a sensitivity label. +type SensitivityLabel struct { + autorest.Response `json:"-"` + // SensitivityLabelProperties - Resource properties. + *SensitivityLabelProperties `json:"properties,omitempty"` + // ManagedBy - READ-ONLY; managed by + ManagedBy *string `json:"managedBy,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SensitivityLabel. +func (sl SensitivityLabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sl.SensitivityLabelProperties != nil { + objectMap["properties"] = sl.SensitivityLabelProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SensitivityLabel struct. +func (sl *SensitivityLabel) 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 sensitivityLabelProperties SensitivityLabelProperties + err = json.Unmarshal(*v, &sensitivityLabelProperties) + if err != nil { + return err + } + sl.SensitivityLabelProperties = &sensitivityLabelProperties + } + case "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + sl.ManagedBy = &managedBy + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sl.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sl.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sl.Type = &typeVar + } + } + } + + return nil +} + +// SensitivityLabelListResult a list of sensitivity labels. +type SensitivityLabelListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SensitivityLabel `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SensitivityLabelListResult. +func (sllr SensitivityLabelListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SensitivityLabelListResultIterator provides access to a complete listing of SensitivityLabel values. +type SensitivityLabelListResultIterator struct { + i int + page SensitivityLabelListResultPage +} + +// 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 *SensitivityLabelListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultIterator.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 *SensitivityLabelListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SensitivityLabelListResultIterator) 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 SensitivityLabelListResultIterator) Response() SensitivityLabelListResult { + 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 SensitivityLabelListResultIterator) Value() SensitivityLabel { + if !iter.page.NotDone() { + return SensitivityLabel{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SensitivityLabelListResultIterator type. +func NewSensitivityLabelListResultIterator(page SensitivityLabelListResultPage) SensitivityLabelListResultIterator { + return SensitivityLabelListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sllr SensitivityLabelListResult) IsEmpty() bool { + return sllr.Value == nil || len(*sllr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sllr SensitivityLabelListResult) hasNextLink() bool { + return sllr.NextLink != nil && len(*sllr.NextLink) != 0 +} + +// sensitivityLabelListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sllr SensitivityLabelListResult) sensitivityLabelListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sllr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sllr.NextLink))) +} + +// SensitivityLabelListResultPage contains a page of SensitivityLabel values. +type SensitivityLabelListResultPage struct { + fn func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error) + sllr SensitivityLabelListResult +} + +// 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 *SensitivityLabelListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sllr) + if err != nil { + return err + } + page.sllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SensitivityLabelListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SensitivityLabelListResultPage) NotDone() bool { + return !page.sllr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SensitivityLabelListResultPage) Response() SensitivityLabelListResult { + return page.sllr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SensitivityLabelListResultPage) Values() []SensitivityLabel { + if page.sllr.IsEmpty() { + return nil + } + return *page.sllr.Value +} + +// Creates a new instance of the SensitivityLabelListResultPage type. +func NewSensitivityLabelListResultPage(cur SensitivityLabelListResult, getNextPage func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)) SensitivityLabelListResultPage { + return SensitivityLabelListResultPage{ + fn: getNextPage, + sllr: cur, + } +} + +// SensitivityLabelProperties properties of a sensitivity label. +type SensitivityLabelProperties struct { + // SchemaName - READ-ONLY; The schema name. + SchemaName *string `json:"schemaName,omitempty"` + // TableName - READ-ONLY; The table name. + TableName *string `json:"tableName,omitempty"` + // ColumnName - READ-ONLY; The column name. + ColumnName *string `json:"columnName,omitempty"` + // LabelName - The label name. + LabelName *string `json:"labelName,omitempty"` + // LabelID - The label ID. + LabelID *string `json:"labelId,omitempty"` + // InformationType - The information type. + InformationType *string `json:"informationType,omitempty"` + // InformationTypeID - The information type ID. + InformationTypeID *string `json:"informationTypeId,omitempty"` + // IsDisabled - READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. + IsDisabled *bool `json:"isDisabled,omitempty"` + // Rank - Possible values include: 'SensitivityLabelRankNone', 'SensitivityLabelRankLow', 'SensitivityLabelRankMedium', 'SensitivityLabelRankHigh', 'SensitivityLabelRankCritical' + Rank SensitivityLabelRank `json:"rank,omitempty"` +} + +// MarshalJSON is the custom marshaler for SensitivityLabelProperties. +func (slp SensitivityLabelProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if slp.LabelName != nil { + objectMap["labelName"] = slp.LabelName + } + if slp.LabelID != nil { + objectMap["labelId"] = slp.LabelID + } + if slp.InformationType != nil { + objectMap["informationType"] = slp.InformationType + } + if slp.InformationTypeID != nil { + objectMap["informationTypeId"] = slp.InformationTypeID + } + if slp.Rank != "" { + objectMap["rank"] = slp.Rank + } + return json.Marshal(objectMap) +} + +// SensitivityLabelUpdate a sensitivity label update operation. +type SensitivityLabelUpdate struct { + // SensitivityLabelUpdateProperties - Resource properties. + *SensitivityLabelUpdateProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SensitivityLabelUpdate. +func (slu SensitivityLabelUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if slu.SensitivityLabelUpdateProperties != nil { + objectMap["properties"] = slu.SensitivityLabelUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SensitivityLabelUpdate struct. +func (slu *SensitivityLabelUpdate) 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 sensitivityLabelUpdateProperties SensitivityLabelUpdateProperties + err = json.Unmarshal(*v, &sensitivityLabelUpdateProperties) + if err != nil { + return err + } + slu.SensitivityLabelUpdateProperties = &sensitivityLabelUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + slu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + slu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + slu.Type = &typeVar + } + } + } + + return nil +} + +// SensitivityLabelUpdateList a list of sensitivity label update operations. +type SensitivityLabelUpdateList struct { + Operations *[]SensitivityLabelUpdate `json:"operations,omitempty"` +} + +// SensitivityLabelUpdateProperties properties of an operation executed on a sensitivity label. +type SensitivityLabelUpdateProperties struct { + // Op - Possible values include: 'SensitivityLabelUpdateKindSet', 'SensitivityLabelUpdateKindRemove' + Op SensitivityLabelUpdateKind `json:"op,omitempty"` + // Schema - Schema name of the column to update. + Schema *string `json:"schema,omitempty"` + // Table - Table name of the column to update. + Table *string `json:"table,omitempty"` + // Column - Column name to update. + Column *string `json:"column,omitempty"` + // SensitivityLabel - The sensitivity label information to apply on a column. + SensitivityLabel *SensitivityLabel `json:"sensitivityLabel,omitempty"` +} + +// ServerBlobAuditingPolicy a server blob auditing policy. +type ServerBlobAuditingPolicy struct { + autorest.Response `json:"-"` + // ServerBlobAuditingPolicyProperties - Resource properties. + *ServerBlobAuditingPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicy. +func (sbap ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sbap.ServerBlobAuditingPolicyProperties != nil { + objectMap["properties"] = sbap.ServerBlobAuditingPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServerBlobAuditingPolicy struct. +func (sbap *ServerBlobAuditingPolicy) 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 serverBlobAuditingPolicyProperties ServerBlobAuditingPolicyProperties + err = json.Unmarshal(*v, &serverBlobAuditingPolicyProperties) + if err != nil { + return err + } + sbap.ServerBlobAuditingPolicyProperties = &serverBlobAuditingPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sbap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sbap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sbap.Type = &typeVar + } + } + } + + return nil +} + +// ServerBlobAuditingPolicyListResult a list of server auditing settings. +type ServerBlobAuditingPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ServerBlobAuditingPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicyListResult. +func (sbaplr ServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServerBlobAuditingPolicyListResultIterator provides access to a complete listing of +// ServerBlobAuditingPolicy values. +type ServerBlobAuditingPolicyListResultIterator struct { + i int + page ServerBlobAuditingPolicyListResultPage +} + +// 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 *ServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultIterator.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 *ServerBlobAuditingPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServerBlobAuditingPolicyListResultIterator) 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 ServerBlobAuditingPolicyListResultIterator) Response() ServerBlobAuditingPolicyListResult { + 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 ServerBlobAuditingPolicyListResultIterator) Value() ServerBlobAuditingPolicy { + if !iter.page.NotDone() { + return ServerBlobAuditingPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServerBlobAuditingPolicyListResultIterator type. +func NewServerBlobAuditingPolicyListResultIterator(page ServerBlobAuditingPolicyListResultPage) ServerBlobAuditingPolicyListResultIterator { + return ServerBlobAuditingPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sbaplr ServerBlobAuditingPolicyListResult) IsEmpty() bool { + return sbaplr.Value == nil || len(*sbaplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sbaplr ServerBlobAuditingPolicyListResult) hasNextLink() bool { + return sbaplr.NextLink != nil && len(*sbaplr.NextLink) != 0 +} + +// serverBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sbaplr ServerBlobAuditingPolicyListResult) serverBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sbaplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sbaplr.NextLink))) +} + +// ServerBlobAuditingPolicyListResultPage contains a page of ServerBlobAuditingPolicy values. +type ServerBlobAuditingPolicyListResultPage struct { + fn func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error) + sbaplr ServerBlobAuditingPolicyListResult +} + +// 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 *ServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sbaplr) + if err != nil { + return err + } + page.sbaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServerBlobAuditingPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServerBlobAuditingPolicyListResultPage) NotDone() bool { + return !page.sbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServerBlobAuditingPolicyListResultPage) Response() ServerBlobAuditingPolicyListResult { + return page.sbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServerBlobAuditingPolicyListResultPage) Values() []ServerBlobAuditingPolicy { + if page.sbaplr.IsEmpty() { + return nil + } + return *page.sbaplr.Value +} + +// Creates a new instance of the ServerBlobAuditingPolicyListResultPage type. +func NewServerBlobAuditingPolicyListResultPage(cur ServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error)) ServerBlobAuditingPolicyListResultPage { + return ServerBlobAuditingPolicyListResultPage{ + fn: getNextPage, + sbaplr: cur, + } +} + +// ServerBlobAuditingPolicyProperties properties of a server blob auditing policy. +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 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, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. + // + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + // + // BATCH_COMPLETED_GROUP, + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + // FAILED_DATABASE_AUTHENTICATION_GROUP. + // + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + // + // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + // BACKUP_RESTORE_GROUP + // DATABASE_LOGOUT_GROUP + // DATABASE_OBJECT_CHANGE_GROUP + // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + // DATABASE_OPERATION_GROUP + // DATABASE_PERMISSION_CHANGE_GROUP + // DATABASE_PRINCIPAL_CHANGE_GROUP + // DATABASE_PRINCIPAL_IMPERSONATION_GROUP + // DATABASE_ROLE_MEMBER_CHANGE_GROUP + // FAILED_DATABASE_AUTHENTICATION_GROUP + // SCHEMA_OBJECT_ACCESS_GROUP + // SCHEMA_OBJECT_CHANGE_GROUP + // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + // USER_CHANGE_PASSWORD_GROUP + // BATCH_STARTED_GROUP + // BATCH_COMPLETED_GROUP + // + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + // + // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + // + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + // SELECT + // UPDATE + // INSERT + // DELETE + // EXECUTE + // RECEIVE + // REFERENCES + // + // The general form for defining an action to be audited is: + // {action} ON {object} BY {principal} + // + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + // + // For example: + // SELECT on dbo.myTable by public + // SELECT on DATABASE::myDatabase by public + // SELECT on SCHEMA::mySchema by public + // + // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` + // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. + // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + // + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + // Note that for server level audit you should use the 'master' database as {databaseName}. + // + // Diagnostic Settings URI format: + // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // + // 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"` +} + +// ServerSecurityAlertPolicy workspace managed Sql server security alert policy. +type ServerSecurityAlertPolicy struct { + autorest.Response `json:"-"` + // ServerSecurityAlertPolicyProperties - Resource properties. + *ServerSecurityAlertPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy. +func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssap.ServerSecurityAlertPolicyProperties != nil { + objectMap["properties"] = ssap.ServerSecurityAlertPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServerSecurityAlertPolicy struct. +func (ssap *ServerSecurityAlertPolicy) 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 serverSecurityAlertPolicyProperties ServerSecurityAlertPolicyProperties + err = json.Unmarshal(*v, &serverSecurityAlertPolicyProperties) + if err != nil { + return err + } + ssap.ServerSecurityAlertPolicyProperties = &serverSecurityAlertPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ssap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ssap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ssap.Type = &typeVar + } + } + } + + return nil +} + +// ServerSecurityAlertPolicyListResult a list of the workspace managed sql server's security alert +// policies. +type ServerSecurityAlertPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ServerSecurityAlertPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicyListResult. +func (ssaplr ServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServerSecurityAlertPolicyListResultIterator provides access to a complete listing of +// ServerSecurityAlertPolicy values. +type ServerSecurityAlertPolicyListResultIterator struct { + i int + page ServerSecurityAlertPolicyListResultPage +} + +// 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 *ServerSecurityAlertPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPolicyListResultIterator.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 *ServerSecurityAlertPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServerSecurityAlertPolicyListResultIterator) 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 ServerSecurityAlertPolicyListResultIterator) Response() ServerSecurityAlertPolicyListResult { + 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 ServerSecurityAlertPolicyListResultIterator) Value() ServerSecurityAlertPolicy { + if !iter.page.NotDone() { + return ServerSecurityAlertPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServerSecurityAlertPolicyListResultIterator type. +func NewServerSecurityAlertPolicyListResultIterator(page ServerSecurityAlertPolicyListResultPage) ServerSecurityAlertPolicyListResultIterator { + return ServerSecurityAlertPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ssaplr ServerSecurityAlertPolicyListResult) IsEmpty() bool { + return ssaplr.Value == nil || len(*ssaplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ssaplr ServerSecurityAlertPolicyListResult) hasNextLink() bool { + return ssaplr.NextLink != nil && len(*ssaplr.NextLink) != 0 +} + +// serverSecurityAlertPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ssaplr ServerSecurityAlertPolicyListResult) serverSecurityAlertPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !ssaplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ssaplr.NextLink))) +} + +// ServerSecurityAlertPolicyListResultPage contains a page of ServerSecurityAlertPolicy values. +type ServerSecurityAlertPolicyListResultPage struct { + fn func(context.Context, ServerSecurityAlertPolicyListResult) (ServerSecurityAlertPolicyListResult, error) + ssaplr ServerSecurityAlertPolicyListResult +} + +// 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 *ServerSecurityAlertPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ssaplr) + if err != nil { + return err + } + page.ssaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServerSecurityAlertPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServerSecurityAlertPolicyListResultPage) NotDone() bool { + return !page.ssaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServerSecurityAlertPolicyListResultPage) Response() ServerSecurityAlertPolicyListResult { + return page.ssaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServerSecurityAlertPolicyListResultPage) Values() []ServerSecurityAlertPolicy { + if page.ssaplr.IsEmpty() { + return nil + } + return *page.ssaplr.Value +} + +// Creates a new instance of the ServerSecurityAlertPolicyListResultPage type. +func NewServerSecurityAlertPolicyListResultPage(cur ServerSecurityAlertPolicyListResult, getNextPage func(context.Context, ServerSecurityAlertPolicyListResult) (ServerSecurityAlertPolicyListResult, error)) ServerSecurityAlertPolicyListResultPage { + return ServerSecurityAlertPolicyListResultPage{ + fn: getNextPage, + ssaplr: cur, + } +} + +// ServerSecurityAlertPolicyProperties properties of a security alert policy. +type ServerSecurityAlertPolicyProperties struct { + // State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific server. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' + State SecurityAlertPolicyState `json:"state,omitempty"` + // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action + DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` + // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. + EmailAddresses *[]string `json:"emailAddresses,omitempty"` + // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. + EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + StorageEndpoint *string `json:"storageEndpoint,omitempty"` + // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // CreationTime - READ-ONLY; Specifies the UTC creation time of the policy. + CreationTime *date.Time `json:"creationTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicyProperties. +func (ssapp ServerSecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssapp.State != "" { + objectMap["state"] = ssapp.State + } + if ssapp.DisabledAlerts != nil { + objectMap["disabledAlerts"] = ssapp.DisabledAlerts + } + if ssapp.EmailAddresses != nil { + objectMap["emailAddresses"] = ssapp.EmailAddresses + } + if ssapp.EmailAccountAdmins != nil { + objectMap["emailAccountAdmins"] = ssapp.EmailAccountAdmins + } + if ssapp.StorageEndpoint != nil { + objectMap["storageEndpoint"] = ssapp.StorageEndpoint + } + if ssapp.StorageAccountAccessKey != nil { + objectMap["storageAccountAccessKey"] = ssapp.StorageAccountAccessKey + } + if ssapp.RetentionDays != nil { + objectMap["retentionDays"] = ssapp.RetentionDays + } + return json.Marshal(objectMap) +} + +// ServerUsage represents server metrics. +type ServerUsage struct { + // Name - READ-ONLY; Name of the server usage metric. + Name *string `json:"name,omitempty"` + // ResourceName - READ-ONLY; The name of the resource. + ResourceName *string `json:"resourceName,omitempty"` + // DisplayName - READ-ONLY; The metric display name. + DisplayName *string `json:"displayName,omitempty"` + // CurrentValue - READ-ONLY; The current value of the metric. + CurrentValue *float64 `json:"currentValue,omitempty"` + // Limit - READ-ONLY; The current limit of the metric. + Limit *float64 `json:"limit,omitempty"` + // Unit - READ-ONLY; The units of the metric. + Unit *string `json:"unit,omitempty"` + // NextResetTime - READ-ONLY; The next reset time for the metric (ISO8601 format). + NextResetTime *date.Time `json:"nextResetTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerUsage. +func (su ServerUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServerUsageListResult represents the response to a list server metrics request. +type ServerUsageListResult struct { + autorest.Response `json:"-"` + // Value - The list of server metrics for the server. + Value *[]ServerUsage `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerUsageListResult. +func (sulr ServerUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sulr.Value != nil { + objectMap["value"] = sulr.Value + } + return json.Marshal(objectMap) +} + +// ServerUsageListResultIterator provides access to a complete listing of ServerUsage values. +type ServerUsageListResultIterator struct { + i int + page ServerUsageListResultPage +} + +// 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 *ServerUsageListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsageListResultIterator.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 *ServerUsageListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServerUsageListResultIterator) 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 ServerUsageListResultIterator) Response() ServerUsageListResult { + 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 ServerUsageListResultIterator) Value() ServerUsage { + if !iter.page.NotDone() { + return ServerUsage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServerUsageListResultIterator type. +func NewServerUsageListResultIterator(page ServerUsageListResultPage) ServerUsageListResultIterator { + return ServerUsageListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sulr ServerUsageListResult) IsEmpty() bool { + return sulr.Value == nil || len(*sulr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sulr ServerUsageListResult) hasNextLink() bool { + return sulr.NextLink != nil && len(*sulr.NextLink) != 0 +} + +// serverUsageListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sulr ServerUsageListResult) serverUsageListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sulr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sulr.NextLink))) +} + +// ServerUsageListResultPage contains a page of ServerUsage values. +type ServerUsageListResultPage struct { + fn func(context.Context, ServerUsageListResult) (ServerUsageListResult, error) + sulr ServerUsageListResult +} + +// 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 *ServerUsageListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsageListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sulr) + if err != nil { + return err + } + page.sulr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServerUsageListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServerUsageListResultPage) NotDone() bool { + return !page.sulr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServerUsageListResultPage) Response() ServerUsageListResult { + return page.sulr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServerUsageListResultPage) Values() []ServerUsage { + if page.sulr.IsEmpty() { + return nil + } + return *page.sulr.Value +} + +// Creates a new instance of the ServerUsageListResultPage type. +func NewServerUsageListResultPage(cur ServerUsageListResult, getNextPage func(context.Context, ServerUsageListResult) (ServerUsageListResult, error)) ServerUsageListResultPage { + return ServerUsageListResultPage{ + fn: getNextPage, + sulr: cur, + } +} + +// ServerVulnerabilityAssessment a server vulnerability assessment. +type ServerVulnerabilityAssessment struct { + autorest.Response `json:"-"` + // ServerVulnerabilityAssessmentProperties - Resource properties. + *ServerVulnerabilityAssessmentProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessment. +func (sva ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sva.ServerVulnerabilityAssessmentProperties != nil { + objectMap["properties"] = sva.ServerVulnerabilityAssessmentProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServerVulnerabilityAssessment struct. +func (sva *ServerVulnerabilityAssessment) 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 serverVulnerabilityAssessmentProperties ServerVulnerabilityAssessmentProperties + err = json.Unmarshal(*v, &serverVulnerabilityAssessmentProperties) + if err != nil { + return err + } + sva.ServerVulnerabilityAssessmentProperties = &serverVulnerabilityAssessmentProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sva.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sva.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sva.Type = &typeVar + } + } + } + + return nil +} + +// ServerVulnerabilityAssessmentListResult a list of the server's vulnerability assessments. +type ServerVulnerabilityAssessmentListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ServerVulnerabilityAssessment `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessmentListResult. +func (svalr ServerVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ServerVulnerabilityAssessmentListResultIterator provides access to a complete listing of +// ServerVulnerabilityAssessment values. +type ServerVulnerabilityAssessmentListResultIterator struct { + i int + page ServerVulnerabilityAssessmentListResultPage +} + +// 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 *ServerVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultIterator.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 *ServerVulnerabilityAssessmentListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServerVulnerabilityAssessmentListResultIterator) 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 ServerVulnerabilityAssessmentListResultIterator) Response() ServerVulnerabilityAssessmentListResult { + 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 ServerVulnerabilityAssessmentListResultIterator) Value() ServerVulnerabilityAssessment { + if !iter.page.NotDone() { + return ServerVulnerabilityAssessment{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServerVulnerabilityAssessmentListResultIterator type. +func NewServerVulnerabilityAssessmentListResultIterator(page ServerVulnerabilityAssessmentListResultPage) ServerVulnerabilityAssessmentListResultIterator { + return ServerVulnerabilityAssessmentListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (svalr ServerVulnerabilityAssessmentListResult) IsEmpty() bool { + return svalr.Value == nil || len(*svalr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (svalr ServerVulnerabilityAssessmentListResult) hasNextLink() bool { + return svalr.NextLink != nil && len(*svalr.NextLink) != 0 +} + +// serverVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (svalr ServerVulnerabilityAssessmentListResult) serverVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { + if !svalr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(svalr.NextLink))) +} + +// ServerVulnerabilityAssessmentListResultPage contains a page of ServerVulnerabilityAssessment values. +type ServerVulnerabilityAssessmentListResultPage struct { + fn func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error) + svalr ServerVulnerabilityAssessmentListResult +} + +// 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 *ServerVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.svalr) + if err != nil { + return err + } + page.svalr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *ServerVulnerabilityAssessmentListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServerVulnerabilityAssessmentListResultPage) NotDone() bool { + return !page.svalr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServerVulnerabilityAssessmentListResultPage) Response() ServerVulnerabilityAssessmentListResult { + return page.svalr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServerVulnerabilityAssessmentListResultPage) Values() []ServerVulnerabilityAssessment { + if page.svalr.IsEmpty() { + return nil + } + return *page.svalr.Value +} + +// Creates a new instance of the ServerVulnerabilityAssessmentListResultPage type. +func NewServerVulnerabilityAssessmentListResultPage(cur ServerVulnerabilityAssessmentListResult, getNextPage func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error)) ServerVulnerabilityAssessmentListResultPage { + return ServerVulnerabilityAssessmentListResultPage{ + fn: getNextPage, + svalr: cur, + } +} + +// ServerVulnerabilityAssessmentProperties properties of a server Vulnerability Assessment. +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 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"` + // RecurringScans - The recurring scans settings + RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` +} + +// SetObject ... +type SetObject struct { + autorest.Response `json:"-"` + Value interface{} `json:"value,omitempty"` +} + +// Sku SQL pool SKU +type Sku struct { + // Tier - The service tier + Tier *string `json:"tier,omitempty"` + // Name - The SKU name + Name *string `json:"name,omitempty"` + // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + Capacity *int32 `json:"capacity,omitempty"` +} + +// SparkConfigProperties sparkConfig Properties for a Big Data pool powered by Apache Spark +type SparkConfigProperties struct { + // Time - READ-ONLY; The last update time of the spark config properties file. + Time *date.Time `json:"time,omitempty"` + // Content - The spark config properties. + Content *string `json:"content,omitempty"` + // Filename - The filename of the spark config properties file. + Filename *string `json:"filename,omitempty"` + // ConfigurationType - The type of the spark config properties file. Possible values include: 'ConfigurationTypeFile', 'ConfigurationTypeArtifact' + ConfigurationType ConfigurationType `json:"configurationType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SparkConfigProperties. +func (scp SparkConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scp.Content != nil { + objectMap["content"] = scp.Content + } + if scp.Filename != nil { + objectMap["filename"] = scp.Filename + } + if scp.ConfigurationType != "" { + objectMap["configurationType"] = scp.ConfigurationType + } + return json.Marshal(objectMap) +} + +// SparkConfigurationInfo sparkConfiguration Artifact information +type SparkConfigurationInfo struct { + // Description - Description about the SparkConfiguration. + Description *string `json:"description,omitempty"` + // Configs - SparkConfiguration configs. + Configs map[string]*string `json:"configs"` + // Annotations - Annotations for SparkConfiguration. + Annotations *[]string `json:"annotations,omitempty"` + // Notes - additional Notes. + Notes *string `json:"notes,omitempty"` + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // Created - The timestamp of resource creation. + Created *date.Time `json:"created,omitempty"` +} + +// MarshalJSON is the custom marshaler for SparkConfigurationInfo. +func (sci SparkConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sci.Description != nil { + objectMap["description"] = sci.Description + } + if sci.Configs != nil { + objectMap["configs"] = sci.Configs + } + if sci.Annotations != nil { + objectMap["annotations"] = sci.Annotations + } + if sci.Notes != nil { + objectMap["notes"] = sci.Notes + } + if sci.CreatedBy != nil { + objectMap["createdBy"] = sci.CreatedBy + } + if sci.Created != nil { + objectMap["created"] = sci.Created + } + return json.Marshal(objectMap) +} + +// SparkConfigurationListResponse a list of SparkConfiguration resources. +type SparkConfigurationListResponse struct { + autorest.Response `json:"-"` + // Value - List of SparkConfiguration. + Value *[]SparkConfigurationResource `json:"value,omitempty"` + // NextLink - The link to the next page of results, if any remaining results exist. + NextLink *string `json:"nextLink,omitempty"` +} + +// SparkConfigurationListResponseIterator provides access to a complete listing of +// SparkConfigurationResource values. +type SparkConfigurationListResponseIterator struct { + i int + page SparkConfigurationListResponsePage +} + +// 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 *SparkConfigurationListResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationListResponseIterator.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 *SparkConfigurationListResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SparkConfigurationListResponseIterator) 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 SparkConfigurationListResponseIterator) Response() SparkConfigurationListResponse { + 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 SparkConfigurationListResponseIterator) Value() SparkConfigurationResource { + if !iter.page.NotDone() { + return SparkConfigurationResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SparkConfigurationListResponseIterator type. +func NewSparkConfigurationListResponseIterator(page SparkConfigurationListResponsePage) SparkConfigurationListResponseIterator { + return SparkConfigurationListResponseIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sclr SparkConfigurationListResponse) IsEmpty() bool { + return sclr.Value == nil || len(*sclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sclr SparkConfigurationListResponse) hasNextLink() bool { + return sclr.NextLink != nil && len(*sclr.NextLink) != 0 +} + +// sparkConfigurationListResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sclr SparkConfigurationListResponse) sparkConfigurationListResponsePreparer(ctx context.Context) (*http.Request, error) { + if !sclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sclr.NextLink))) +} + +// SparkConfigurationListResponsePage contains a page of SparkConfigurationResource values. +type SparkConfigurationListResponsePage struct { + fn func(context.Context, SparkConfigurationListResponse) (SparkConfigurationListResponse, error) + sclr SparkConfigurationListResponse +} + +// 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 *SparkConfigurationListResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationListResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sclr) + if err != nil { + return err + } + page.sclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SparkConfigurationListResponsePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SparkConfigurationListResponsePage) NotDone() bool { + return !page.sclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SparkConfigurationListResponsePage) Response() SparkConfigurationListResponse { + return page.sclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SparkConfigurationListResponsePage) Values() []SparkConfigurationResource { + if page.sclr.IsEmpty() { + return nil + } + return *page.sclr.Value +} + +// Creates a new instance of the SparkConfigurationListResponsePage type. +func NewSparkConfigurationListResponsePage(cur SparkConfigurationListResponse, getNextPage func(context.Context, SparkConfigurationListResponse) (SparkConfigurationListResponse, error)) SparkConfigurationListResponsePage { + return SparkConfigurationListResponsePage{ + fn: getNextPage, + sclr: cur, + } +} + +// SparkConfigurationResource sparkConfiguration response details +type SparkConfigurationResource struct { + autorest.Response `json:"-"` + // SparkConfigurationInfo - SparkConfiguration properties. + *SparkConfigurationInfo `json:"properties,omitempty"` + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SparkConfigurationResource. +func (scr SparkConfigurationResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scr.SparkConfigurationInfo != nil { + objectMap["properties"] = scr.SparkConfigurationInfo + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SparkConfigurationResource struct. +func (scr *SparkConfigurationResource) 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 sparkConfigurationInfo SparkConfigurationInfo + err = json.Unmarshal(*v, &sparkConfigurationInfo) + if err != nil { + return err + } + scr.SparkConfigurationInfo = &sparkConfigurationInfo + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + scr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + scr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + scr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + scr.Type = &typeVar + } + } + } + + return nil +} + +// SQLPool a SQL Analytics pool +type SQLPool struct { + autorest.Response `json:"-"` + // Sku - SQL pool SKU + Sku *Sku `json:"sku,omitempty"` + // SQLPoolResourceProperties - SQL pool properties + *SQLPoolResourceProperties `json:"properties,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPool. +func (sp SQLPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.Sku != nil { + objectMap["sku"] = sp.Sku + } + if sp.SQLPoolResourceProperties != nil { + objectMap["properties"] = sp.SQLPoolResourceProperties + } + if sp.Tags != nil { + objectMap["tags"] = sp.Tags + } + if sp.Location != nil { + objectMap["location"] = sp.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPool struct. +func (sp *SQLPool) 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 "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + sp.Sku = &sku + } + case "properties": + if v != nil { + var SQLPoolResourceProperties SQLPoolResourceProperties + err = json.Unmarshal(*v, &SQLPoolResourceProperties) + if err != nil { + return err + } + sp.SQLPoolResourceProperties = &SQLPoolResourceProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sp.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sp.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolBlobAuditingPolicy a Sql pool blob auditing policy. +type SQLPoolBlobAuditingPolicy struct { + autorest.Response `json:"-"` + // Kind - READ-ONLY; Resource kind. + Kind *string `json:"kind,omitempty"` + // SQLPoolBlobAuditingPolicyProperties - Resource properties. + *SQLPoolBlobAuditingPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicy. +func (spbap SQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spbap.SQLPoolBlobAuditingPolicyProperties != nil { + objectMap["properties"] = spbap.SQLPoolBlobAuditingPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolBlobAuditingPolicy struct. +func (spbap *SQLPoolBlobAuditingPolicy) 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 "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + spbap.Kind = &kind + } + case "properties": + if v != nil { + var SQLPoolBlobAuditingPolicyProperties SQLPoolBlobAuditingPolicyProperties + err = json.Unmarshal(*v, &SQLPoolBlobAuditingPolicyProperties) + if err != nil { + return err + } + spbap.SQLPoolBlobAuditingPolicyProperties = &SQLPoolBlobAuditingPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spbap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spbap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spbap.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolBlobAuditingPolicyListResult a list of Sql pool auditing settings. +type SQLPoolBlobAuditingPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolBlobAuditingPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicyListResult. +func (spbaplr SQLPoolBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolBlobAuditingPolicyListResultIterator provides access to a complete listing of +// SQLPoolBlobAuditingPolicy values. +type SQLPoolBlobAuditingPolicyListResultIterator struct { + i int + page SQLPoolBlobAuditingPolicyListResultPage +} + +// 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 *SQLPoolBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicyListResultIterator.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 *SQLPoolBlobAuditingPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolBlobAuditingPolicyListResultIterator) 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 SQLPoolBlobAuditingPolicyListResultIterator) Response() SQLPoolBlobAuditingPolicyListResult { + 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 SQLPoolBlobAuditingPolicyListResultIterator) Value() SQLPoolBlobAuditingPolicy { + if !iter.page.NotDone() { + return SQLPoolBlobAuditingPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolBlobAuditingPolicyListResultIterator type. +func NewSQLPoolBlobAuditingPolicyListResultIterator(page SQLPoolBlobAuditingPolicyListResultPage) SQLPoolBlobAuditingPolicyListResultIterator { + return SQLPoolBlobAuditingPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spbaplr SQLPoolBlobAuditingPolicyListResult) IsEmpty() bool { + return spbaplr.Value == nil || len(*spbaplr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spbaplr SQLPoolBlobAuditingPolicyListResult) hasNextLink() bool { + return spbaplr.NextLink != nil && len(*spbaplr.NextLink) != 0 +} + +// sQLPoolBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spbaplr SQLPoolBlobAuditingPolicyListResult) sQLPoolBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spbaplr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spbaplr.NextLink))) +} + +// SQLPoolBlobAuditingPolicyListResultPage contains a page of SQLPoolBlobAuditingPolicy values. +type SQLPoolBlobAuditingPolicyListResultPage struct { + fn func(context.Context, SQLPoolBlobAuditingPolicyListResult) (SQLPoolBlobAuditingPolicyListResult, error) + spbaplr SQLPoolBlobAuditingPolicyListResult +} + +// 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 *SQLPoolBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spbaplr) + if err != nil { + return err + } + page.spbaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolBlobAuditingPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolBlobAuditingPolicyListResultPage) NotDone() bool { + return !page.spbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolBlobAuditingPolicyListResultPage) Response() SQLPoolBlobAuditingPolicyListResult { + return page.spbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolBlobAuditingPolicyListResultPage) Values() []SQLPoolBlobAuditingPolicy { + if page.spbaplr.IsEmpty() { + return nil + } + return *page.spbaplr.Value +} + +// Creates a new instance of the SQLPoolBlobAuditingPolicyListResultPage type. +func NewSQLPoolBlobAuditingPolicyListResultPage(cur SQLPoolBlobAuditingPolicyListResult, getNextPage func(context.Context, SQLPoolBlobAuditingPolicyListResult) (SQLPoolBlobAuditingPolicyListResult, error)) SQLPoolBlobAuditingPolicyListResultPage { + return SQLPoolBlobAuditingPolicyListResultPage{ + fn: getNextPage, + spbaplr: cur, + } +} + +// SQLPoolBlobAuditingPolicyProperties properties of a Sql pool blob auditing policy. +type SQLPoolBlobAuditingPolicyProperties 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 *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"` + // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 `json:"retentionDays,omitempty"` + // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. + // + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + // + // BATCH_COMPLETED_GROUP, + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + // FAILED_DATABASE_AUTHENTICATION_GROUP. + // + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + // + // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + // BACKUP_RESTORE_GROUP + // DATABASE_LOGOUT_GROUP + // DATABASE_OBJECT_CHANGE_GROUP + // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + // DATABASE_OPERATION_GROUP + // DATABASE_PERMISSION_CHANGE_GROUP + // DATABASE_PRINCIPAL_CHANGE_GROUP + // DATABASE_PRINCIPAL_IMPERSONATION_GROUP + // DATABASE_ROLE_MEMBER_CHANGE_GROUP + // FAILED_DATABASE_AUTHENTICATION_GROUP + // SCHEMA_OBJECT_ACCESS_GROUP + // SCHEMA_OBJECT_CHANGE_GROUP + // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + // USER_CHANGE_PASSWORD_GROUP + // BATCH_STARTED_GROUP + // BATCH_COMPLETED_GROUP + // + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + // + // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + // + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + // SELECT + // UPDATE + // INSERT + // DELETE + // EXECUTE + // RECEIVE + // REFERENCES + // + // The general form for defining an action to be audited is: + // {action} ON {object} BY {principal} + // + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + // + // For example: + // SELECT on dbo.myTable by public + // SELECT on DATABASE::myDatabase by public + // SELECT on SCHEMA::mySchema by public + // + // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` + // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` + // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` + // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. + // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + // + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + // Note that for server level audit you should use the 'master' database as {databaseName}. + // + // Diagnostic Settings URI format: + // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // + // 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"` +} + +// SQLPoolBlobAuditingPolicySQLPoolOperationListResult the response to a list Sql pool operations request +type SQLPoolBlobAuditingPolicySQLPoolOperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolOperation `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicySQLPoolOperationListResult. +func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator provides access to a complete listing of +// SQLPoolOperation values. +type SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator struct { + i int + page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage +} + +// 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 *SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator.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 *SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) 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 SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Response() SQLPoolBlobAuditingPolicySQLPoolOperationListResult { + 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 SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Value() SQLPoolOperation { + if !iter.page.NotDone() { + return SQLPoolOperation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator type. +func NewSQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator(page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator { + return SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) IsEmpty() bool { + return spbapspolr.Value == nil || len(*spbapspolr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) hasNextLink() bool { + return spbapspolr.NextLink != nil && len(*spbapspolr.NextLink) != 0 +} + +// sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spbapspolr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spbapspolr.NextLink))) +} + +// SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage contains a page of SQLPoolOperation values. +type SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage struct { + fn func(context.Context, SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (SQLPoolBlobAuditingPolicySQLPoolOperationListResult, error) + spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult +} + +// 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 *SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spbapspolr) + if err != nil { + return err + } + page.spbapspolr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) NotDone() bool { + return !page.spbapspolr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Response() SQLPoolBlobAuditingPolicySQLPoolOperationListResult { + return page.spbapspolr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Values() []SQLPoolOperation { + if page.spbapspolr.IsEmpty() { + return nil + } + return *page.spbapspolr.Value +} + +// Creates a new instance of the SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage type. +func NewSQLPoolBlobAuditingPolicySQLPoolOperationListResultPage(cur SQLPoolBlobAuditingPolicySQLPoolOperationListResult, getNextPage func(context.Context, SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (SQLPoolBlobAuditingPolicySQLPoolOperationListResult, error)) SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage { + return SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage{ + fn: getNextPage, + spbapspolr: cur, + } +} + +// SQLPoolColumn a Sql pool column resource. +type SQLPoolColumn struct { + autorest.Response `json:"-"` + // SQLPoolColumnProperties - Resource properties. + *SQLPoolColumnProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolColumn. +func (spc SQLPoolColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spc.SQLPoolColumnProperties != nil { + objectMap["properties"] = spc.SQLPoolColumnProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolColumn struct. +func (spc *SQLPoolColumn) 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 SQLPoolColumnProperties SQLPoolColumnProperties + err = json.Unmarshal(*v, &SQLPoolColumnProperties) + if err != nil { + return err + } + spc.SQLPoolColumnProperties = &SQLPoolColumnProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spc.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolColumnListResult a list of Sql pool columns. +type SQLPoolColumnListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolColumn `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolColumnListResult. +func (spclr SQLPoolColumnListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolColumnListResultIterator provides access to a complete listing of SQLPoolColumn values. +type SQLPoolColumnListResultIterator struct { + i int + page SQLPoolColumnListResultPage +} + +// 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 *SQLPoolColumnListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnListResultIterator.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 *SQLPoolColumnListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolColumnListResultIterator) 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 SQLPoolColumnListResultIterator) Response() SQLPoolColumnListResult { + 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 SQLPoolColumnListResultIterator) Value() SQLPoolColumn { + if !iter.page.NotDone() { + return SQLPoolColumn{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolColumnListResultIterator type. +func NewSQLPoolColumnListResultIterator(page SQLPoolColumnListResultPage) SQLPoolColumnListResultIterator { + return SQLPoolColumnListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spclr SQLPoolColumnListResult) IsEmpty() bool { + return spclr.Value == nil || len(*spclr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spclr SQLPoolColumnListResult) hasNextLink() bool { + return spclr.NextLink != nil && len(*spclr.NextLink) != 0 +} + +// sQLPoolColumnListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spclr SQLPoolColumnListResult) sQLPoolColumnListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spclr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spclr.NextLink))) +} + +// SQLPoolColumnListResultPage contains a page of SQLPoolColumn values. +type SQLPoolColumnListResultPage struct { + fn func(context.Context, SQLPoolColumnListResult) (SQLPoolColumnListResult, error) + spclr SQLPoolColumnListResult +} + +// 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 *SQLPoolColumnListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spclr) + if err != nil { + return err + } + page.spclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolColumnListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolColumnListResultPage) NotDone() bool { + return !page.spclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolColumnListResultPage) Response() SQLPoolColumnListResult { + return page.spclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolColumnListResultPage) Values() []SQLPoolColumn { + if page.spclr.IsEmpty() { + return nil + } + return *page.spclr.Value +} + +// Creates a new instance of the SQLPoolColumnListResultPage type. +func NewSQLPoolColumnListResultPage(cur SQLPoolColumnListResult, getNextPage func(context.Context, SQLPoolColumnListResult) (SQLPoolColumnListResult, error)) SQLPoolColumnListResultPage { + return SQLPoolColumnListResultPage{ + fn: getNextPage, + spclr: cur, + } +} + +// SQLPoolColumnProperties sql pool column properties. +type SQLPoolColumnProperties struct { + // ColumnType - The column data type. Possible values include: 'ColumnDataTypeImage', 'ColumnDataTypeText', 'ColumnDataTypeUniqueidentifier', 'ColumnDataTypeDate', 'ColumnDataTypeTime', 'ColumnDataTypeDatetime2', 'ColumnDataTypeDatetimeoffset', 'ColumnDataTypeTinyint', 'ColumnDataTypeSmallint', 'ColumnDataTypeInt', 'ColumnDataTypeSmalldatetime', 'ColumnDataTypeReal', 'ColumnDataTypeMoney', 'ColumnDataTypeDatetime', 'ColumnDataTypeFloat', 'ColumnDataTypeSQLVariant', 'ColumnDataTypeNtext', 'ColumnDataTypeBit', 'ColumnDataTypeDecimal', 'ColumnDataTypeNumeric', 'ColumnDataTypeSmallmoney', 'ColumnDataTypeBigint', 'ColumnDataTypeHierarchyid', 'ColumnDataTypeGeometry', 'ColumnDataTypeGeography', 'ColumnDataTypeVarbinary', 'ColumnDataTypeVarchar', 'ColumnDataTypeBinary', 'ColumnDataTypeChar', 'ColumnDataTypeTimestamp', 'ColumnDataTypeNvarchar', 'ColumnDataTypeNchar', 'ColumnDataTypeXML', 'ColumnDataTypeSysname' + ColumnType ColumnDataType `json:"columnType,omitempty"` + // IsComputed - READ-ONLY; Indicates whether column value is computed or not + IsComputed *bool `json:"isComputed,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolColumnProperties. +func (spcp SQLPoolColumnProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spcp.ColumnType != "" { + objectMap["columnType"] = spcp.ColumnType + } + return json.Marshal(objectMap) +} + +// SQLPoolConnectionPolicy a Sql pool connection policy. +type SQLPoolConnectionPolicy struct { + autorest.Response `json:"-"` + // Kind - READ-ONLY; Resource kind. + Kind *string `json:"kind,omitempty"` + // Location - READ-ONLY; Resource location. + Location *string `json:"location,omitempty"` + // SQLPoolConnectionPolicyProperties - Resource properties. + *SQLPoolConnectionPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolConnectionPolicy. +func (spcp SQLPoolConnectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spcp.SQLPoolConnectionPolicyProperties != nil { + objectMap["properties"] = spcp.SQLPoolConnectionPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolConnectionPolicy struct. +func (spcp *SQLPoolConnectionPolicy) 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 "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + spcp.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spcp.Location = &location + } + case "properties": + if v != nil { + var SQLPoolConnectionPolicyProperties SQLPoolConnectionPolicyProperties + err = json.Unmarshal(*v, &SQLPoolConnectionPolicyProperties) + if err != nil { + return err + } + spcp.SQLPoolConnectionPolicyProperties = &SQLPoolConnectionPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spcp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spcp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spcp.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolConnectionPolicyProperties properties of a Sql pool connection policy. +type SQLPoolConnectionPolicyProperties struct { + // SecurityEnabledAccess - The state of security access. + SecurityEnabledAccess *string `json:"securityEnabledAccess,omitempty"` + // ProxyDNSName - The fully qualified host name of the auditing proxy. + ProxyDNSName *string `json:"proxyDnsName,omitempty"` + // ProxyPort - The port number of the auditing proxy. + ProxyPort *string `json:"proxyPort,omitempty"` + // Visibility - The visibility of the auditing proxy. + Visibility *string `json:"visibility,omitempty"` + // UseServerDefault - Whether server default is enabled or disabled. + UseServerDefault *string `json:"useServerDefault,omitempty"` + // RedirectionState - The state of proxy redirection. + RedirectionState *string `json:"redirectionState,omitempty"` + // State - The connection policy state. + State *string `json:"state,omitempty"` +} + +// SQLPoolInfoListResult list of SQL pools +type SQLPoolInfoListResult struct { + autorest.Response `json:"-"` + // NextLink - Link to the next page of results + NextLink *string `json:"nextLink,omitempty"` + // Value - List of SQL pools + Value *[]SQLPool `json:"value,omitempty"` +} + +// SQLPoolInfoListResultIterator provides access to a complete listing of SQLPool values. +type SQLPoolInfoListResultIterator struct { + i int + page SQLPoolInfoListResultPage +} + +// 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 *SQLPoolInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolInfoListResultIterator.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 *SQLPoolInfoListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolInfoListResultIterator) 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 SQLPoolInfoListResultIterator) Response() SQLPoolInfoListResult { + 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 SQLPoolInfoListResultIterator) Value() SQLPool { + if !iter.page.NotDone() { + return SQLPool{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolInfoListResultIterator type. +func NewSQLPoolInfoListResultIterator(page SQLPoolInfoListResultPage) SQLPoolInfoListResultIterator { + return SQLPoolInfoListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spilr SQLPoolInfoListResult) IsEmpty() bool { + return spilr.Value == nil || len(*spilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spilr SQLPoolInfoListResult) hasNextLink() bool { + return spilr.NextLink != nil && len(*spilr.NextLink) != 0 +} + +// sQLPoolInfoListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spilr SQLPoolInfoListResult) sQLPoolInfoListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spilr.NextLink))) +} + +// SQLPoolInfoListResultPage contains a page of SQLPool values. +type SQLPoolInfoListResultPage struct { + fn func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error) + spilr SQLPoolInfoListResult +} + +// 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 *SQLPoolInfoListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolInfoListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spilr) + if err != nil { + return err + } + page.spilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolInfoListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolInfoListResultPage) NotDone() bool { + return !page.spilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolInfoListResultPage) Response() SQLPoolInfoListResult { + return page.spilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolInfoListResultPage) Values() []SQLPool { + if page.spilr.IsEmpty() { + return nil + } + return *page.spilr.Value +} + +// Creates a new instance of the SQLPoolInfoListResultPage type. +func NewSQLPoolInfoListResultPage(cur SQLPoolInfoListResult, getNextPage func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error)) SQLPoolInfoListResultPage { + return SQLPoolInfoListResultPage{ + fn: getNextPage, + spilr: cur, + } +} + +// SQLPoolOperation a Sql pool operation. +type SQLPoolOperation struct { + // SQLPoolOperationProperties - Resource properties. + *SQLPoolOperationProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolOperation. +func (spo SQLPoolOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spo.SQLPoolOperationProperties != nil { + objectMap["properties"] = spo.SQLPoolOperationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolOperation struct. +func (spo *SQLPoolOperation) 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 SQLPoolOperationProperties SQLPoolOperationProperties + err = json.Unmarshal(*v, &SQLPoolOperationProperties) + if err != nil { + return err + } + spo.SQLPoolOperationProperties = &SQLPoolOperationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spo.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spo.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spo.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolOperationProperties the properties of a Sql pool operation. +type SQLPoolOperationProperties struct { + // DatabaseName - READ-ONLY; The name of the Sql pool the operation is being performed on. + DatabaseName *string `json:"databaseName,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"` + // ServerName - READ-ONLY; The name of the server. + ServerName *string `json:"serverName,omitempty"` + // StartTime - READ-ONLY; The operation start time. + StartTime *date.Time `json:"startTime,omitempty"` + // State - READ-ONLY; The operation state. Possible values include: 'ManagementOperationStatePending', 'ManagementOperationStateInProgress', 'ManagementOperationStateSucceeded', 'ManagementOperationStateFailed', 'ManagementOperationStateCancelInProgress', 'ManagementOperationStateCancelled' + 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"` +} + +// MarshalJSON is the custom marshaler for SQLPoolOperationProperties. +func (spop SQLPoolOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolPatchInfo a SQL Analytics pool patch info +type SQLPoolPatchInfo struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,omitempty"` + // Sku - SQL pool SKU + Sku *Sku `json:"sku,omitempty"` + // SQLPoolResourceProperties - SQL pool properties + *SQLPoolResourceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolPatchInfo. +func (sppi SQLPoolPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sppi.Tags != nil { + objectMap["tags"] = sppi.Tags + } + if sppi.Location != nil { + objectMap["location"] = sppi.Location + } + if sppi.Sku != nil { + objectMap["sku"] = sppi.Sku + } + if sppi.SQLPoolResourceProperties != nil { + objectMap["properties"] = sppi.SQLPoolResourceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolPatchInfo struct. +func (sppi *SQLPoolPatchInfo) 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 "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sppi.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sppi.Location = &location + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + sppi.Sku = &sku + } + case "properties": + if v != nil { + var SQLPoolResourceProperties SQLPoolResourceProperties + err = json.Unmarshal(*v, &SQLPoolResourceProperties) + if err != nil { + return err + } + sppi.SQLPoolResourceProperties = &SQLPoolResourceProperties + } + } + } + + return nil +} + +// SQLPoolResourceProperties properties of a SQL Analytics pool +type SQLPoolResourceProperties struct { + // MaxSizeBytes - Maximum size in bytes + MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` + // Collation - Collation mode + Collation *string `json:"collation,omitempty"` + // SourceDatabaseID - Source database to create from + SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` + // RecoverableDatabaseID - Backup database to restore from + RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` + // ProvisioningState - Resource state + ProvisioningState *string `json:"provisioningState,omitempty"` + // Status - Resource status + Status *string `json:"status,omitempty"` + // RestorePointInTime - Snapshot time to restore + RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` + // CreateMode - What is this? + CreateMode *string `json:"createMode,omitempty"` + // CreationDate - Date the SQL pool was created + CreationDate *date.Time `json:"creationDate,omitempty"` + // StorageAccountType - The storage account type used to store backups for this sql pool. Possible values include: 'StorageAccountTypeGRS', 'StorageAccountTypeLRS', 'StorageAccountTypeZRS' + StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // SourceDatabaseDeletionDate - Specifies the time that the sql pool was deleted + SourceDatabaseDeletionDate *date.Time `json:"sourceDatabaseDeletionDate,omitempty"` +} + +// SQLPoolRestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLPoolRestorePointsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolRestorePointsClient) (RestorePoint, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolRestorePointsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolRestorePointsCreateFuture.Result. +func (future *SQLPoolRestorePointsCreateFuture) result(client SQLPoolRestorePointsClient) (rp RestorePoint, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + rp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolRestorePointsCreateFuture") + 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, "synapse.SQLPoolRestorePointsCreateFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolSchema a Sql pool schema resource. +type SQLPoolSchema struct { + autorest.Response `json:"-"` + // 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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolSchema. +func (sps SQLPoolSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolSchemaListResult a list of Sql pool schemas. +type SQLPoolSchemaListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolSchema `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolSchemaListResult. +func (spslr SQLPoolSchemaListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolSchemaListResultIterator provides access to a complete listing of SQLPoolSchema values. +type SQLPoolSchemaListResultIterator struct { + i int + page SQLPoolSchemaListResultPage +} + +// 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 *SQLPoolSchemaListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemaListResultIterator.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 *SQLPoolSchemaListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolSchemaListResultIterator) 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 SQLPoolSchemaListResultIterator) Response() SQLPoolSchemaListResult { + 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 SQLPoolSchemaListResultIterator) Value() SQLPoolSchema { + if !iter.page.NotDone() { + return SQLPoolSchema{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolSchemaListResultIterator type. +func NewSQLPoolSchemaListResultIterator(page SQLPoolSchemaListResultPage) SQLPoolSchemaListResultIterator { + return SQLPoolSchemaListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spslr SQLPoolSchemaListResult) IsEmpty() bool { + return spslr.Value == nil || len(*spslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spslr SQLPoolSchemaListResult) hasNextLink() bool { + return spslr.NextLink != nil && len(*spslr.NextLink) != 0 +} + +// sQLPoolSchemaListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spslr SQLPoolSchemaListResult) sQLPoolSchemaListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spslr.NextLink))) +} + +// SQLPoolSchemaListResultPage contains a page of SQLPoolSchema values. +type SQLPoolSchemaListResultPage struct { + fn func(context.Context, SQLPoolSchemaListResult) (SQLPoolSchemaListResult, error) + spslr SQLPoolSchemaListResult +} + +// 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 *SQLPoolSchemaListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemaListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spslr) + if err != nil { + return err + } + page.spslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolSchemaListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolSchemaListResultPage) NotDone() bool { + return !page.spslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolSchemaListResultPage) Response() SQLPoolSchemaListResult { + return page.spslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolSchemaListResultPage) Values() []SQLPoolSchema { + if page.spslr.IsEmpty() { + return nil + } + return *page.spslr.Value +} + +// Creates a new instance of the SQLPoolSchemaListResultPage type. +func NewSQLPoolSchemaListResultPage(cur SQLPoolSchemaListResult, getNextPage func(context.Context, SQLPoolSchemaListResult) (SQLPoolSchemaListResult, error)) SQLPoolSchemaListResultPage { + return SQLPoolSchemaListResultPage{ + fn: getNextPage, + spslr: cur, + } +} + +// SQLPoolsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SQLPoolsCreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolsClient) (SQLPool, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolsCreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolsCreateFuture.Result. +func (future *SQLPoolsCreateFuture) result(client SQLPoolsClient) (sp SQLPool, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sp.Response.Response, err = future.GetResult(sender); err == nil && sp.Response.Response.StatusCode != http.StatusNoContent { + sp, err = client.CreateResponder(sp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsCreateFuture", "Result", sp.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SQLPoolsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolsClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolsDeleteFuture.Result. +func (future *SQLPoolsDeleteFuture) result(client SQLPoolsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeleteResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsDeleteFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolSecurityAlertPolicy a Sql pool security alert policy. +type SQLPoolSecurityAlertPolicy struct { + autorest.Response `json:"-"` + // SecurityAlertPolicyProperties - Resource properties. + *SecurityAlertPolicyProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolSecurityAlertPolicy. +func (spsap SQLPoolSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spsap.SecurityAlertPolicyProperties != nil { + objectMap["properties"] = spsap.SecurityAlertPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolSecurityAlertPolicy struct. +func (spsap *SQLPoolSecurityAlertPolicy) 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 securityAlertPolicyProperties SecurityAlertPolicyProperties + err = json.Unmarshal(*v, &securityAlertPolicyProperties) + if err != nil { + return err + } + spsap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spsap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spsap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spsap.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolsPauseFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SQLPoolsPauseFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolsClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolsPauseFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolsPauseFuture.Result. +func (future *SQLPoolsPauseFuture) result(client SQLPoolsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsPauseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsPauseFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.PauseResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsPauseFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolsResumeFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SQLPoolsResumeFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolsClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolsResumeFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolsResumeFuture.Result. +func (future *SQLPoolsResumeFuture) result(client SQLPoolsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsResumeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsResumeFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.ResumeResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsResumeFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolTable a Sql pool table resource. +type SQLPoolTable struct { + autorest.Response `json:"-"` + // 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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolTable. +func (spt SQLPoolTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolTableListResult a list of Sql pool tables. +type SQLPoolTableListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolTable `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolTableListResult. +func (sptlr SQLPoolTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolTableListResultIterator provides access to a complete listing of SQLPoolTable values. +type SQLPoolTableListResultIterator struct { + i int + page SQLPoolTableListResultPage +} + +// 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 *SQLPoolTableListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableListResultIterator.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 *SQLPoolTableListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolTableListResultIterator) 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 SQLPoolTableListResultIterator) Response() SQLPoolTableListResult { + 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 SQLPoolTableListResultIterator) Value() SQLPoolTable { + if !iter.page.NotDone() { + return SQLPoolTable{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolTableListResultIterator type. +func NewSQLPoolTableListResultIterator(page SQLPoolTableListResultPage) SQLPoolTableListResultIterator { + return SQLPoolTableListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sptlr SQLPoolTableListResult) IsEmpty() bool { + return sptlr.Value == nil || len(*sptlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sptlr SQLPoolTableListResult) hasNextLink() bool { + return sptlr.NextLink != nil && len(*sptlr.NextLink) != 0 +} + +// sQLPoolTableListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sptlr SQLPoolTableListResult) sQLPoolTableListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sptlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sptlr.NextLink))) +} + +// SQLPoolTableListResultPage contains a page of SQLPoolTable values. +type SQLPoolTableListResultPage struct { + fn func(context.Context, SQLPoolTableListResult) (SQLPoolTableListResult, error) + sptlr SQLPoolTableListResult +} + +// 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 *SQLPoolTableListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sptlr) + if err != nil { + return err + } + page.sptlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolTableListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolTableListResultPage) NotDone() bool { + return !page.sptlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolTableListResultPage) Response() SQLPoolTableListResult { + return page.sptlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolTableListResultPage) Values() []SQLPoolTable { + if page.sptlr.IsEmpty() { + return nil + } + return *page.sptlr.Value +} + +// Creates a new instance of the SQLPoolTableListResultPage type. +func NewSQLPoolTableListResultPage(cur SQLPoolTableListResult, getNextPage func(context.Context, SQLPoolTableListResult) (SQLPoolTableListResult, error)) SQLPoolTableListResultPage { + return SQLPoolTableListResultPage{ + fn: getNextPage, + sptlr: cur, + } +} + +// SQLPoolUsage the Sql pool usages. +type SQLPoolUsage struct { + // Name - READ-ONLY; The name of the usage metric. + Name *string `json:"name,omitempty"` + // ResourceName - READ-ONLY; The name of the resource. + ResourceName *string `json:"resourceName,omitempty"` + // DisplayName - READ-ONLY; The usage metric display name. + DisplayName *string `json:"displayName,omitempty"` + // CurrentValue - READ-ONLY; The current value of the usage metric. + CurrentValue *float64 `json:"currentValue,omitempty"` + // Limit - READ-ONLY; The current limit of the usage metric. + Limit *float64 `json:"limit,omitempty"` + // Unit - READ-ONLY; The units of the usage metric. + Unit *string `json:"unit,omitempty"` + // NextResetTime - READ-ONLY; The next reset time for the usage metric (ISO8601 format). + NextResetTime *date.Time `json:"nextResetTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolUsage. +func (spu SQLPoolUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolUsageListResult the response to a list Sql pool usages request. +type SQLPoolUsageListResult struct { + autorest.Response `json:"-"` + // Value - The list of usages for the Sql pool. + Value *[]SQLPoolUsage `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolUsageListResult. +func (spulr SQLPoolUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spulr.Value != nil { + objectMap["value"] = spulr.Value + } + return json.Marshal(objectMap) +} + +// SQLPoolUsageListResultIterator provides access to a complete listing of SQLPoolUsage values. +type SQLPoolUsageListResultIterator struct { + i int + page SQLPoolUsageListResultPage +} + +// 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 *SQLPoolUsageListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsageListResultIterator.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 *SQLPoolUsageListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolUsageListResultIterator) 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 SQLPoolUsageListResultIterator) Response() SQLPoolUsageListResult { + 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 SQLPoolUsageListResultIterator) Value() SQLPoolUsage { + if !iter.page.NotDone() { + return SQLPoolUsage{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolUsageListResultIterator type. +func NewSQLPoolUsageListResultIterator(page SQLPoolUsageListResultPage) SQLPoolUsageListResultIterator { + return SQLPoolUsageListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spulr SQLPoolUsageListResult) IsEmpty() bool { + return spulr.Value == nil || len(*spulr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spulr SQLPoolUsageListResult) hasNextLink() bool { + return spulr.NextLink != nil && len(*spulr.NextLink) != 0 +} + +// sQLPoolUsageListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spulr SQLPoolUsageListResult) sQLPoolUsageListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spulr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spulr.NextLink))) +} + +// SQLPoolUsageListResultPage contains a page of SQLPoolUsage values. +type SQLPoolUsageListResultPage struct { + fn func(context.Context, SQLPoolUsageListResult) (SQLPoolUsageListResult, error) + spulr SQLPoolUsageListResult +} + +// 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 *SQLPoolUsageListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsageListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spulr) + if err != nil { + return err + } + page.spulr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolUsageListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolUsageListResultPage) NotDone() bool { + return !page.spulr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolUsageListResultPage) Response() SQLPoolUsageListResult { + return page.spulr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolUsageListResultPage) Values() []SQLPoolUsage { + if page.spulr.IsEmpty() { + return nil + } + return *page.spulr.Value +} + +// Creates a new instance of the SQLPoolUsageListResultPage type. +func NewSQLPoolUsageListResultPage(cur SQLPoolUsageListResult, getNextPage func(context.Context, SQLPoolUsageListResult) (SQLPoolUsageListResult, error)) SQLPoolUsageListResultPage { + return SQLPoolUsageListResultPage{ + fn: getNextPage, + spulr: cur, + } +} + +// SQLPoolVulnerabilityAssessment a Sql pool vulnerability assessment. +type SQLPoolVulnerabilityAssessment struct { + autorest.Response `json:"-"` + // SQLPoolVulnerabilityAssessmentProperties - Resource properties. + *SQLPoolVulnerabilityAssessmentProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessment. +func (spva SQLPoolVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spva.SQLPoolVulnerabilityAssessmentProperties != nil { + objectMap["properties"] = spva.SQLPoolVulnerabilityAssessmentProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessment struct. +func (spva *SQLPoolVulnerabilityAssessment) 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 SQLPoolVulnerabilityAssessmentProperties SQLPoolVulnerabilityAssessmentProperties + err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentProperties) + if err != nil { + return err + } + spva.SQLPoolVulnerabilityAssessmentProperties = &SQLPoolVulnerabilityAssessmentProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spva.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spva.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spva.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolVulnerabilityAssessmentListResult a list of the Sql pool's vulnerability assessments. +type SQLPoolVulnerabilityAssessmentListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLPoolVulnerabilityAssessment `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentListResult. +func (spvalr SQLPoolVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolVulnerabilityAssessmentListResultIterator provides access to a complete listing of +// SQLPoolVulnerabilityAssessment values. +type SQLPoolVulnerabilityAssessmentListResultIterator struct { + i int + page SQLPoolVulnerabilityAssessmentListResultPage +} + +// 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 *SQLPoolVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentListResultIterator.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 *SQLPoolVulnerabilityAssessmentListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLPoolVulnerabilityAssessmentListResultIterator) 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 SQLPoolVulnerabilityAssessmentListResultIterator) Response() SQLPoolVulnerabilityAssessmentListResult { + 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 SQLPoolVulnerabilityAssessmentListResultIterator) Value() SQLPoolVulnerabilityAssessment { + if !iter.page.NotDone() { + return SQLPoolVulnerabilityAssessment{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLPoolVulnerabilityAssessmentListResultIterator type. +func NewSQLPoolVulnerabilityAssessmentListResultIterator(page SQLPoolVulnerabilityAssessmentListResultPage) SQLPoolVulnerabilityAssessmentListResultIterator { + return SQLPoolVulnerabilityAssessmentListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spvalr SQLPoolVulnerabilityAssessmentListResult) IsEmpty() bool { + return spvalr.Value == nil || len(*spvalr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (spvalr SQLPoolVulnerabilityAssessmentListResult) hasNextLink() bool { + return spvalr.NextLink != nil && len(*spvalr.NextLink) != 0 +} + +// sQLPoolVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spvalr SQLPoolVulnerabilityAssessmentListResult) sQLPoolVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { + if !spvalr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spvalr.NextLink))) +} + +// SQLPoolVulnerabilityAssessmentListResultPage contains a page of SQLPoolVulnerabilityAssessment values. +type SQLPoolVulnerabilityAssessmentListResultPage struct { + fn func(context.Context, SQLPoolVulnerabilityAssessmentListResult) (SQLPoolVulnerabilityAssessmentListResult, error) + spvalr SQLPoolVulnerabilityAssessmentListResult +} + +// 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 *SQLPoolVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.spvalr) + if err != nil { + return err + } + page.spvalr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *SQLPoolVulnerabilityAssessmentListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLPoolVulnerabilityAssessmentListResultPage) NotDone() bool { + return !page.spvalr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLPoolVulnerabilityAssessmentListResultPage) Response() SQLPoolVulnerabilityAssessmentListResult { + return page.spvalr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLPoolVulnerabilityAssessmentListResultPage) Values() []SQLPoolVulnerabilityAssessment { + if page.spvalr.IsEmpty() { + return nil + } + return *page.spvalr.Value +} + +// Creates a new instance of the SQLPoolVulnerabilityAssessmentListResultPage type. +func NewSQLPoolVulnerabilityAssessmentListResultPage(cur SQLPoolVulnerabilityAssessmentListResult, getNextPage func(context.Context, SQLPoolVulnerabilityAssessmentListResult) (SQLPoolVulnerabilityAssessmentListResult, error)) SQLPoolVulnerabilityAssessmentListResultPage { + return SQLPoolVulnerabilityAssessmentListResultPage{ + fn: getNextPage, + spvalr: cur, + } +} + +// SQLPoolVulnerabilityAssessmentProperties properties of a Sql pool Vulnerability Assessment. +type SQLPoolVulnerabilityAssessmentProperties 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 *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"` + // RecurringScans - The recurring scans settings + RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` +} + +// SQLPoolVulnerabilityAssessmentRuleBaseline a Sql pool vulnerability assessment rule baseline. +type SQLPoolVulnerabilityAssessmentRuleBaseline struct { + autorest.Response `json:"-"` + // SQLPoolVulnerabilityAssessmentRuleBaselineProperties - Resource properties. + *SQLPoolVulnerabilityAssessmentRuleBaselineProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentRuleBaseline. +func (spvarb SQLPoolVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties != nil { + objectMap["properties"] = spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessmentRuleBaseline struct. +func (spvarb *SQLPoolVulnerabilityAssessmentRuleBaseline) 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 SQLPoolVulnerabilityAssessmentRuleBaselineProperties SQLPoolVulnerabilityAssessmentRuleBaselineProperties + err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentRuleBaselineProperties) + if err != nil { + return err + } + spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties = &SQLPoolVulnerabilityAssessmentRuleBaselineProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spvarb.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spvarb.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spvarb.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolVulnerabilityAssessmentRuleBaselineItem properties for an Sql pool vulnerability assessment rule +// baseline's result. +type SQLPoolVulnerabilityAssessmentRuleBaselineItem struct { + // Result - The rule baseline result + Result *[]string `json:"result,omitempty"` +} + +// SQLPoolVulnerabilityAssessmentRuleBaselineProperties properties of a Sql pool vulnerability assessment +// rule baseline. +type SQLPoolVulnerabilityAssessmentRuleBaselineProperties struct { + // BaselineResults - The rule baseline result + BaselineResults *[]SQLPoolVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults,omitempty"` +} + +// SQLPoolVulnerabilityAssessmentScanExportProperties properties of the export operation's result. +type SQLPoolVulnerabilityAssessmentScanExportProperties struct { + // ExportedReportLocation - READ-ONLY; Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + ExportedReportLocation *string `json:"exportedReportLocation,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentScanExportProperties. +func (spvasep SQLPoolVulnerabilityAssessmentScanExportProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SQLPoolVulnerabilityAssessmentScansExport a Sql pool Vulnerability Assessment scan export resource. +type SQLPoolVulnerabilityAssessmentScansExport struct { + autorest.Response `json:"-"` + // SQLPoolVulnerabilityAssessmentScanExportProperties - Resource properties. + *SQLPoolVulnerabilityAssessmentScanExportProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentScansExport. +func (spvase SQLPoolVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spvase.SQLPoolVulnerabilityAssessmentScanExportProperties != nil { + objectMap["properties"] = spvase.SQLPoolVulnerabilityAssessmentScanExportProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessmentScansExport struct. +func (spvase *SQLPoolVulnerabilityAssessmentScansExport) 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 SQLPoolVulnerabilityAssessmentScanExportProperties SQLPoolVulnerabilityAssessmentScanExportProperties + err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentScanExportProperties) + if err != nil { + return err + } + spvase.SQLPoolVulnerabilityAssessmentScanExportProperties = &SQLPoolVulnerabilityAssessmentScanExportProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spvase.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spvase.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spvase.Type = &typeVar + } + } + } + + return nil +} + +// SQLPoolVulnerabilityAssessmentScansInitiateScanFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type SQLPoolVulnerabilityAssessmentScansInitiateScanFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolVulnerabilityAssessmentScansClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolVulnerabilityAssessmentScansInitiateScanFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolVulnerabilityAssessmentScansInitiateScanFuture.Result. +func (future *SQLPoolVulnerabilityAssessmentScansInitiateScanFuture) result(client SQLPoolVulnerabilityAssessmentScansClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansInitiateScanFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolVulnerabilityAssessmentScansInitiateScanFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLPoolWorkloadClassifierCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type SQLPoolWorkloadClassifierCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolWorkloadClassifierClient) (WorkloadClassifier, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolWorkloadClassifierCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolWorkloadClassifierCreateOrUpdateFuture.Result. +func (future *SQLPoolWorkloadClassifierCreateOrUpdateFuture) result(client SQLPoolWorkloadClassifierClient) (wc WorkloadClassifier, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + wc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture") + 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, "synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture", "Result", wc.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolWorkloadClassifierDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLPoolWorkloadClassifierDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolWorkloadClassifierClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolWorkloadClassifierDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolWorkloadClassifierDeleteFuture.Result. +func (future *SQLPoolWorkloadClassifierDeleteFuture) result(client SQLPoolWorkloadClassifierClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadClassifierDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLPoolWorkloadGroupCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLPoolWorkloadGroupCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolWorkloadGroupClient) (WorkloadGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolWorkloadGroupCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolWorkloadGroupCreateOrUpdateFuture.Result. +func (future *SQLPoolWorkloadGroupCreateOrUpdateFuture) result(client SQLPoolWorkloadGroupClient) (wg WorkloadGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + wg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture") + 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, "synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture", "Result", wg.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLPoolWorkloadGroupDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLPoolWorkloadGroupDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(SQLPoolWorkloadGroupClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *SQLPoolWorkloadGroupDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for SQLPoolWorkloadGroupDeleteFuture.Result. +func (future *SQLPoolWorkloadGroupDeleteFuture) result(client SQLPoolWorkloadGroupClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadGroupDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SsisEnvironment ssis environment. +type SsisEnvironment struct { + // FolderID - Folder id which contains environment. + FolderID *int64 `json:"folderId,omitempty"` + // Variables - Variable in environment + Variables *[]SsisVariable `json:"variables,omitempty"` + // ID - Metadata id. + ID *int64 `json:"id,omitempty"` + // Name - Metadata name. + Name *string `json:"name,omitempty"` + // Description - Metadata description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' + Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SsisEnvironment. +func (se SsisEnvironment) MarshalJSON() ([]byte, error) { + se.Type = TypeBasicSsisObjectMetadataTypeEnvironment + objectMap := make(map[string]interface{}) + if se.FolderID != nil { + objectMap["folderId"] = se.FolderID + } + if se.Variables != nil { + objectMap["variables"] = se.Variables + } + if se.ID != nil { + objectMap["id"] = se.ID + } + if se.Name != nil { + objectMap["name"] = se.Name + } + if se.Description != nil { + objectMap["description"] = se.Description + } + if se.Type != "" { + objectMap["type"] = se.Type + } + return json.Marshal(objectMap) +} + +// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisEnvironment. +func (se SsisEnvironment) AsSsisFolder() (*SsisFolder, bool) { + return nil, false +} + +// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisEnvironment. +func (se SsisEnvironment) AsSsisProject() (*SsisProject, bool) { + return nil, false +} + +// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisEnvironment. +func (se SsisEnvironment) AsSsisPackage() (*SsisPackage, bool) { + return nil, false +} + +// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisEnvironment. +func (se SsisEnvironment) AsSsisEnvironment() (*SsisEnvironment, bool) { + return &se, true +} + +// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisEnvironment. +func (se SsisEnvironment) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { + return nil, false +} + +// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisEnvironment. +func (se SsisEnvironment) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { + return &se, true +} + +// SsisEnvironmentReference ssis environment reference. +type SsisEnvironmentReference struct { + // ID - Environment reference id. + ID *int64 `json:"id,omitempty"` + // EnvironmentFolderName - Environment folder name. + EnvironmentFolderName *string `json:"environmentFolderName,omitempty"` + // EnvironmentName - Environment name. + EnvironmentName *string `json:"environmentName,omitempty"` + // ReferenceType - Reference type + ReferenceType *string `json:"referenceType,omitempty"` +} + +// SsisFolder ssis folder. +type SsisFolder struct { + // ID - Metadata id. + ID *int64 `json:"id,omitempty"` + // Name - Metadata name. + Name *string `json:"name,omitempty"` + // Description - Metadata description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' + Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SsisFolder. +func (sf SsisFolder) MarshalJSON() ([]byte, error) { + sf.Type = TypeBasicSsisObjectMetadataTypeFolder + objectMap := make(map[string]interface{}) + if sf.ID != nil { + objectMap["id"] = sf.ID + } + if sf.Name != nil { + objectMap["name"] = sf.Name + } + if sf.Description != nil { + objectMap["description"] = sf.Description + } + if sf.Type != "" { + objectMap["type"] = sf.Type + } + return json.Marshal(objectMap) +} + +// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisFolder. +func (sf SsisFolder) AsSsisFolder() (*SsisFolder, bool) { + return &sf, true +} + +// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisFolder. +func (sf SsisFolder) AsSsisProject() (*SsisProject, bool) { + return nil, false +} + +// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisFolder. +func (sf SsisFolder) AsSsisPackage() (*SsisPackage, bool) { + return nil, false +} + +// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisFolder. +func (sf SsisFolder) AsSsisEnvironment() (*SsisEnvironment, bool) { + return nil, false +} + +// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisFolder. +func (sf SsisFolder) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { + return nil, false +} + +// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisFolder. +func (sf SsisFolder) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { + return &sf, true +} + +// BasicSsisObjectMetadata SSIS object metadata. +type BasicSsisObjectMetadata interface { + AsSsisFolder() (*SsisFolder, bool) + AsSsisProject() (*SsisProject, bool) + AsSsisPackage() (*SsisPackage, bool) + AsSsisEnvironment() (*SsisEnvironment, bool) + AsSsisObjectMetadata() (*SsisObjectMetadata, bool) +} + +// SsisObjectMetadata SSIS object metadata. +type SsisObjectMetadata struct { + // ID - Metadata id. + ID *int64 `json:"id,omitempty"` + // Name - Metadata name. + Name *string `json:"name,omitempty"` + // Description - Metadata description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' + Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` +} + +func unmarshalBasicSsisObjectMetadata(body []byte) (BasicSsisObjectMetadata, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeBasicSsisObjectMetadataTypeFolder): + var sf SsisFolder + err := json.Unmarshal(body, &sf) + return sf, err + case string(TypeBasicSsisObjectMetadataTypeProject): + var sp SsisProject + err := json.Unmarshal(body, &sp) + return sp, err + case string(TypeBasicSsisObjectMetadataTypePackage): + var sp SsisPackage + err := json.Unmarshal(body, &sp) + return sp, err + case string(TypeBasicSsisObjectMetadataTypeEnvironment): + var se SsisEnvironment + err := json.Unmarshal(body, &se) + return se, err + default: + var som SsisObjectMetadata + err := json.Unmarshal(body, &som) + return som, err + } +} +func unmarshalBasicSsisObjectMetadataArray(body []byte) ([]BasicSsisObjectMetadata, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + somArray := make([]BasicSsisObjectMetadata, len(rawMessages)) + + for index, rawMessage := range rawMessages { + som, err := unmarshalBasicSsisObjectMetadata(*rawMessage) + if err != nil { + return nil, err + } + somArray[index] = som + } + return somArray, nil +} + +// MarshalJSON is the custom marshaler for SsisObjectMetadata. +func (som SsisObjectMetadata) MarshalJSON() ([]byte, error) { + som.Type = TypeBasicSsisObjectMetadataTypeSsisObjectMetadata + objectMap := make(map[string]interface{}) + if som.ID != nil { + objectMap["id"] = som.ID + } + if som.Name != nil { + objectMap["name"] = som.Name + } + if som.Description != nil { + objectMap["description"] = som.Description + } + if som.Type != "" { + objectMap["type"] = som.Type + } + return json.Marshal(objectMap) +} + +// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. +func (som SsisObjectMetadata) AsSsisFolder() (*SsisFolder, bool) { + return nil, false +} + +// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. +func (som SsisObjectMetadata) AsSsisProject() (*SsisProject, bool) { + return nil, false +} + +// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. +func (som SsisObjectMetadata) AsSsisPackage() (*SsisPackage, bool) { + return nil, false +} + +// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. +func (som SsisObjectMetadata) AsSsisEnvironment() (*SsisEnvironment, bool) { + return nil, false +} + +// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. +func (som SsisObjectMetadata) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { + return &som, true +} + +// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. +func (som SsisObjectMetadata) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { + return &som, true +} + +// SsisObjectMetadataListResponse a list of SSIS object metadata. +type SsisObjectMetadataListResponse struct { + autorest.Response `json:"-"` + // Value - List of SSIS object metadata. + Value *[]BasicSsisObjectMetadata `json:"value,omitempty"` + // NextLink - The link to the next page of results, if any remaining results exist. + NextLink *string `json:"nextLink,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SsisObjectMetadataListResponse struct. +func (somlr *SsisObjectMetadataListResponse) 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 := unmarshalBasicSsisObjectMetadataArray(*v) + if err != nil { + return err + } + somlr.Value = &value + } + case "nextLink": + if v != nil { + var nextLink string + err = json.Unmarshal(*v, &nextLink) + if err != nil { + return err + } + somlr.NextLink = &nextLink + } + } + } + + return nil +} + +// SsisObjectMetadataStatusResponse the status of the operation. +type SsisObjectMetadataStatusResponse struct { + autorest.Response `json:"-"` + // Status - The status of the operation. + Status *string `json:"status,omitempty"` + // Name - The operation name. + Name *string `json:"name,omitempty"` + // Properties - The operation properties. + Properties *string `json:"properties,omitempty"` + // Error - The operation error message. + Error *string `json:"error,omitempty"` +} + +// SsisPackage ssis Package. +type SsisPackage struct { + // FolderID - Folder id which contains package. + FolderID *int64 `json:"folderId,omitempty"` + // ProjectVersion - Project version which contains package. + ProjectVersion *int64 `json:"projectVersion,omitempty"` + // ProjectID - Project id which contains package. + ProjectID *int64 `json:"projectId,omitempty"` + // Parameters - Parameters in package + Parameters *[]SsisParameter `json:"parameters,omitempty"` + // ID - Metadata id. + ID *int64 `json:"id,omitempty"` + // Name - Metadata name. + Name *string `json:"name,omitempty"` + // Description - Metadata description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' + Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SsisPackage. +func (sp SsisPackage) MarshalJSON() ([]byte, error) { + sp.Type = TypeBasicSsisObjectMetadataTypePackage + objectMap := make(map[string]interface{}) + if sp.FolderID != nil { + objectMap["folderId"] = sp.FolderID + } + if sp.ProjectVersion != nil { + objectMap["projectVersion"] = sp.ProjectVersion + } + if sp.ProjectID != nil { + objectMap["projectId"] = sp.ProjectID + } + if sp.Parameters != nil { + objectMap["parameters"] = sp.Parameters + } + if sp.ID != nil { + objectMap["id"] = sp.ID + } + if sp.Name != nil { + objectMap["name"] = sp.Name + } + if sp.Description != nil { + objectMap["description"] = sp.Description + } + if sp.Type != "" { + objectMap["type"] = sp.Type + } + return json.Marshal(objectMap) +} + +// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisPackage. +func (sp SsisPackage) AsSsisFolder() (*SsisFolder, bool) { + return nil, false +} + +// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisPackage. +func (sp SsisPackage) AsSsisProject() (*SsisProject, bool) { + return nil, false +} + +// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisPackage. +func (sp SsisPackage) AsSsisPackage() (*SsisPackage, bool) { + return &sp, true +} + +// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisPackage. +func (sp SsisPackage) AsSsisEnvironment() (*SsisEnvironment, bool) { + return nil, false +} + +// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisPackage. +func (sp SsisPackage) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { + return nil, false +} + +// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisPackage. +func (sp SsisPackage) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { + return &sp, true +} + +// SsisParameter ssis parameter. +type SsisParameter struct { + // ID - Parameter id. + ID *int64 `json:"id,omitempty"` + // Name - Parameter name. + Name *string `json:"name,omitempty"` + // Description - Parameter description. + Description *string `json:"description,omitempty"` + // DataType - Parameter type. + DataType *string `json:"dataType,omitempty"` + // Required - Whether parameter is required. + Required *bool `json:"required,omitempty"` + // Sensitive - Whether parameter is sensitive. + Sensitive *bool `json:"sensitive,omitempty"` + // DesignDefaultValue - Design default value of parameter. + DesignDefaultValue *string `json:"designDefaultValue,omitempty"` + // DefaultValue - Default value of parameter. + DefaultValue *string `json:"defaultValue,omitempty"` + // SensitiveDefaultValue - Default sensitive value of parameter. + SensitiveDefaultValue *string `json:"sensitiveDefaultValue,omitempty"` + // ValueType - Parameter value type. + ValueType *string `json:"valueType,omitempty"` + // ValueSet - Parameter value set. + ValueSet *bool `json:"valueSet,omitempty"` + // Variable - Parameter reference variable. + Variable *string `json:"variable,omitempty"` +} + +// SsisProject ssis project. +type SsisProject struct { + // FolderID - Folder id which contains project. + FolderID *int64 `json:"folderId,omitempty"` + // Version - Project version. + Version *int64 `json:"version,omitempty"` + // EnvironmentRefs - Environment reference in project + EnvironmentRefs *[]SsisEnvironmentReference `json:"environmentRefs,omitempty"` + // Parameters - Parameters in project + Parameters *[]SsisParameter `json:"parameters,omitempty"` + // ID - Metadata id. + ID *int64 `json:"id,omitempty"` + // Name - Metadata name. + Name *string `json:"name,omitempty"` + // Description - Metadata description. + Description *string `json:"description,omitempty"` + // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' + Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SsisProject. +func (sp SsisProject) MarshalJSON() ([]byte, error) { + sp.Type = TypeBasicSsisObjectMetadataTypeProject + objectMap := make(map[string]interface{}) + if sp.FolderID != nil { + objectMap["folderId"] = sp.FolderID + } + if sp.Version != nil { + objectMap["version"] = sp.Version + } + if sp.EnvironmentRefs != nil { + objectMap["environmentRefs"] = sp.EnvironmentRefs + } + if sp.Parameters != nil { + objectMap["parameters"] = sp.Parameters + } + if sp.ID != nil { + objectMap["id"] = sp.ID + } + if sp.Name != nil { + objectMap["name"] = sp.Name + } + if sp.Description != nil { + objectMap["description"] = sp.Description + } + if sp.Type != "" { + objectMap["type"] = sp.Type + } + return json.Marshal(objectMap) +} + +// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisProject. +func (sp SsisProject) AsSsisFolder() (*SsisFolder, bool) { + return nil, false +} + +// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisProject. +func (sp SsisProject) AsSsisProject() (*SsisProject, bool) { + return &sp, true +} + +// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisProject. +func (sp SsisProject) AsSsisPackage() (*SsisPackage, bool) { + return nil, false +} + +// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisProject. +func (sp SsisProject) AsSsisEnvironment() (*SsisEnvironment, bool) { + return nil, false +} + +// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisProject. +func (sp SsisProject) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { + return nil, false +} + +// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisProject. +func (sp SsisProject) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { + return &sp, true +} + +// SsisVariable ssis variable. +type SsisVariable struct { + // ID - Variable id. + ID *int64 `json:"id,omitempty"` + // Name - Variable name. + Name *string `json:"name,omitempty"` + // Description - Variable description. + Description *string `json:"description,omitempty"` + // DataType - Variable type. + DataType *string `json:"dataType,omitempty"` + // Sensitive - Whether variable is sensitive. + Sensitive *bool `json:"sensitive,omitempty"` + // Value - Variable value. + Value *string `json:"value,omitempty"` + // SensitiveValue - Variable sensitive value. + SensitiveValue *string `json:"sensitiveValue,omitempty"` +} + +// SubResource azure Synapse nested resource, which belongs to a workspace. +type SubResource struct { + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SubResource. +func (sr SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// TopQueries a database query. +type TopQueries struct { + // AggregationFunction - READ-ONLY; The function that is used to aggregate each query's metrics. Possible values include: 'QueryAggregationFunctionMin', 'QueryAggregationFunctionMax', 'QueryAggregationFunctionAvg', 'QueryAggregationFunctionSum' + AggregationFunction QueryAggregationFunction `json:"aggregationFunction,omitempty"` + // ExecutionType - READ-ONLY; The execution type that is used to filter the query instances that are returned. Possible values include: 'QueryExecutionTypeAny', 'QueryExecutionTypeRegular', 'QueryExecutionTypeIrregular', 'QueryExecutionTypeAborted', 'QueryExecutionTypeException' + ExecutionType QueryExecutionType `json:"executionType,omitempty"` + // IntervalType - READ-ONLY; The duration of the interval (ISO8601 duration format). + IntervalType *string `json:"intervalType,omitempty"` + // NumberOfTopQueries - READ-ONLY; The number of requested queries. + NumberOfTopQueries *float64 `json:"numberOfTopQueries,omitempty"` + // ObservationStartTime - READ-ONLY; The start time for queries that are returned (ISO8601 format) + ObservationStartTime *date.Time `json:"observationStartTime,omitempty"` + // ObservationEndTime - READ-ONLY; The end time for queries that are returned (ISO8601 format) + ObservationEndTime *date.Time `json:"observationEndTime,omitempty"` + // ObservedMetric - READ-ONLY; The type of metric to use for ordering the top metrics. Possible values include: 'QueryObservedMetricTypeCPU', 'QueryObservedMetricTypeIo', 'QueryObservedMetricTypeLogio', 'QueryObservedMetricTypeDuration', 'QueryObservedMetricTypeExecutionCount' + ObservedMetric QueryObservedMetricType `json:"observedMetric,omitempty"` + // Queries - READ-ONLY; The list of queries. + Queries *[]QueryStatistic `json:"queries,omitempty"` +} + +// MarshalJSON is the custom marshaler for TopQueries. +func (tq TopQueries) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// TopQueriesListResult represents the response to a get top queries request. +type TopQueriesListResult struct { + // Value - The list of top queries. + Value *[]TopQueries `json:"value,omitempty"` +} + +// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource +// which has 'tags' and a 'location' +type TrackedResource struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + 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.Tags != nil { + objectMap["tags"] = tr.Tags + } + if tr.Location != nil { + objectMap["location"] = tr.Location + } + return json.Marshal(objectMap) +} + +// TransparentDataEncryption represents a Sql pool transparent data encryption configuration. +type TransparentDataEncryption struct { + autorest.Response `json:"-"` + // Location - READ-ONLY; Resource location. + Location *string `json:"location,omitempty"` + // TransparentDataEncryptionProperties - Represents the properties of the resource. + *TransparentDataEncryptionProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for TransparentDataEncryption. +func (tde TransparentDataEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tde.TransparentDataEncryptionProperties != nil { + objectMap["properties"] = tde.TransparentDataEncryptionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryption struct. +func (tde *TransparentDataEncryption) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + tde.Location = &location + } + case "properties": + if v != nil { + var transparentDataEncryptionProperties TransparentDataEncryptionProperties + err = json.Unmarshal(*v, &transparentDataEncryptionProperties) + if err != nil { + return err + } + tde.TransparentDataEncryptionProperties = &transparentDataEncryptionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tde.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tde.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tde.Type = &typeVar + } + } + } + + return nil +} + +// TransparentDataEncryptionListResult a list of transparent data encryption configurations. +type TransparentDataEncryptionListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]TransparentDataEncryption `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for TransparentDataEncryptionListResult. +func (tdelr TransparentDataEncryptionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// TransparentDataEncryptionListResultIterator provides access to a complete listing of +// TransparentDataEncryption values. +type TransparentDataEncryptionListResultIterator struct { + i int + page TransparentDataEncryptionListResultPage +} + +// 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 *TransparentDataEncryptionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionListResultIterator.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 *TransparentDataEncryptionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TransparentDataEncryptionListResultIterator) 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 TransparentDataEncryptionListResultIterator) Response() TransparentDataEncryptionListResult { + 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 TransparentDataEncryptionListResultIterator) Value() TransparentDataEncryption { + if !iter.page.NotDone() { + return TransparentDataEncryption{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TransparentDataEncryptionListResultIterator type. +func NewTransparentDataEncryptionListResultIterator(page TransparentDataEncryptionListResultPage) TransparentDataEncryptionListResultIterator { + return TransparentDataEncryptionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tdelr TransparentDataEncryptionListResult) IsEmpty() bool { + return tdelr.Value == nil || len(*tdelr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (tdelr TransparentDataEncryptionListResult) hasNextLink() bool { + return tdelr.NextLink != nil && len(*tdelr.NextLink) != 0 +} + +// transparentDataEncryptionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tdelr TransparentDataEncryptionListResult) transparentDataEncryptionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !tdelr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tdelr.NextLink))) +} + +// TransparentDataEncryptionListResultPage contains a page of TransparentDataEncryption values. +type TransparentDataEncryptionListResultPage struct { + fn func(context.Context, TransparentDataEncryptionListResult) (TransparentDataEncryptionListResult, error) + tdelr TransparentDataEncryptionListResult +} + +// 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 *TransparentDataEncryptionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.tdelr) + if err != nil { + return err + } + page.tdelr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *TransparentDataEncryptionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TransparentDataEncryptionListResultPage) NotDone() bool { + return !page.tdelr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TransparentDataEncryptionListResultPage) Response() TransparentDataEncryptionListResult { + return page.tdelr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TransparentDataEncryptionListResultPage) Values() []TransparentDataEncryption { + if page.tdelr.IsEmpty() { + return nil + } + return *page.tdelr.Value +} + +// Creates a new instance of the TransparentDataEncryptionListResultPage type. +func NewTransparentDataEncryptionListResultPage(cur TransparentDataEncryptionListResult, getNextPage func(context.Context, TransparentDataEncryptionListResult) (TransparentDataEncryptionListResult, error)) TransparentDataEncryptionListResultPage { + return TransparentDataEncryptionListResultPage{ + fn: getNextPage, + tdelr: cur, + } +} + +// TransparentDataEncryptionProperties represents the properties of a database transparent data encryption. +type TransparentDataEncryptionProperties struct { + // Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled' + Status TransparentDataEncryptionStatus `json:"status,omitempty"` +} + +// UpdateIntegrationRuntimeNodeRequest update integration runtime node request. +type UpdateIntegrationRuntimeNodeRequest struct { + // ConcurrentJobsLimit - The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and maxConcurrentJobs(inclusive) are allowed. + ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"` +} + +// UpdateIntegrationRuntimeRequest update integration runtime request. +type UpdateIntegrationRuntimeRequest struct { + // AutoUpdate - Enables or disables the auto-update feature of the self-hosted integration runtime. See https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: 'IntegrationRuntimeAutoUpdateOn', 'IntegrationRuntimeAutoUpdateOff' + AutoUpdate IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"` + // UpdateDelayOffset - The time offset (in hours) in the day, e.g., PT03H is 3 hours. The integration runtime auto update will happen on that time. + UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"` +} + +// UserAssignedManagedIdentity user Assigned Managed Identity +type UserAssignedManagedIdentity struct { + // ClientID - READ-ONLY; The client ID. + ClientID *uuid.UUID `json:"clientId,omitempty"` + // PrincipalID - READ-ONLY; The principal ID. + PrincipalID *uuid.UUID `json:"principalId,omitempty"` +} + +// MarshalJSON is the custom marshaler for UserAssignedManagedIdentity. +func (uami UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualNetworkProfile virtual Network Profile +type VirtualNetworkProfile struct { + // ComputeSubnetID - Subnet ID used for computes in workspace + ComputeSubnetID *string `json:"computeSubnetId,omitempty"` +} + +// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring +// scans. +type VulnerabilityAssessmentRecurringScansProperties struct { + // IsEnabled - Recurring scans state. + IsEnabled *bool `json:"isEnabled,omitempty"` + // EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators. + EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` + // Emails - Specifies an array of e-mail addresses to which the scan notification is sent. + Emails *[]string `json:"emails,omitempty"` +} + +// VulnerabilityAssessmentScanError properties of a vulnerability assessment scan error. +type VulnerabilityAssessmentScanError struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` +} + +// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanError. +func (vase VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VulnerabilityAssessmentScanRecord a vulnerability assessment scan record. +type VulnerabilityAssessmentScanRecord struct { + autorest.Response `json:"-"` + // VulnerabilityAssessmentScanRecordProperties - Resource properties. + *VulnerabilityAssessmentScanRecordProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecord. +func (vasr VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vasr.VulnerabilityAssessmentScanRecordProperties != nil { + objectMap["properties"] = vasr.VulnerabilityAssessmentScanRecordProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VulnerabilityAssessmentScanRecord struct. +func (vasr *VulnerabilityAssessmentScanRecord) 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 vulnerabilityAssessmentScanRecordProperties VulnerabilityAssessmentScanRecordProperties + err = json.Unmarshal(*v, &vulnerabilityAssessmentScanRecordProperties) + if err != nil { + return err + } + vasr.VulnerabilityAssessmentScanRecordProperties = &vulnerabilityAssessmentScanRecordProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vasr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vasr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vasr.Type = &typeVar + } + } + } + + return nil +} + +// VulnerabilityAssessmentScanRecordListResult a list of vulnerability assessment scan records. +type VulnerabilityAssessmentScanRecordListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]VulnerabilityAssessmentScanRecord `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecordListResult. +func (vasrlr VulnerabilityAssessmentScanRecordListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VulnerabilityAssessmentScanRecordListResultIterator provides access to a complete listing of +// VulnerabilityAssessmentScanRecord values. +type VulnerabilityAssessmentScanRecordListResultIterator struct { + i int + page VulnerabilityAssessmentScanRecordListResultPage +} + +// 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 *VulnerabilityAssessmentScanRecordListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VulnerabilityAssessmentScanRecordListResultIterator.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 *VulnerabilityAssessmentScanRecordListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VulnerabilityAssessmentScanRecordListResultIterator) 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 VulnerabilityAssessmentScanRecordListResultIterator) Response() VulnerabilityAssessmentScanRecordListResult { + 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 VulnerabilityAssessmentScanRecordListResultIterator) Value() VulnerabilityAssessmentScanRecord { + if !iter.page.NotDone() { + return VulnerabilityAssessmentScanRecord{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VulnerabilityAssessmentScanRecordListResultIterator type. +func NewVulnerabilityAssessmentScanRecordListResultIterator(page VulnerabilityAssessmentScanRecordListResultPage) VulnerabilityAssessmentScanRecordListResultIterator { + return VulnerabilityAssessmentScanRecordListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vasrlr VulnerabilityAssessmentScanRecordListResult) IsEmpty() bool { + return vasrlr.Value == nil || len(*vasrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vasrlr VulnerabilityAssessmentScanRecordListResult) hasNextLink() bool { + return vasrlr.NextLink != nil && len(*vasrlr.NextLink) != 0 +} + +// vulnerabilityAssessmentScanRecordListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vasrlr VulnerabilityAssessmentScanRecordListResult) vulnerabilityAssessmentScanRecordListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vasrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vasrlr.NextLink))) +} + +// VulnerabilityAssessmentScanRecordListResultPage contains a page of VulnerabilityAssessmentScanRecord +// values. +type VulnerabilityAssessmentScanRecordListResultPage struct { + fn func(context.Context, VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error) + vasrlr VulnerabilityAssessmentScanRecordListResult +} + +// 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 *VulnerabilityAssessmentScanRecordListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VulnerabilityAssessmentScanRecordListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vasrlr) + if err != nil { + return err + } + page.vasrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *VulnerabilityAssessmentScanRecordListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VulnerabilityAssessmentScanRecordListResultPage) NotDone() bool { + return !page.vasrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VulnerabilityAssessmentScanRecordListResultPage) Response() VulnerabilityAssessmentScanRecordListResult { + return page.vasrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VulnerabilityAssessmentScanRecordListResultPage) Values() []VulnerabilityAssessmentScanRecord { + if page.vasrlr.IsEmpty() { + return nil + } + return *page.vasrlr.Value +} + +// Creates a new instance of the VulnerabilityAssessmentScanRecordListResultPage type. +func NewVulnerabilityAssessmentScanRecordListResultPage(cur VulnerabilityAssessmentScanRecordListResult, getNextPage func(context.Context, VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error)) VulnerabilityAssessmentScanRecordListResultPage { + return VulnerabilityAssessmentScanRecordListResultPage{ + fn: getNextPage, + vasrlr: cur, + } +} + +// VulnerabilityAssessmentScanRecordProperties properties of a vulnerability assessment scan record. +type VulnerabilityAssessmentScanRecordProperties struct { + // ScanID - READ-ONLY; The scan ID. + ScanID *string `json:"scanId,omitempty"` + // TriggerType - READ-ONLY; The scan trigger type. Possible values include: 'VulnerabilityAssessmentScanTriggerTypeOnDemand', 'VulnerabilityAssessmentScanTriggerTypeRecurring' + TriggerType VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty"` + // State - READ-ONLY; The scan status. Possible values include: 'VulnerabilityAssessmentScanStatePassed', 'VulnerabilityAssessmentScanStateFailed', 'VulnerabilityAssessmentScanStateFailedToRun', 'VulnerabilityAssessmentScanStateInProgress' + State VulnerabilityAssessmentScanState `json:"state,omitempty"` + // StartTime - READ-ONLY; The scan start time (UTC). + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; The scan end time (UTC). + EndTime *date.Time `json:"endTime,omitempty"` + // Errors - READ-ONLY; The scan errors. + Errors *[]VulnerabilityAssessmentScanError `json:"errors,omitempty"` + // StorageContainerPath - READ-ONLY; The scan results storage container path. + StorageContainerPath *string `json:"storageContainerPath,omitempty"` + // NumberOfFailedSecurityChecks - READ-ONLY; The number of failed security checks. + NumberOfFailedSecurityChecks *int32 `json:"numberOfFailedSecurityChecks,omitempty"` +} + +// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecordProperties. +func (vasrp VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// WorkloadClassifier workload classifier operations for a data warehouse +type WorkloadClassifier struct { + autorest.Response `json:"-"` + // WorkloadClassifierProperties - Resource properties. + *WorkloadClassifierProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + 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"` +} + +// MarshalJSON is the custom marshaler for WorkloadClassifierListResult. +func (wclr WorkloadClassifierListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// 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 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wclr WorkloadClassifierListResult) hasNextLink() bool { + return wclr.NextLink != nil && len(*wclr.NextLink) != 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.hasNextLink() { + 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) + }() + } + for { + next, err := page.fn(ctx, page.wclr) + if err != nil { + return err + } + page.wclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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(cur WorkloadClassifierListResult, getNextPage func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error)) WorkloadClassifierListResultPage { + return WorkloadClassifierListResultPage{ + fn: getNextPage, + wclr: cur, + } +} + +// 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"` +} + +// WorkloadGroup workload group operations for a sql pool +type WorkloadGroup struct { + autorest.Response `json:"-"` + // WorkloadGroupProperties - Resource properties. + *WorkloadGroupProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + 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"` +} + +// MarshalJSON is the custom marshaler for WorkloadGroupListResult. +func (wglr WorkloadGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// 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 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wglr WorkloadGroupListResult) hasNextLink() bool { + return wglr.NextLink != nil && len(*wglr.NextLink) != 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.hasNextLink() { + 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) + }() + } + for { + next, err := page.fn(ctx, page.wglr) + if err != nil { + return err + } + page.wglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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(cur WorkloadGroupListResult, getNextPage func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error)) WorkloadGroupListResultPage { + return WorkloadGroupListResultPage{ + fn: getNextPage, + wglr: cur, + } +} + +// 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"` +} + +// Workspace a workspace +type Workspace struct { + autorest.Response `json:"-"` + // WorkspaceProperties - Workspace resource properties + *WorkspaceProperties `json:"properties,omitempty"` + // Identity - Identity of the workspace + Identity *ManagedIdentity `json:"identity,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Workspace. +func (w Workspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if w.WorkspaceProperties != nil { + objectMap["properties"] = w.WorkspaceProperties + } + if w.Identity != nil { + objectMap["identity"] = w.Identity + } + if w.Tags != nil { + objectMap["tags"] = w.Tags + } + if w.Location != nil { + objectMap["location"] = w.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Workspace struct. +func (w *Workspace) 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 workspaceProperties WorkspaceProperties + err = json.Unmarshal(*v, &workspaceProperties) + if err != nil { + return err + } + w.WorkspaceProperties = &workspaceProperties + } + case "identity": + if v != nil { + var identity ManagedIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + w.Identity = &identity + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + w.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + w.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + w.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + w.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + w.Type = &typeVar + } + } + } + + return nil +} + +// WorkspaceAadAdminInfo workspace active directory administrator +type WorkspaceAadAdminInfo struct { + autorest.Response `json:"-"` + // AadAdminProperties - Workspace active directory administrator properties + *AadAdminProperties `json:"properties,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 + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkspaceAadAdminInfo. +func (waai WorkspaceAadAdminInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if waai.AadAdminProperties != nil { + objectMap["properties"] = waai.AadAdminProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkspaceAadAdminInfo struct. +func (waai *WorkspaceAadAdminInfo) 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 aadAdminProperties AadAdminProperties + err = json.Unmarshal(*v, &aadAdminProperties) + if err != nil { + return err + } + waai.AadAdminProperties = &aadAdminProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + waai.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + waai.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + waai.Type = &typeVar + } + } + } + + return nil +} + +// WorkspaceAadAdminsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspaceAadAdminsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceAadAdminsClient) (WorkspaceAadAdminInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceAadAdminsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceAadAdminsCreateOrUpdateFuture.Result. +func (future *WorkspaceAadAdminsCreateOrUpdateFuture) result(client WorkspaceAadAdminsClient) (waai WorkspaceAadAdminInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + waai.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceAadAdminsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if waai.Response.Response, err = future.GetResult(sender); err == nil && waai.Response.Response.StatusCode != http.StatusNoContent { + waai, err = client.CreateOrUpdateResponder(waai.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsCreateOrUpdateFuture", "Result", waai.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceAadAdminsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspaceAadAdminsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceAadAdminsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceAadAdminsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceAadAdminsDeleteFuture.Result. +func (future *WorkspaceAadAdminsDeleteFuture) result(client WorkspaceAadAdminsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceAadAdminsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// WorkspaceInfoListResult list of workspaces +type WorkspaceInfoListResult struct { + autorest.Response `json:"-"` + // NextLink - Link to the next page of results + NextLink *string `json:"nextLink,omitempty"` + // Value - List of workspaces + Value *[]Workspace `json:"value,omitempty"` +} + +// WorkspaceInfoListResultIterator provides access to a complete listing of Workspace values. +type WorkspaceInfoListResultIterator struct { + i int + page WorkspaceInfoListResultPage +} + +// 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 *WorkspaceInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceInfoListResultIterator.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 *WorkspaceInfoListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkspaceInfoListResultIterator) 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 WorkspaceInfoListResultIterator) Response() WorkspaceInfoListResult { + 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 WorkspaceInfoListResultIterator) Value() Workspace { + if !iter.page.NotDone() { + return Workspace{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkspaceInfoListResultIterator type. +func NewWorkspaceInfoListResultIterator(page WorkspaceInfoListResultPage) WorkspaceInfoListResultIterator { + return WorkspaceInfoListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wilr WorkspaceInfoListResult) IsEmpty() bool { + return wilr.Value == nil || len(*wilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wilr WorkspaceInfoListResult) hasNextLink() bool { + return wilr.NextLink != nil && len(*wilr.NextLink) != 0 +} + +// workspaceInfoListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wilr WorkspaceInfoListResult) workspaceInfoListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wilr.NextLink))) +} + +// WorkspaceInfoListResultPage contains a page of Workspace values. +type WorkspaceInfoListResultPage struct { + fn func(context.Context, WorkspaceInfoListResult) (WorkspaceInfoListResult, error) + wilr WorkspaceInfoListResult +} + +// 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 *WorkspaceInfoListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceInfoListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.wilr) + if err != nil { + return err + } + page.wilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + 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 *WorkspaceInfoListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkspaceInfoListResultPage) NotDone() bool { + return !page.wilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkspaceInfoListResultPage) Response() WorkspaceInfoListResult { + return page.wilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkspaceInfoListResultPage) Values() []Workspace { + if page.wilr.IsEmpty() { + return nil + } + return *page.wilr.Value +} + +// Creates a new instance of the WorkspaceInfoListResultPage type. +func NewWorkspaceInfoListResultPage(cur WorkspaceInfoListResult, getNextPage func(context.Context, WorkspaceInfoListResult) (WorkspaceInfoListResult, error)) WorkspaceInfoListResultPage { + return WorkspaceInfoListResultPage{ + fn: getNextPage, + wilr: cur, + } +} + +// WorkspaceKeyDetails details of the customer managed key associated with the workspace +type WorkspaceKeyDetails struct { + // Name - Workspace Key sub-resource name + Name *string `json:"name,omitempty"` + // KeyVaultURL - Workspace Key sub-resource key vault url + KeyVaultURL *string `json:"keyVaultUrl,omitempty"` +} + +// WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceManagedIdentitySQLControlSettingsClient) (ManagedIdentitySQLControlSettingsModel, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture.Result. +func (future *WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture) result(client WorkspaceManagedIdentitySQLControlSettingsClient) (miscsm ManagedIdentitySQLControlSettingsModel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + miscsm.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if miscsm.Response.Response, err = future.GetResult(sender); err == nil && miscsm.Response.Response.StatusCode != http.StatusNoContent { + miscsm, err = client.CreateOrUpdateResponder(miscsm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture", "Result", miscsm.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceManagedSQLServerBlobAuditingPoliciesClient) (ServerBlobAuditingPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture.Result. +func (future *WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) (sbap ServerBlobAuditingPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sbap.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sbap.Response.Response, err = future.GetResult(sender); err == nil && sbap.Response.Response.StatusCode != http.StatusNoContent { + sbap, err = client.CreateOrUpdateResponder(sbap.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", sbap.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceManagedSQLServerEncryptionProtectorClient) (EncryptionProtector, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture.Result. +func (future *WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerEncryptionProtectorClient) (ep EncryptionProtector, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ep.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent { + ep, err = client.CreateOrUpdateResponder(ep.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceManagedSQLServerEncryptionProtectorClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture.Result. +func (future *WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture) result(client WorkspaceManagedSQLServerEncryptionProtectorClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture") + return + } + ar.Response = future.Response() + return +} + +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring +// and retrieving the results of a long-running operation. +type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) (ExtendedServerBlobAuditingPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture.Result. +func (future *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) (esbap ExtendedServerBlobAuditingPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + esbap.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if esbap.Response.Response, err = future.GetResult(sender); err == nil && esbap.Response.Response.StatusCode != http.StatusNoContent { + esbap, err = client.CreateOrUpdateResponder(esbap.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture", "Result", esbap.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceManagedSQLServerSecurityAlertPolicyClient) (ServerSecurityAlertPolicy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture.Result. +func (future *WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerSecurityAlertPolicyClient) (ssap ServerSecurityAlertPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ssap.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ssap.Response.Response, err = future.GetResult(sender); err == nil && ssap.Response.Response.StatusCode != http.StatusNoContent { + ssap, err = client.CreateOrUpdateResponder(ssap.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture", "Result", ssap.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspacePatchInfo workspace patch details +type WorkspacePatchInfo struct { + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // Identity - The identity of the workspace + Identity *ManagedIdentity `json:"identity,omitempty"` + // WorkspacePatchProperties - Workspace patch properties + *WorkspacePatchProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkspacePatchInfo. +func (wpi WorkspacePatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wpi.Tags != nil { + objectMap["tags"] = wpi.Tags + } + if wpi.Identity != nil { + objectMap["identity"] = wpi.Identity + } + if wpi.WorkspacePatchProperties != nil { + objectMap["properties"] = wpi.WorkspacePatchProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkspacePatchInfo struct. +func (wpi *WorkspacePatchInfo) 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 "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wpi.Tags = tags + } + case "identity": + if v != nil { + var identity ManagedIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + wpi.Identity = &identity + } + case "properties": + if v != nil { + var workspacePatchProperties WorkspacePatchProperties + err = json.Unmarshal(*v, &workspacePatchProperties) + if err != nil { + return err + } + wpi.WorkspacePatchProperties = &workspacePatchProperties + } + } + } + + return nil +} + +// WorkspacePatchProperties workspace patch properties +type WorkspacePatchProperties struct { + // SQLAdministratorLoginPassword - SQL administrator login password + SQLAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"` + // ManagedVirtualNetworkSettings - Managed Virtual Network Settings + ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"` + // WorkspaceRepositoryConfiguration - Git integration settings + WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"` + // PurviewConfiguration - Purview Configuration + PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"` + // ProvisioningState - READ-ONLY; Resource provisioning state + ProvisioningState *string `json:"provisioningState,omitempty"` + // Encryption - The encryption details of the workspace + Encryption *EncryptionDetails `json:"encryption,omitempty"` + // PublicNetworkAccess - Enable or Disable public network access to workspace. Possible values include: 'WorkspacePublicNetworkAccessEnabled', 'WorkspacePublicNetworkAccessDisabled' + PublicNetworkAccess WorkspacePublicNetworkAccess `json:"publicNetworkAccess,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkspacePatchProperties. +func (wpp WorkspacePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wpp.SQLAdministratorLoginPassword != nil { + objectMap["sqlAdministratorLoginPassword"] = wpp.SQLAdministratorLoginPassword + } + if wpp.ManagedVirtualNetworkSettings != nil { + objectMap["managedVirtualNetworkSettings"] = wpp.ManagedVirtualNetworkSettings + } + if wpp.WorkspaceRepositoryConfiguration != nil { + objectMap["workspaceRepositoryConfiguration"] = wpp.WorkspaceRepositoryConfiguration + } + if wpp.PurviewConfiguration != nil { + objectMap["purviewConfiguration"] = wpp.PurviewConfiguration + } + if wpp.Encryption != nil { + objectMap["encryption"] = wpp.Encryption + } + if wpp.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = wpp.PublicNetworkAccess + } + return json.Marshal(objectMap) +} + +// WorkspaceProperties workspace properties +type WorkspaceProperties struct { + // DefaultDataLakeStorage - Workspace default data lake storage account details + DefaultDataLakeStorage *DataLakeStorageAccountDetails `json:"defaultDataLakeStorage,omitempty"` + // SQLAdministratorLoginPassword - SQL administrator login password + SQLAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"` + // ManagedResourceGroupName - Workspace managed resource group. The resource group name uniquely identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note that the name cannot end with '.' + ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty"` + // ProvisioningState - READ-ONLY; Resource provisioning state + ProvisioningState *string `json:"provisioningState,omitempty"` + // SQLAdministratorLogin - Login for workspace SQL active directory administrator + SQLAdministratorLogin *string `json:"sqlAdministratorLogin,omitempty"` + // VirtualNetworkProfile - Virtual Network profile + VirtualNetworkProfile *VirtualNetworkProfile `json:"virtualNetworkProfile,omitempty"` + // ConnectivityEndpoints - Connectivity endpoints + ConnectivityEndpoints map[string]*string `json:"connectivityEndpoints"` + // ManagedVirtualNetwork - Setting this to 'default' will ensure that all compute for this workspace is in a virtual network managed on behalf of the user. + ManagedVirtualNetwork *string `json:"managedVirtualNetwork,omitempty"` + // PrivateEndpointConnections - Private endpoint connections to the workspace + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // Encryption - The encryption details of the workspace + Encryption *EncryptionDetails `json:"encryption,omitempty"` + // WorkspaceUID - READ-ONLY; The workspace unique identifier + WorkspaceUID *uuid.UUID `json:"workspaceUID,omitempty"` + // ExtraProperties - READ-ONLY; Workspace level configs and feature flags + ExtraProperties map[string]interface{} `json:"extraProperties"` + // ManagedVirtualNetworkSettings - Managed Virtual Network Settings + ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"` + // WorkspaceRepositoryConfiguration - Git integration settings + WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"` + // PurviewConfiguration - Purview Configuration + PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"` + // AdlaResourceID - READ-ONLY; The ADLA resource ID. + AdlaResourceID *string `json:"adlaResourceId,omitempty"` + // PublicNetworkAccess - Enable or Disable public network access to workspace. Possible values include: 'WorkspacePublicNetworkAccessEnabled', 'WorkspacePublicNetworkAccessDisabled' + PublicNetworkAccess WorkspacePublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // CspWorkspaceAdminProperties - Initial workspace AAD admin properties for a CSP subscription + CspWorkspaceAdminProperties *CspWorkspaceAdminProperties `json:"cspWorkspaceAdminProperties,omitempty"` + // Settings - READ-ONLY; Workspace settings + Settings map[string]interface{} `json:"settings"` + // AzureADOnlyAuthentication - Enable or Disable AzureADOnlyAuthentication on All Workspace subresource + AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkspaceProperties. +func (wp WorkspaceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wp.DefaultDataLakeStorage != nil { + objectMap["defaultDataLakeStorage"] = wp.DefaultDataLakeStorage + } + if wp.SQLAdministratorLoginPassword != nil { + objectMap["sqlAdministratorLoginPassword"] = wp.SQLAdministratorLoginPassword + } + if wp.ManagedResourceGroupName != nil { + objectMap["managedResourceGroupName"] = wp.ManagedResourceGroupName + } + if wp.SQLAdministratorLogin != nil { + objectMap["sqlAdministratorLogin"] = wp.SQLAdministratorLogin + } + if wp.VirtualNetworkProfile != nil { + objectMap["virtualNetworkProfile"] = wp.VirtualNetworkProfile + } + if wp.ConnectivityEndpoints != nil { + objectMap["connectivityEndpoints"] = wp.ConnectivityEndpoints + } + if wp.ManagedVirtualNetwork != nil { + objectMap["managedVirtualNetwork"] = wp.ManagedVirtualNetwork + } + if wp.PrivateEndpointConnections != nil { + objectMap["privateEndpointConnections"] = wp.PrivateEndpointConnections + } + if wp.Encryption != nil { + objectMap["encryption"] = wp.Encryption + } + if wp.ManagedVirtualNetworkSettings != nil { + objectMap["managedVirtualNetworkSettings"] = wp.ManagedVirtualNetworkSettings + } + if wp.WorkspaceRepositoryConfiguration != nil { + objectMap["workspaceRepositoryConfiguration"] = wp.WorkspaceRepositoryConfiguration + } + if wp.PurviewConfiguration != nil { + objectMap["purviewConfiguration"] = wp.PurviewConfiguration + } + if wp.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = wp.PublicNetworkAccess + } + if wp.CspWorkspaceAdminProperties != nil { + objectMap["cspWorkspaceAdminProperties"] = wp.CspWorkspaceAdminProperties + } + if wp.AzureADOnlyAuthentication != nil { + objectMap["azureADOnlyAuthentication"] = wp.AzureADOnlyAuthentication + } + return json.Marshal(objectMap) +} + +// WorkspaceRepositoryConfiguration git integration settings +type WorkspaceRepositoryConfiguration struct { + // Type - Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration + Type *string `json:"type,omitempty"` + // HostName - GitHub Enterprise host name. For example: https://github.mydomain.com + HostName *string `json:"hostName,omitempty"` + // AccountName - Account name + AccountName *string `json:"accountName,omitempty"` + // ProjectName - VSTS project name + ProjectName *string `json:"projectName,omitempty"` + // RepositoryName - Repository name + RepositoryName *string `json:"repositoryName,omitempty"` + // CollaborationBranch - Collaboration branch + CollaborationBranch *string `json:"collaborationBranch,omitempty"` + // RootFolder - Root folder to use in the repository + RootFolder *string `json:"rootFolder,omitempty"` + // LastCommitID - The last commit ID + LastCommitID *string `json:"lastCommitId,omitempty"` + // TenantID - The VSTS tenant ID + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + +// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspacesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspacesClient) (Workspace, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspacesCreateOrUpdateFuture.Result. +func (future *WorkspacesCreateOrUpdateFuture) result(client WorkspacesClient) (w Workspace, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + w.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspacesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent { + w, err = client.CreateOrUpdateResponder(w.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WorkspacesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspacesClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspacesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspacesDeleteFuture.Result. +func (future *WorkspacesDeleteFuture) result(client WorkspacesClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspacesDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeleteResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesDeleteFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceSQLAadAdminsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspaceSQLAadAdminsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceSQLAadAdminsClient) (WorkspaceAadAdminInfo, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceSQLAadAdminsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceSQLAadAdminsCreateOrUpdateFuture.Result. +func (future *WorkspaceSQLAadAdminsCreateOrUpdateFuture) result(client WorkspaceSQLAadAdminsClient) (waai WorkspaceAadAdminInfo, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + waai.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if waai.Response.Response, err = future.GetResult(sender); err == nil && waai.Response.Response.StatusCode != http.StatusNoContent { + waai, err = client.CreateOrUpdateResponder(waai.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture", "Result", waai.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkspaceSQLAadAdminsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspaceSQLAadAdminsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspaceSQLAadAdminsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspaceSQLAadAdminsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspaceSQLAadAdminsDeleteFuture.Result. +func (future *WorkspaceSQLAadAdminsDeleteFuture) result(client WorkspaceSQLAadAdminsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceSQLAadAdminsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// WorkspacesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WorkspacesUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkspacesClient) (Workspace, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkspacesUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkspacesUpdateFuture.Result. +func (future *WorkspacesUpdateFuture) result(client WorkspacesClient) (w Workspace, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + w.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("synapse.WorkspacesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent { + w, err = client.UpdateResponder(w.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/operations.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/operations.go new file mode 100644 index 000000000000..107f7e16d8d0 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/operations.go @@ -0,0 +1,347 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// OperationsClient is the azure Synapse Analytics Management Client +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 using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability check whether a workspace name is available +// Parameters: +// request - the check request +func (client OperationsClient) CheckNameAvailability(ctx context.Context, request CheckNameAvailabilityRequest) (result CheckNameAvailabilityResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.CheckNameAvailability") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("synapse.OperationsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, request) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "CheckNameAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client OperationsClient) CheckNameAvailabilityPreparer(ctx context.Context, request CheckNameAvailabilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-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.Synapse/checkNameAvailability", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client OperationsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAzureAsyncHeaderResult get the status of an operation +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// operationID - operation ID +func (client OperationsClient) GetAzureAsyncHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string) (result OperationResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.GetAzureAsyncHeaderResult") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.OperationsClient", "GetAzureAsyncHeaderResult", err.Error()) + } + + req, err := client.GetAzureAsyncHeaderResultPreparer(ctx, resourceGroupName, workspaceName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "GetAzureAsyncHeaderResult", nil, "Failure preparing request") + return + } + + resp, err := client.GetAzureAsyncHeaderResultSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "GetAzureAsyncHeaderResult", resp, "Failure sending request") + return + } + + result, err = client.GetAzureAsyncHeaderResultResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "GetAzureAsyncHeaderResult", resp, "Failure responding to request") + return + } + + return +} + +// GetAzureAsyncHeaderResultPreparer prepares the GetAzureAsyncHeaderResult request. +func (client OperationsClient) GetAzureAsyncHeaderResultPreparer(ctx context.Context, resourceGroupName string, workspaceName 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), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/operationStatuses/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAzureAsyncHeaderResultSender sends the GetAzureAsyncHeaderResult request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) GetAzureAsyncHeaderResultSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetAzureAsyncHeaderResultResponder handles the response to the GetAzureAsyncHeaderResult request. The method always +// closes the http.Response Body. +func (client OperationsClient) GetAzureAsyncHeaderResultResponder(resp *http.Response) (result OperationResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetLocationHeaderResult get the result of an operation +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// operationID - operation ID +func (client OperationsClient) GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.GetLocationHeaderResult") + 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.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.OperationsClient", "GetLocationHeaderResult", err.Error()) + } + + req, err := client.GetLocationHeaderResultPreparer(ctx, resourceGroupName, workspaceName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "GetLocationHeaderResult", nil, "Failure preparing request") + return + } + + resp, err := client.GetLocationHeaderResultSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "GetLocationHeaderResult", resp, "Failure sending request") + return + } + + result, err = client.GetLocationHeaderResultResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "GetLocationHeaderResult", resp, "Failure responding to request") + return + } + + return +} + +// GetLocationHeaderResultPreparer prepares the GetLocationHeaderResult request. +func (client OperationsClient) GetLocationHeaderResultPreparer(ctx context.Context, resourceGroupName string, workspaceName 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), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/operationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetLocationHeaderResultSender sends the GetLocationHeaderResult request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) GetLocationHeaderResultSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetLocationHeaderResultResponder handles the response to the GetLocationHeaderResult request. The method always +// closes the http.Response Body. +func (client OperationsClient) GetLocationHeaderResultResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// List get all available operations +func (client OperationsClient) List(ctx context.Context) (result ListAvailableRpOperation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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, "synapse.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.OperationsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Synapse/operations")) + 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) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result ListAvailableRpOperation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnections.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnections.go new file mode 100644 index 000000000000..c26cb05069b5 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnections.go @@ -0,0 +1,428 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateEndpointConnectionsClient is the azure Synapse Analytics Management Client +type PrivateEndpointConnectionsClient struct { + BaseClient +} + +// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create approve or reject a private endpoint connection. +// Parameters: +// request - request body of private endpoint connection to create. +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) Create(ctx context.Context, request PrivateEndpointConnection, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateEndpointConnectionsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, request, resourceGroupName, workspaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client PrivateEndpointConnectionsClient) CreatePreparer(ctx context.Context, request PrivateEndpointConnection, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) CreateSender(req *http.Request) (future PrivateEndpointConnectionsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future PrivateEndpointConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result OperationResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists private endpoint connection in workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace. +func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateEndpointConnectionListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List") + defer func() { + sc := -1 + if result.pecl.Response.Response != nil { + sc = result.pecl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateEndpointConnectionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pecl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.pecl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.pecl.hasNextLink() && result.pecl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/privateEndpointConnections", 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 PrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionList, err error) { + err = autorest.Respond( + resp, + 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 PrivateEndpointConnectionsClient) listNextResults(ctx context.Context, lastResults PrivateEndpointConnectionList) (result PrivateEndpointConnectionList, err error) { + req, err := lastResults.privateEndpointConnectionListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "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, "synapse.PrivateEndpointConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateEndpointConnectionListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnectionsprivatelinkhub.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnectionsprivatelinkhub.go new file mode 100644 index 000000000000..98ae3cb49a95 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privateendpointconnectionsprivatelinkhub.go @@ -0,0 +1,248 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateEndpointConnectionsPrivateLinkHubClient is the azure Synapse Analytics Management Client +type PrivateEndpointConnectionsPrivateLinkHubClient struct { + BaseClient +} + +// NewPrivateEndpointConnectionsPrivateLinkHubClient creates an instance of the +// PrivateEndpointConnectionsPrivateLinkHubClient client. +func NewPrivateEndpointConnectionsPrivateLinkHubClient(subscriptionID string) PrivateEndpointConnectionsPrivateLinkHubClient { + return NewPrivateEndpointConnectionsPrivateLinkHubClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateEndpointConnectionsPrivateLinkHubClientWithBaseURI creates an instance of the +// PrivateEndpointConnectionsPrivateLinkHubClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPrivateEndpointConnectionsPrivateLinkHubClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsPrivateLinkHubClient { + return PrivateEndpointConnectionsPrivateLinkHubClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get all PrivateEndpointConnection in the PrivateLinkHub by name +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - name of the privateLinkHub +// privateEndpointConnectionName - name of the privateEndpointConnection +func (client PrivateEndpointConnectionsPrivateLinkHubClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionForPrivateLinkHub, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsPrivateLinkHubClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, privateLinkHubName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsPrivateLinkHubClient) GetPreparer(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsPrivateLinkHubClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsPrivateLinkHubClient) GetResponder(resp *http.Response) (result PrivateEndpointConnectionForPrivateLinkHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all PrivateEndpointConnections in the PrivateLinkHub +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - name of the privateLinkHub +func (client PrivateEndpointConnectionsPrivateLinkHubClient) List(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsPrivateLinkHubClient.List") + defer func() { + sc := -1 + if result.pecfplhrcr.Response.Response != nil { + sc = result.pecfplhrcr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, privateLinkHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pecfplhrcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "List", resp, "Failure sending request") + return + } + + result.pecfplhrcr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "List", resp, "Failure responding to request") + return + } + if result.pecfplhrcr.hasNextLink() && result.pecfplhrcr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateEndpointConnectionsPrivateLinkHubClient) ListPreparer(ctx context.Context, resourceGroupName string, privateLinkHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections", 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 PrivateEndpointConnectionsPrivateLinkHubClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsPrivateLinkHubClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, err error) { + err = autorest.Respond( + resp, + 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 PrivateEndpointConnectionsPrivateLinkHubClient) listNextResults(ctx context.Context, lastResults PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (result PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, err error) { + req, err := lastResults.privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "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, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsPrivateLinkHubClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointConnectionsPrivateLinkHubClient) ListComplete(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsPrivateLinkHubClient.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, privateLinkHubName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubprivatelinkresources.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubprivatelinkresources.go new file mode 100644 index 000000000000..09fb9245fa52 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubprivatelinkresources.go @@ -0,0 +1,248 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateLinkHubPrivateLinkResourcesClient is the azure Synapse Analytics Management Client +type PrivateLinkHubPrivateLinkResourcesClient struct { + BaseClient +} + +// NewPrivateLinkHubPrivateLinkResourcesClient creates an instance of the PrivateLinkHubPrivateLinkResourcesClient +// client. +func NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID string) PrivateLinkHubPrivateLinkResourcesClient { + return NewPrivateLinkHubPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateLinkHubPrivateLinkResourcesClientWithBaseURI creates an instance of the +// PrivateLinkHubPrivateLinkResourcesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPrivateLinkHubPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkHubPrivateLinkResourcesClient { + return PrivateLinkHubPrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get private link resource in private link hub +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - the name of the private link hub +// privateLinkResourceName - the name of the private link resource +func (client PrivateLinkHubPrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkResourceName string) (result PrivateLinkResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubPrivateLinkResourcesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubPrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, privateLinkHubName, privateLinkResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkHubPrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "privateLinkResourceName": autorest.Encode("path", privateLinkResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources/{privateLinkResourceName}", 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 PrivateLinkHubPrivateLinkResourcesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubPrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all private link resources for a private link hub +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - the name of the private link hub +func (client PrivateLinkHubPrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result PrivateLinkResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubPrivateLinkResourcesClient.List") + defer func() { + sc := -1 + if result.plrlr.Response.Response != nil { + sc = result.plrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubPrivateLinkResourcesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, privateLinkHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "List", resp, "Failure sending request") + return + } + + result.plrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "List", resp, "Failure responding to request") + return + } + if result.plrlr.hasNextLink() && result.plrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateLinkHubPrivateLinkResourcesClient) ListPreparer(ctx context.Context, resourceGroupName string, privateLinkHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources", 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 PrivateLinkHubPrivateLinkResourcesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubPrivateLinkResourcesClient) ListResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateLinkHubPrivateLinkResourcesClient) listNextResults(ctx context.Context, lastResults PrivateLinkResourceListResult) (result PrivateLinkResourceListResult, err error) { + req, err := lastResults.privateLinkResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "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, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubPrivateLinkResourcesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkHubPrivateLinkResourcesClient) ListComplete(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result PrivateLinkResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubPrivateLinkResourcesClient.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, privateLinkHubName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubs.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubs.go new file mode 100644 index 000000000000..0ef23902b95c --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkhubs.go @@ -0,0 +1,623 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateLinkHubsClient is the azure Synapse Analytics Management Client +type PrivateLinkHubsClient struct { + BaseClient +} + +// NewPrivateLinkHubsClient creates an instance of the PrivateLinkHubsClient client. +func NewPrivateLinkHubsClient(subscriptionID string) PrivateLinkHubsClient { + return NewPrivateLinkHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateLinkHubsClientWithBaseURI creates an instance of the PrivateLinkHubsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPrivateLinkHubsClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkHubsClient { + return PrivateLinkHubsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a privateLinkHub +// Parameters: +// privateLinkHubInfo - privateLinkHub create or update request properties +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - name of the privateLinkHub +func (client PrivateLinkHubsClient) CreateOrUpdate(ctx context.Context, privateLinkHubInfo PrivateLinkHub, resourceGroupName string, privateLinkHubName string) (result PrivateLinkHub, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, privateLinkHubInfo, resourceGroupName, privateLinkHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateLinkHubsClient) CreateOrUpdatePreparer(ctx context.Context, privateLinkHubInfo PrivateLinkHub, resourceGroupName string, privateLinkHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}", pathParameters), + autorest.WithJSON(privateLinkHubInfo), + 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 PrivateLinkHubsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateLinkHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a privateLinkHub +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - name of the privateLinkHub +func (client PrivateLinkHubsClient) Delete(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result PrivateLinkHubsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, privateLinkHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateLinkHubsClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateLinkHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}", 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 PrivateLinkHubsClient) DeleteSender(req *http.Request) (future PrivateLinkHubsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a privateLinkHub +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - name of the privateLinkHub +func (client PrivateLinkHubsClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result PrivateLinkHub, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, privateLinkHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkHubsClient) GetPreparer(ctx context.Context, resourceGroupName string, privateLinkHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}", 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 PrivateLinkHubsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubsClient) GetResponder(resp *http.Response) (result PrivateLinkHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns a list of privateLinkHubs in a subscription +func (client PrivateLinkHubsClient) List(ctx context.Context) (result PrivateLinkHubInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.List") + defer func() { + sc := -1 + if result.plhilr.Response.Response != nil { + sc = result.plhilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plhilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "List", resp, "Failure sending request") + return + } + + result.plhilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "List", resp, "Failure responding to request") + return + } + if result.plhilr.hasNextLink() && result.plhilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateLinkHubsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/privateLinkHubs", 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 PrivateLinkHubsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubsClient) ListResponder(resp *http.Response) (result PrivateLinkHubInfoListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateLinkHubsClient) listNextResults(ctx context.Context, lastResults PrivateLinkHubInfoListResult) (result PrivateLinkHubInfoListResult, err error) { + req, err := lastResults.privateLinkHubInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "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, "synapse.PrivateLinkHubsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkHubsClient) ListComplete(ctx context.Context) (result PrivateLinkHubInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.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 returns a list of privateLinkHubs in a resource group +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +func (client PrivateLinkHubsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result PrivateLinkHubInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.plhilr.Response.Response != nil { + sc = result.plhilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.plhilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.plhilr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.plhilr.hasNextLink() && result.plhilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client PrivateLinkHubsClient) 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 = "2021-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.Synapse/privateLinkHubs", 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 PrivateLinkHubsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubsClient) ListByResourceGroupResponder(resp *http.Response) (result PrivateLinkHubInfoListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateLinkHubsClient) listByResourceGroupNextResults(ctx context.Context, lastResults PrivateLinkHubInfoListResult) (result PrivateLinkHubInfoListResult, err error) { + req, err := lastResults.privateLinkHubInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "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, "synapse.PrivateLinkHubsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkHubsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result PrivateLinkHubInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.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 a privateLinkHub +// Parameters: +// privateLinkHubPatchInfo - privateLinkHub patch request properties +// resourceGroupName - the name of the resource group. The name is case insensitive. +// privateLinkHubName - name of the privateLinkHub +func (client PrivateLinkHubsClient) Update(ctx context.Context, privateLinkHubPatchInfo PrivateLinkHubPatchInfo, resourceGroupName string, privateLinkHubName string) (result PrivateLinkHub, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkHubsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, privateLinkHubPatchInfo, resourceGroupName, privateLinkHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client PrivateLinkHubsClient) UpdatePreparer(ctx context.Context, privateLinkHubPatchInfo PrivateLinkHubPatchInfo, resourceGroupName string, privateLinkHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkHubName": autorest.Encode("path", privateLinkHubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-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.Synapse/privateLinkHubs/{privateLinkHubName}", pathParameters), + autorest.WithJSON(privateLinkHubPatchInfo), + 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 PrivateLinkHubsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client PrivateLinkHubsClient) UpdateResponder(resp *http.Response) (result PrivateLinkHub, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkresources.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkresources.go new file mode 100644 index 000000000000..b6b639793938 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/privatelinkresources.go @@ -0,0 +1,247 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateLinkResourcesClient is the azure Synapse Analytics Management Client +type PrivateLinkResourcesClient struct { + BaseClient +} + +// NewPrivateLinkResourcesClient creates an instance of the PrivateLinkResourcesClient client. +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get private link resource in workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// privateLinkResourceName - the name of the private link resource +func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateLinkResourceName string) (result PrivateLinkResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, privateLinkResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, privateLinkResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateLinkResourceName": autorest.Encode("path", privateLinkResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/privateLinkResources/{privateLinkResourceName}", 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 PrivateLinkResourcesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all private link resources for a workspaces +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateLinkResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.List") + defer func() { + sc := -1 + if result.plrlr.Response.Response != nil { + sc = result.plrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.PrivateLinkResourcesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "List", resp, "Failure sending request") + return + } + + result.plrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "List", resp, "Failure responding to request") + return + } + if result.plrlr.hasNextLink() && result.plrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateLinkResourcesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/privateLinkResources", 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 PrivateLinkResourcesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + 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 PrivateLinkResourcesClient) listNextResults(ctx context.Context, lastResults PrivateLinkResourceListResult) (result PrivateLinkResourceListResult, err error) { + req, err := lastResults.privateLinkResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "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, "synapse.PrivateLinkResourcesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.PrivateLinkResourcesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkResourcesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateLinkResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/restorabledroppedsqlpools.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/restorabledroppedsqlpools.go new file mode 100644 index 000000000000..3eb744474191 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/restorabledroppedsqlpools.go @@ -0,0 +1,206 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// RestorableDroppedSQLPoolsClient is the azure Synapse Analytics Management Client +type RestorableDroppedSQLPoolsClient struct { + BaseClient +} + +// NewRestorableDroppedSQLPoolsClient creates an instance of the RestorableDroppedSQLPoolsClient client. +func NewRestorableDroppedSQLPoolsClient(subscriptionID string) RestorableDroppedSQLPoolsClient { + return NewRestorableDroppedSQLPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestorableDroppedSQLPoolsClientWithBaseURI creates an instance of the RestorableDroppedSQLPoolsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewRestorableDroppedSQLPoolsClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedSQLPoolsClient { + return RestorableDroppedSQLPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a deleted sql pool that can be restored +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// restorableDroppedSQLPoolID - the id of the deleted Sql Pool in the form of +// sqlPoolName,deletionTimeInFileTimeFormat +func (client RestorableDroppedSQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, restorableDroppedSQLPoolID string) (result RestorableDroppedSQLPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedSQLPoolsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.RestorableDroppedSQLPoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, restorableDroppedSQLPoolID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.RestorableDroppedSQLPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.RestorableDroppedSQLPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.RestorableDroppedSQLPoolsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RestorableDroppedSQLPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, restorableDroppedSQLPoolID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorableDroppedSqlPoolId": autorest.Encode("path", restorableDroppedSQLPoolID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/restorableDroppedSqlPools/{restorableDroppedSqlPoolId}", 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 RestorableDroppedSQLPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RestorableDroppedSQLPoolsClient) GetResponder(resp *http.Response) (result RestorableDroppedSQLPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace gets a list of deleted Sql pools that can be restored +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client RestorableDroppedSQLPoolsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result RestorableDroppedSQLPoolListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestorableDroppedSQLPoolsClient.ListByWorkspace") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.RestorableDroppedSQLPoolsClient", "ListByWorkspace", err.Error()) + } + + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.RestorableDroppedSQLPoolsClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.RestorableDroppedSQLPoolsClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.RestorableDroppedSQLPoolsClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client RestorableDroppedSQLPoolsClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/restorableDroppedSqlPools", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client RestorableDroppedSQLPoolsClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client RestorableDroppedSQLPoolsClient) ListByWorkspaceResponder(resp *http.Response) (result RestorableDroppedSQLPoolListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfiguration.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfiguration.go new file mode 100644 index 000000000000..a4a9c8b94bdb --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfiguration.go @@ -0,0 +1,120 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SparkConfigurationClient is the azure Synapse Analytics Management Client +type SparkConfigurationClient struct { + BaseClient +} + +// NewSparkConfigurationClient creates an instance of the SparkConfigurationClient client. +func NewSparkConfigurationClient(subscriptionID string) SparkConfigurationClient { + return NewSparkConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSparkConfigurationClientWithBaseURI creates an instance of the SparkConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSparkConfigurationClientWithBaseURI(baseURI string, subscriptionID string) SparkConfigurationClient { + return SparkConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get SparkConfiguration by name in a workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// sparkConfigurationName - sparkConfiguration name +// workspaceName - the name of the workspace +func (client SparkConfigurationClient) Get(ctx context.Context, resourceGroupName string, sparkConfigurationName string, workspaceName string) (result SparkConfigurationResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SparkConfigurationClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, sparkConfigurationName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SparkConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, sparkConfigurationName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sparkConfigurationName": autorest.Encode("path", sparkConfigurationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sparkconfigurations/{sparkConfigurationName}", 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 SparkConfigurationClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SparkConfigurationClient) GetResponder(resp *http.Response) (result SparkConfigurationResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfigurations.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfigurations.go new file mode 100644 index 000000000000..40b58aaf9071 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sparkconfigurations.go @@ -0,0 +1,160 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SparkConfigurationsClient is the azure Synapse Analytics Management Client +type SparkConfigurationsClient struct { + BaseClient +} + +// NewSparkConfigurationsClient creates an instance of the SparkConfigurationsClient client. +func NewSparkConfigurationsClient(subscriptionID string) SparkConfigurationsClient { + return NewSparkConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSparkConfigurationsClientWithBaseURI creates an instance of the SparkConfigurationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSparkConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SparkConfigurationsClient { + return SparkConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByWorkspace list sparkConfigurations in a workspace. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client SparkConfigurationsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result SparkConfigurationListResponsePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationsClient.ListByWorkspace") + defer func() { + sc := -1 + if result.sclr.Response.Response != nil { + sc = result.sclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SparkConfigurationsClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationsClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.sclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationsClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.sclr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationsClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.sclr.hasNextLink() && result.sclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client SparkConfigurationsClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sparkconfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client SparkConfigurationsClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client SparkConfigurationsClient) ListByWorkspaceResponder(resp *http.Response) (result SparkConfigurationListResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client SparkConfigurationsClient) listByWorkspaceNextResults(ctx context.Context, lastResults SparkConfigurationListResponse) (result SparkConfigurationListResponse, err error) { + req, err := lastResults.sparkConfigurationListResponsePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SparkConfigurationsClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SparkConfigurationsClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SparkConfigurationsClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client SparkConfigurationsClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result SparkConfigurationListResponseIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationsClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolblobauditingpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolblobauditingpolicies.go new file mode 100644 index 000000000000..b274ec883a32 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolblobauditingpolicies.go @@ -0,0 +1,342 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolBlobAuditingPoliciesClient is the azure Synapse Analytics Management Client +type SQLPoolBlobAuditingPoliciesClient struct { + BaseClient +} + +// NewSQLPoolBlobAuditingPoliciesClient creates an instance of the SQLPoolBlobAuditingPoliciesClient client. +func NewSQLPoolBlobAuditingPoliciesClient(subscriptionID string) SQLPoolBlobAuditingPoliciesClient { + return NewSQLPoolBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolBlobAuditingPoliciesClientWithBaseURI creates an instance of the SQLPoolBlobAuditingPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolBlobAuditingPoliciesClient { + return SQLPoolBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a SQL pool's blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the database blob auditing policy. +func (client SQLPoolBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SQLPoolBlobAuditingPolicy) (result SQLPoolBlobAuditingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SQLPoolBlobAuditingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Kind = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}", 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 SQLPoolBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result SQLPoolBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a SQL pool's blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolBlobAuditingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolBlobAuditingPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}", 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 SQLPoolBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result SQLPoolBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySQLPool lists auditing settings of a Sql pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolBlobAuditingPoliciesClient) ListBySQLPool(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolBlobAuditingPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPoliciesClient.ListBySQLPool") + defer func() { + sc := -1 + if result.spbaplr.Response.Response != nil { + sc = result.spbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", err.Error()) + } + + result.fn = client.listBySQLPoolNextResults + req, err := client.ListBySQLPoolPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySQLPoolSender(req) + if err != nil { + result.spbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", resp, "Failure sending request") + return + } + + result.spbaplr, err = client.ListBySQLPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "ListBySQLPool", resp, "Failure responding to request") + return + } + if result.spbaplr.hasNextLink() && result.spbaplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySQLPoolPreparer prepares the ListBySQLPool request. +func (client SQLPoolBlobAuditingPoliciesClient) ListBySQLPoolPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySQLPoolSender sends the ListBySQLPool request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolBlobAuditingPoliciesClient) ListBySQLPoolSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySQLPoolResponder handles the response to the ListBySQLPool request. The method always +// closes the http.Response Body. +func (client SQLPoolBlobAuditingPoliciesClient) ListBySQLPoolResponder(resp *http.Response) (result SQLPoolBlobAuditingPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySQLPoolNextResults retrieves the next set of results, if any. +func (client SQLPoolBlobAuditingPoliciesClient) listBySQLPoolNextResults(ctx context.Context, lastResults SQLPoolBlobAuditingPolicyListResult) (result SQLPoolBlobAuditingPolicyListResult, err error) { + req, err := lastResults.sQLPoolBlobAuditingPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "listBySQLPoolNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySQLPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "listBySQLPoolNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySQLPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolBlobAuditingPoliciesClient", "listBySQLPoolNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySQLPoolComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolBlobAuditingPoliciesClient) ListBySQLPoolComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolBlobAuditingPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPoliciesClient.ListBySQLPool") + 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.ListBySQLPool(ctx, resourceGroupName, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolcolumns.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolcolumns.go new file mode 100644 index 000000000000..702d8f0e82f1 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolcolumns.go @@ -0,0 +1,125 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolColumnsClient is the azure Synapse Analytics Management Client +type SQLPoolColumnsClient struct { + BaseClient +} + +// NewSQLPoolColumnsClient creates an instance of the SQLPoolColumnsClient client. +func NewSQLPoolColumnsClient(subscriptionID string) SQLPoolColumnsClient { + return NewSQLPoolColumnsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolColumnsClientWithBaseURI creates an instance of the SQLPoolColumnsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolColumnsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolColumnsClient { + return SQLPoolColumnsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get Sql pool column +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// columnName - the name of the column. +func (client SQLPoolColumnsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result SQLPoolColumn, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolColumnsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, columnName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolColumnsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolColumnsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolColumnsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolColumnsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "columnName": autorest.Encode("path", columnName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}", 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 SQLPoolColumnsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolColumnsClient) GetResponder(resp *http.Response) (result SQLPoolColumn, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolconnectionpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolconnectionpolicies.go new file mode 100644 index 000000000000..3ffd3e1d2b4a --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolconnectionpolicies.go @@ -0,0 +1,121 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolConnectionPoliciesClient is the azure Synapse Analytics Management Client +type SQLPoolConnectionPoliciesClient struct { + BaseClient +} + +// NewSQLPoolConnectionPoliciesClient creates an instance of the SQLPoolConnectionPoliciesClient client. +func NewSQLPoolConnectionPoliciesClient(subscriptionID string) SQLPoolConnectionPoliciesClient { + return NewSQLPoolConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolConnectionPoliciesClientWithBaseURI creates an instance of the SQLPoolConnectionPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolConnectionPoliciesClient { + return SQLPoolConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a Sql pool's connection policy, which is used with table auditing. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolConnectionPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolConnectionPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolConnectionPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolConnectionPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolConnectionPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolConnectionPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolConnectionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/connectionPolicies/{connectionPolicyName}", 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 SQLPoolConnectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolConnectionPoliciesClient) GetResponder(resp *http.Response) (result SQLPoolConnectionPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooldatawarehouseuseractivities.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooldatawarehouseuseractivities.go new file mode 100644 index 000000000000..b786e5ba5556 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooldatawarehouseuseractivities.go @@ -0,0 +1,122 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolDataWarehouseUserActivitiesClient is the azure Synapse Analytics Management Client +type SQLPoolDataWarehouseUserActivitiesClient struct { + BaseClient +} + +// NewSQLPoolDataWarehouseUserActivitiesClient creates an instance of the SQLPoolDataWarehouseUserActivitiesClient +// client. +func NewSQLPoolDataWarehouseUserActivitiesClient(subscriptionID string) SQLPoolDataWarehouseUserActivitiesClient { + return NewSQLPoolDataWarehouseUserActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolDataWarehouseUserActivitiesClientWithBaseURI creates an instance of the +// SQLPoolDataWarehouseUserActivitiesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolDataWarehouseUserActivitiesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolDataWarehouseUserActivitiesClient { + return SQLPoolDataWarehouseUserActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the user activities of a SQL pool which includes running and suspended queries +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolDataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result DataWarehouseUserActivities, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolDataWarehouseUserActivitiesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolDataWarehouseUserActivitiesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolDataWarehouseUserActivitiesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolDataWarehouseUserActivitiesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolDataWarehouseUserActivitiesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolDataWarehouseUserActivitiesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "dataWarehouseUserActivityName": autorest.Encode("path", "current"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}", 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 SQLPoolDataWarehouseUserActivitiesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolDataWarehouseUserActivitiesClient) GetResponder(resp *http.Response) (result DataWarehouseUserActivities, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolgeobackuppolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolgeobackuppolicies.go new file mode 100644 index 000000000000..971258236ce2 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolgeobackuppolicies.go @@ -0,0 +1,303 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolGeoBackupPoliciesClient is the azure Synapse Analytics Management Client +type SQLPoolGeoBackupPoliciesClient struct { + BaseClient +} + +// NewSQLPoolGeoBackupPoliciesClient creates an instance of the SQLPoolGeoBackupPoliciesClient client. +func NewSQLPoolGeoBackupPoliciesClient(subscriptionID string) SQLPoolGeoBackupPoliciesClient { + return NewSQLPoolGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolGeoBackupPoliciesClientWithBaseURI creates an instance of the SQLPoolGeoBackupPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolGeoBackupPoliciesClient { + return SQLPoolGeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate updates a SQL Pool geo backup policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the required parameters for creating or updating the geo backup policy. +func (client SQLPoolGeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters GeoBackupPolicy) (result GeoBackupPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolGeoBackupPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.GeoBackupPolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolGeoBackupPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolGeoBackupPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters GeoBackupPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "geoBackupPolicyName": autorest.Encode("path", "Default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Kind = nil + parameters.Location = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}", 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 SQLPoolGeoBackupPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolGeoBackupPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result GeoBackupPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get the specified SQL pool geo backup policy +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolGeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result GeoBackupPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolGeoBackupPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolGeoBackupPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolGeoBackupPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "geoBackupPolicyName": autorest.Encode("path", "Default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}", 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 SQLPoolGeoBackupPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolGeoBackupPoliciesClient) GetResponder(resp *http.Response) (result GeoBackupPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get list of SQL pool geo backup policies +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolGeoBackupPoliciesClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result GeoBackupPolicyListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolGeoBackupPoliciesClient.List") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolGeoBackupPoliciesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolGeoBackupPoliciesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolGeoBackupPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies", 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 SQLPoolGeoBackupPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolGeoBackupPoliciesClient) ListResponder(resp *http.Response) (result GeoBackupPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindowoptions.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindowoptions.go new file mode 100644 index 000000000000..7092028a8f9c --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindowoptions.go @@ -0,0 +1,122 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolMaintenanceWindowOptionsClient is the azure Synapse Analytics Management Client +type SQLPoolMaintenanceWindowOptionsClient struct { + BaseClient +} + +// NewSQLPoolMaintenanceWindowOptionsClient creates an instance of the SQLPoolMaintenanceWindowOptionsClient client. +func NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID string) SQLPoolMaintenanceWindowOptionsClient { + return NewSQLPoolMaintenanceWindowOptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolMaintenanceWindowOptionsClientWithBaseURI creates an instance of the SQLPoolMaintenanceWindowOptionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewSQLPoolMaintenanceWindowOptionsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolMaintenanceWindowOptionsClient { + return SQLPoolMaintenanceWindowOptionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get list of SQL pool's available maintenance windows. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// maintenanceWindowOptionsName - maintenance window options name. +func (client SQLPoolMaintenanceWindowOptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowOptionsName string) (result MaintenanceWindowOptions, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolMaintenanceWindowOptionsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolMaintenanceWindowOptionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, maintenanceWindowOptionsName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowOptionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowOptionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowOptionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolMaintenanceWindowOptionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowOptionsName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "maintenanceWindowOptionsName": autorest.Encode("query", maintenanceWindowOptionsName), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenanceWindowOptions/current", 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 SQLPoolMaintenanceWindowOptionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolMaintenanceWindowOptionsClient) GetResponder(resp *http.Response) (result MaintenanceWindowOptions, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindows.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindows.go new file mode 100644 index 000000000000..0ab66ab95a66 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmaintenancewindows.go @@ -0,0 +1,213 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolMaintenanceWindowsClient is the azure Synapse Analytics Management Client +type SQLPoolMaintenanceWindowsClient struct { + BaseClient +} + +// NewSQLPoolMaintenanceWindowsClient creates an instance of the SQLPoolMaintenanceWindowsClient client. +func NewSQLPoolMaintenanceWindowsClient(subscriptionID string) SQLPoolMaintenanceWindowsClient { + return NewSQLPoolMaintenanceWindowsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolMaintenanceWindowsClientWithBaseURI creates an instance of the SQLPoolMaintenanceWindowsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolMaintenanceWindowsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolMaintenanceWindowsClient { + return SQLPoolMaintenanceWindowsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Sql pool's maintenance windows settings. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// maintenanceWindowName - maintenance window name. +// parameters - the required parameters for creating or updating Maintenance Windows settings +func (client SQLPoolMaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowName string, parameters MaintenanceWindows) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolMaintenanceWindowsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolMaintenanceWindowsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, maintenanceWindowName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolMaintenanceWindowsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowName string, parameters MaintenanceWindows) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "maintenanceWindowName": autorest.Encode("query", maintenanceWindowName), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current", 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 SQLPoolMaintenanceWindowsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolMaintenanceWindowsClient) CreateOrUpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a SQL pool's Maintenance Windows. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// maintenanceWindowName - maintenance window name. +func (client SQLPoolMaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowName string) (result MaintenanceWindows, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolMaintenanceWindowsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolMaintenanceWindowsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, maintenanceWindowName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMaintenanceWindowsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolMaintenanceWindowsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "maintenanceWindowName": autorest.Encode("query", maintenanceWindowName), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current", 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 SQLPoolMaintenanceWindowsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolMaintenanceWindowsClient) GetResponder(resp *http.Response) (result MaintenanceWindows, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmetadatasyncconfigs.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmetadatasyncconfigs.go new file mode 100644 index 000000000000..bb96a97a39d5 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolmetadatasyncconfigs.go @@ -0,0 +1,210 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolMetadataSyncConfigsClient is the azure Synapse Analytics Management Client +type SQLPoolMetadataSyncConfigsClient struct { + BaseClient +} + +// NewSQLPoolMetadataSyncConfigsClient creates an instance of the SQLPoolMetadataSyncConfigsClient client. +func NewSQLPoolMetadataSyncConfigsClient(subscriptionID string) SQLPoolMetadataSyncConfigsClient { + return NewSQLPoolMetadataSyncConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolMetadataSyncConfigsClientWithBaseURI creates an instance of the SQLPoolMetadataSyncConfigsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolMetadataSyncConfigsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolMetadataSyncConfigsClient { + return SQLPoolMetadataSyncConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create set the metadata sync configuration for a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// metadataSyncConfiguration - metadata sync configuration +func (client SQLPoolMetadataSyncConfigsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, metadataSyncConfiguration MetadataSyncConfig) (result MetadataSyncConfig, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolMetadataSyncConfigsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolMetadataSyncConfigsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, metadataSyncConfiguration) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMetadataSyncConfigsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMetadataSyncConfigsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMetadataSyncConfigsClient", "Create", resp, "Failure responding to request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SQLPoolMetadataSyncConfigsClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, metadataSyncConfiguration MetadataSyncConfig) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config", pathParameters), + autorest.WithJSON(metadataSyncConfiguration), + 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 SQLPoolMetadataSyncConfigsClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SQLPoolMetadataSyncConfigsClient) CreateResponder(resp *http.Response) (result MetadataSyncConfig, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get the metadata sync configuration for a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolMetadataSyncConfigsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result MetadataSyncConfig, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolMetadataSyncConfigsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolMetadataSyncConfigsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMetadataSyncConfigsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMetadataSyncConfigsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolMetadataSyncConfigsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolMetadataSyncConfigsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config", 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 SQLPoolMetadataSyncConfigsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolMetadataSyncConfigsClient) GetResponder(resp *http.Response) (result MetadataSyncConfig, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperationresults.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperationresults.go new file mode 100644 index 000000000000..24fb4da62503 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperationresults.go @@ -0,0 +1,122 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolOperationResultsClient is the azure Synapse Analytics Management Client +type SQLPoolOperationResultsClient struct { + BaseClient +} + +// NewSQLPoolOperationResultsClient creates an instance of the SQLPoolOperationResultsClient client. +func NewSQLPoolOperationResultsClient(subscriptionID string) SQLPoolOperationResultsClient { + return NewSQLPoolOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolOperationResultsClientWithBaseURI creates an instance of the SQLPoolOperationResultsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewSQLPoolOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolOperationResultsClient { + return SQLPoolOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetLocationHeaderResult get the status of a SQL pool operation +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// operationID - operation ID +func (client SQLPoolOperationResultsClient) GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, operationID string) (result SetObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolOperationResultsClient.GetLocationHeaderResult") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolOperationResultsClient", "GetLocationHeaderResult", err.Error()) + } + + req, err := client.GetLocationHeaderResultPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationResultsClient", "GetLocationHeaderResult", nil, "Failure preparing request") + return + } + + resp, err := client.GetLocationHeaderResultSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationResultsClient", "GetLocationHeaderResult", resp, "Failure sending request") + return + } + + result, err = client.GetLocationHeaderResultResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationResultsClient", "GetLocationHeaderResult", resp, "Failure responding to request") + return + } + + return +} + +// GetLocationHeaderResultPreparer prepares the GetLocationHeaderResult request. +func (client SQLPoolOperationResultsClient) GetLocationHeaderResultPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/operationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetLocationHeaderResultSender sends the GetLocationHeaderResult request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolOperationResultsClient) GetLocationHeaderResultSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetLocationHeaderResultResponder handles the response to the GetLocationHeaderResult request. The method always +// closes the http.Response Body. +func (client SQLPoolOperationResultsClient) GetLocationHeaderResultResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperations.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperations.go new file mode 100644 index 000000000000..979006b753d0 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooloperations.go @@ -0,0 +1,162 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolOperationsClient is the azure Synapse Analytics Management Client +type SQLPoolOperationsClient struct { + BaseClient +} + +// NewSQLPoolOperationsClient creates an instance of the SQLPoolOperationsClient client. +func NewSQLPoolOperationsClient(subscriptionID string) SQLPoolOperationsClient { + return NewSQLPoolOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolOperationsClientWithBaseURI creates an instance of the SQLPoolOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSQLPoolOperationsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolOperationsClient { + return SQLPoolOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of operations performed on the SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolOperationsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolOperationsClient.List") + defer func() { + sc := -1 + if result.spbapspolr.Response.Response != nil { + sc = result.spbapspolr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolOperationsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.spbapspolr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationsClient", "List", resp, "Failure sending request") + return + } + + result.spbapspolr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationsClient", "List", resp, "Failure responding to request") + return + } + if result.spbapspolr.hasNextLink() && result.spbapspolr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolOperationsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolOperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolOperationsClient) ListResponder(resp *http.Response) (result SQLPoolBlobAuditingPolicySQLPoolOperationListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolOperationsClient) listNextResults(ctx context.Context, lastResults SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (result SQLPoolBlobAuditingPolicySQLPoolOperationListResult, err error) { + req, err := lastResults.sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolOperationsClient", "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, "synapse.SQLPoolOperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolOperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolOperationsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolOperationsClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrecommendedsensitivitylabels.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrecommendedsensitivitylabels.go new file mode 100644 index 000000000000..2230477b97a8 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrecommendedsensitivitylabels.go @@ -0,0 +1,122 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolRecommendedSensitivityLabelsClient is the azure Synapse Analytics Management Client +type SQLPoolRecommendedSensitivityLabelsClient struct { + BaseClient +} + +// NewSQLPoolRecommendedSensitivityLabelsClient creates an instance of the SQLPoolRecommendedSensitivityLabelsClient +// client. +func NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID string) SQLPoolRecommendedSensitivityLabelsClient { + return NewSQLPoolRecommendedSensitivityLabelsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolRecommendedSensitivityLabelsClientWithBaseURI creates an instance of the +// SQLPoolRecommendedSensitivityLabelsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolRecommendedSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolRecommendedSensitivityLabelsClient { + return SQLPoolRecommendedSensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Update update recommended sensitivity labels states of a given SQL Pool using an operations batch. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolRecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters RecommendedSensitivityLabelUpdateList) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolRecommendedSensitivityLabelsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolRecommendedSensitivityLabelsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRecommendedSensitivityLabelsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRecommendedSensitivityLabelsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRecommendedSensitivityLabelsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SQLPoolRecommendedSensitivityLabelsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters RecommendedSensitivityLabelUpdateList) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels", 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 SQLPoolRecommendedSensitivityLabelsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SQLPoolRecommendedSensitivityLabelsClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolreplicationlinks.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolreplicationlinks.go new file mode 100644 index 000000000000..8a190f06529b --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolreplicationlinks.go @@ -0,0 +1,251 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolReplicationLinksClient is the azure Synapse Analytics Management Client +type SQLPoolReplicationLinksClient struct { + BaseClient +} + +// NewSQLPoolReplicationLinksClient creates an instance of the SQLPoolReplicationLinksClient client. +func NewSQLPoolReplicationLinksClient(subscriptionID string) SQLPoolReplicationLinksClient { + return NewSQLPoolReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolReplicationLinksClientWithBaseURI creates an instance of the SQLPoolReplicationLinksClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewSQLPoolReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolReplicationLinksClient { + return SQLPoolReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetByName get SQL pool replication link by name. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// linkID - the ID of the replication link. +func (client SQLPoolReplicationLinksClient) GetByName(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, linkID string) (result ReplicationLink, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolReplicationLinksClient.GetByName") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolReplicationLinksClient", "GetByName", err.Error()) + } + + req, err := client.GetByNamePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, linkID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "GetByName", nil, "Failure preparing request") + return + } + + resp, err := client.GetByNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "GetByName", resp, "Failure sending request") + return + } + + result, err = client.GetByNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "GetByName", resp, "Failure responding to request") + return + } + + return +} + +// GetByNamePreparer prepares the GetByName request. +func (client SQLPoolReplicationLinksClient) GetByNamePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, linkID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "linkId": autorest.Encode("path", linkID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks/{linkId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetByNameSender sends the GetByName request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolReplicationLinksClient) GetByNameSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetByNameResponder handles the response to the GetByName request. The method always +// closes the http.Response Body. +func (client SQLPoolReplicationLinksClient) GetByNameResponder(resp *http.Response) (result ReplicationLink, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists a Sql pool's replication links. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolReplicationLinksClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ReplicationLinkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolReplicationLinksClient.List") + defer func() { + sc := -1 + if result.rllr.Response.Response != nil { + sc = result.rllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolReplicationLinksClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "List", resp, "Failure sending request") + return + } + + result.rllr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "List", resp, "Failure responding to request") + return + } + if result.rllr.hasNextLink() && result.rllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolReplicationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks", 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 SQLPoolReplicationLinksClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolReplicationLinksClient) ListResponder(resp *http.Response) (result ReplicationLinkListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolReplicationLinksClient) listNextResults(ctx context.Context, lastResults ReplicationLinkListResult) (result ReplicationLinkListResult, err error) { + req, err := lastResults.replicationLinkListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "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, "synapse.SQLPoolReplicationLinksClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolReplicationLinksClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolReplicationLinksClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ReplicationLinkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolReplicationLinksClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrestorepoints.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrestorepoints.go new file mode 100644 index 000000000000..83c265cb5fb2 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolrestorepoints.go @@ -0,0 +1,433 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolRestorePointsClient is the azure Synapse Analytics Management Client +type SQLPoolRestorePointsClient struct { + BaseClient +} + +// NewSQLPoolRestorePointsClient creates an instance of the SQLPoolRestorePointsClient client. +func NewSQLPoolRestorePointsClient(subscriptionID string) SQLPoolRestorePointsClient { + return NewSQLPoolRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolRestorePointsClientWithBaseURI creates an instance of the SQLPoolRestorePointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSQLPoolRestorePointsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolRestorePointsClient { + return SQLPoolRestorePointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a restore point for a data warehouse. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the definition for creating the restore point of this Sql pool. +func (client SQLPoolRestorePointsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters CreateSQLPoolRestorePointDefinition) (result SQLPoolRestorePointsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolRestorePointsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.RestorePointLabel", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolRestorePointsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SQLPoolRestorePointsClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters CreateSQLPoolRestorePointDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints", pathParameters), + autorest.WithJSON(parameters), + 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 SQLPoolRestorePointsClient) CreateSender(req *http.Request) (future SQLPoolRestorePointsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SQLPoolRestorePointsClient) CreateResponder(resp *http.Response) (result RestorePoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a restore point. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// restorePointName - the name of the restore point. +func (client SQLPoolRestorePointsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, restorePointName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolRestorePointsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolRestorePointsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, restorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolRestorePointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, restorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointName": autorest.Encode("path", restorePointName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}", 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 SQLPoolRestorePointsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolRestorePointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a restore point. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// restorePointName - the name of the restore point. +func (client SQLPoolRestorePointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, restorePointName string) (result RestorePoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolRestorePointsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolRestorePointsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, restorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolRestorePointsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, restorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointName": autorest.Encode("path", restorePointName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}", 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 SQLPoolRestorePointsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolRestorePointsClient) GetResponder(resp *http.Response) (result RestorePoint, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get SQL pool backup information +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolRestorePointsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result RestorePointListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolRestorePointsClient.List") + defer func() { + sc := -1 + if result.rplr.Response.Response != nil { + sc = result.rplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolRestorePointsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "List", resp, "Failure sending request") + return + } + + result.rplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "List", resp, "Failure responding to request") + return + } + if result.rplr.hasNextLink() && result.rplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolRestorePointsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints", 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 SQLPoolRestorePointsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolRestorePointsClient) ListResponder(resp *http.Response) (result RestorePointListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolRestorePointsClient) listNextResults(ctx context.Context, lastResults RestorePointListResult) (result RestorePointListResult, err error) { + req, err := lastResults.restorePointListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "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, "synapse.SQLPoolRestorePointsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolRestorePointsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result RestorePointListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolRestorePointsClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpools.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpools.go new file mode 100644 index 000000000000..5c1e596615b9 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpools.go @@ -0,0 +1,786 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolsClient is the azure Synapse Analytics Management Client +type SQLPoolsClient struct { + BaseClient +} + +// NewSQLPoolsClient creates an instance of the SQLPoolsClient client. +func NewSQLPoolsClient(subscriptionID string) SQLPoolsClient { + return NewSQLPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolsClientWithBaseURI creates an instance of the SQLPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolsClient { + return SQLPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create create a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// SQLPoolInfo - the SQL pool to create +func (client SQLPoolsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, SQLPoolInfo SQLPool) (result SQLPoolsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.Create") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, SQLPoolInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Create", nil, "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SQLPoolsClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, SQLPoolInfo SQLPool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}", pathParameters), + autorest.WithJSON(SQLPoolInfo), + 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 SQLPoolsClient) CreateSender(req *http.Request) (future SQLPoolsCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) CreateResponder(resp *http.Response) (result SQLPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}", 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 SQLPoolsClient) DeleteSender(req *http.Request) (future SQLPoolsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get SQL pool properties +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}", 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 SQLPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) GetResponder(resp *http.Response) (result SQLPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace list all SQL pools +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client SQLPoolsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result SQLPoolInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.ListByWorkspace") + defer func() { + sc := -1 + if result.spilr.Response.Response != nil { + sc = result.spilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.spilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.spilr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.spilr.hasNextLink() && result.spilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client SQLPoolsClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolsClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) ListByWorkspaceResponder(resp *http.Response) (result SQLPoolInfoListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client SQLPoolsClient) listByWorkspaceNextResults(ctx context.Context, lastResults SQLPoolInfoListResult) (result SQLPoolInfoListResult, err error) { + req, err := lastResults.sQLPoolInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolsClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result SQLPoolInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} + +// Pause pause a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolsClient) Pause(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolsPauseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.Pause") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Pause", err.Error()) + } + + req, err := client.PausePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Pause", nil, "Failure preparing request") + return + } + + result, err = client.PauseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Pause", nil, "Failure sending request") + return + } + + return +} + +// PausePreparer prepares the Pause request. +func (client SQLPoolsClient) PausePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/pause", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PauseSender sends the Pause request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolsClient) PauseSender(req *http.Request) (future SQLPoolsPauseFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// PauseResponder handles the response to the Pause request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) PauseResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Rename rename a SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the resource move definition for renaming this Sql pool. +func (client SQLPoolsClient) Rename(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters ResourceMoveDefinition) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.Rename") + 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.MinLength, Rule: 1, 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}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Rename", err.Error()) + } + + req, err := client.RenamePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Rename", nil, "Failure preparing request") + return + } + + resp, err := client.RenameSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Rename", resp, "Failure sending request") + return + } + + result, err = client.RenameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Rename", resp, "Failure responding to request") + return + } + + return +} + +// RenamePreparer prepares the Rename request. +func (client SQLPoolsClient) RenamePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters ResourceMoveDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/move", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RenameSender sends the Rename request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolsClient) RenameSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RenameResponder handles the response to the Rename request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) RenameResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Resume resume a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolsClient) Resume(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolsResumeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.Resume") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Resume", err.Error()) + } + + req, err := client.ResumePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Resume", nil, "Failure preparing request") + return + } + + result, err = client.ResumeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Resume", nil, "Failure sending request") + return + } + + return +} + +// ResumePreparer prepares the Resume request. +func (client SQLPoolsClient) ResumePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/resume", pathParameters), + 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 SQLPoolsClient) ResumeSender(req *http.Request) (future SQLPoolsResumeFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResumeResponder handles the response to the Resume request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) ResumeResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update apply a partial update to a SQL pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// SQLPoolInfo - the updated SQL pool properties +func (client SQLPoolsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, SQLPoolInfo SQLPoolPatchInfo) (result SQLPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, SQLPoolInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SQLPoolsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, SQLPoolInfo SQLPoolPatchInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}", pathParameters), + autorest.WithJSON(SQLPoolInfo), + 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 SQLPoolsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SQLPoolsClient) UpdateResponder(resp *http.Response) (result SQLPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolschemas.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolschemas.go new file mode 100644 index 000000000000..a0d467ad928b --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolschemas.go @@ -0,0 +1,254 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolSchemasClient is the azure Synapse Analytics Management Client +type SQLPoolSchemasClient struct { + BaseClient +} + +// NewSQLPoolSchemasClient creates an instance of the SQLPoolSchemasClient client. +func NewSQLPoolSchemasClient(subscriptionID string) SQLPoolSchemasClient { + return NewSQLPoolSchemasClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolSchemasClientWithBaseURI creates an instance of the SQLPoolSchemasClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolSchemasClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolSchemasClient { + return SQLPoolSchemasClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get Sql Pool schema +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +func (client SQLPoolSchemasClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string) (result SQLPoolSchema, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemasClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSchemasClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolSchemasClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}", 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 SQLPoolSchemasClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolSchemasClient) GetResponder(resp *http.Response) (result SQLPoolSchema, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets schemas of a given SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// filter - an OData filter expression that filters elements in the collection. +func (client SQLPoolSchemasClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result SQLPoolSchemaListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemasClient.List") + defer func() { + sc := -1 + if result.spslr.Response.Response != nil { + sc = result.spslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSchemasClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.spslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "List", resp, "Failure sending request") + return + } + + result.spslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "List", resp, "Failure responding to request") + return + } + if result.spslr.hasNextLink() && result.spslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolSchemasClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas", 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 SQLPoolSchemasClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolSchemasClient) ListResponder(resp *http.Response) (result SQLPoolSchemaListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolSchemasClient) listNextResults(ctx context.Context, lastResults SQLPoolSchemaListResult) (result SQLPoolSchemaListResult, err error) { + req, err := lastResults.sQLPoolSchemaListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "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, "synapse.SQLPoolSchemasClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSchemasClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolSchemasClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result SQLPoolSchemaListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemasClient.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, workspaceName, SQLPoolName, filter) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsecurityalertpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsecurityalertpolicies.go new file mode 100644 index 000000000000..9a11a005e049 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsecurityalertpolicies.go @@ -0,0 +1,341 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolSecurityAlertPoliciesClient is the azure Synapse Analytics Management Client +type SQLPoolSecurityAlertPoliciesClient struct { + BaseClient +} + +// NewSQLPoolSecurityAlertPoliciesClient creates an instance of the SQLPoolSecurityAlertPoliciesClient client. +func NewSQLPoolSecurityAlertPoliciesClient(subscriptionID string) SQLPoolSecurityAlertPoliciesClient { + return NewSQLPoolSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolSecurityAlertPoliciesClientWithBaseURI creates an instance of the SQLPoolSecurityAlertPoliciesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewSQLPoolSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolSecurityAlertPoliciesClient { + return SQLPoolSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a Sql pool's security alert policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the Sql pool security alert policy. +func (client SQLPoolSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SQLPoolSecurityAlertPolicy) (result SQLPoolSecurityAlertPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSecurityAlertPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSecurityAlertPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolSecurityAlertPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SQLPoolSecurityAlertPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityAlertPolicyName": autorest.Encode("path", "default"), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies/{securityAlertPolicyName}", 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 SQLPoolSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result SQLPoolSecurityAlertPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a Sql pool's security alert policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolSecurityAlertPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSecurityAlertPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSecurityAlertPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolSecurityAlertPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityAlertPolicyName": autorest.Encode("path", "default"), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies/{securityAlertPolicyName}", 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 SQLPoolSecurityAlertPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result SQLPoolSecurityAlertPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get a list of Sql pool's security alert policies. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolSecurityAlertPoliciesClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ListSQLPoolSecurityAlertPoliciesPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSecurityAlertPoliciesClient.List") + defer func() { + sc := -1 + if result.lspsap.Response.Response != nil { + sc = result.lspsap.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSecurityAlertPoliciesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lspsap.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.lspsap, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.lspsap.hasNextLink() && result.lspsap.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolSecurityAlertPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies", 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 SQLPoolSecurityAlertPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolSecurityAlertPoliciesClient) ListResponder(resp *http.Response) (result ListSQLPoolSecurityAlertPolicies, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolSecurityAlertPoliciesClient) listNextResults(ctx context.Context, lastResults ListSQLPoolSecurityAlertPolicies) (result ListSQLPoolSecurityAlertPolicies, err error) { + req, err := lastResults.listSQLPoolSecurityAlertPoliciesPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "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, "synapse.SQLPoolSecurityAlertPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSecurityAlertPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolSecurityAlertPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result ListSQLPoolSecurityAlertPoliciesIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSecurityAlertPoliciesClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsensitivitylabels.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsensitivitylabels.go new file mode 100644 index 000000000000..cbd4f9337058 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolsensitivitylabels.go @@ -0,0 +1,868 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolSensitivityLabelsClient is the azure Synapse Analytics Management Client +type SQLPoolSensitivityLabelsClient struct { + BaseClient +} + +// NewSQLPoolSensitivityLabelsClient creates an instance of the SQLPoolSensitivityLabelsClient client. +func NewSQLPoolSensitivityLabelsClient(subscriptionID string) SQLPoolSensitivityLabelsClient { + return NewSQLPoolSensitivityLabelsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolSensitivityLabelsClientWithBaseURI creates an instance of the SQLPoolSensitivityLabelsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolSensitivityLabelsClient { + return SQLPoolSensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the sensitivity label of a given column in a Sql pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// columnName - the name of the column. +// parameters - the column sensitivity label resource. +func (client SQLPoolSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel) (result SensitivityLabel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, columnName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolSensitivityLabelsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "columnName": autorest.Encode("path", columnName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sensitivityLabelSource": autorest.Encode("path", "current"), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.ManagedBy = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", 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 SQLPoolSensitivityLabelsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) CreateOrUpdateResponder(resp *http.Response) (result SensitivityLabel, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the sensitivity label of a given column in a Sql pool +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// columnName - the name of the column. +func (client SQLPoolSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, columnName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolSensitivityLabelsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "columnName": autorest.Encode("path", columnName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sensitivityLabelSource": autorest.Encode("path", "current"), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", 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 SQLPoolSensitivityLabelsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisableRecommendation disables sensitivity recommendations on a given column +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// columnName - the name of the column. +func (client SQLPoolSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.DisableRecommendation") + 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.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "DisableRecommendation", err.Error()) + } + + req, err := client.DisableRecommendationPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, columnName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "DisableRecommendation", nil, "Failure preparing request") + return + } + + resp, err := client.DisableRecommendationSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "DisableRecommendation", resp, "Failure sending request") + return + } + + result, err = client.DisableRecommendationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "DisableRecommendation", resp, "Failure responding to request") + return + } + + return +} + +// DisableRecommendationPreparer prepares the DisableRecommendation request. +func (client SQLPoolSensitivityLabelsClient) DisableRecommendationPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "columnName": autorest.Encode("path", columnName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sensitivityLabelSource": autorest.Encode("path", "recommended"), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableRecommendationSender sends the DisableRecommendation request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolSensitivityLabelsClient) DisableRecommendationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DisableRecommendationResponder handles the response to the DisableRecommendation request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) DisableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableRecommendation enables sensitivity recommendations on a given column (recommendations are enabled by default +// on all columns) +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// columnName - the name of the column. +func (client SQLPoolSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.EnableRecommendation") + 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.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "EnableRecommendation", err.Error()) + } + + req, err := client.EnableRecommendationPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, columnName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "EnableRecommendation", nil, "Failure preparing request") + return + } + + resp, err := client.EnableRecommendationSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "EnableRecommendation", resp, "Failure sending request") + return + } + + result, err = client.EnableRecommendationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "EnableRecommendation", resp, "Failure responding to request") + return + } + + return +} + +// EnableRecommendationPreparer prepares the EnableRecommendation request. +func (client SQLPoolSensitivityLabelsClient) EnableRecommendationPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "columnName": autorest.Encode("path", columnName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sensitivityLabelSource": autorest.Encode("path", "recommended"), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableRecommendationSender sends the EnableRecommendation request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolSensitivityLabelsClient) EnableRecommendationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// EnableRecommendationResponder handles the response to the EnableRecommendation request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) EnableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the sensitivity label of a given column +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// columnName - the name of the column. +// sensitivityLabelSource - the source of the sensitivity label. +func (client SQLPoolSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) (result SensitivityLabel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, columnName, sensitivityLabelSource) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolSensitivityLabelsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "columnName": autorest.Encode("path", columnName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sensitivityLabelSource": autorest.Encode("path", sensitivityLabelSource), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", 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 SQLPoolSensitivityLabelsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) GetResponder(resp *http.Response) (result SensitivityLabel, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListCurrent gets SQL pool sensitivity labels. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// filter - an OData filter expression that filters elements in the collection. +func (client SQLPoolSensitivityLabelsClient) ListCurrent(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result SensitivityLabelListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.ListCurrent") + defer func() { + sc := -1 + if result.sllr.Response.Response != nil { + sc = result.sllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "ListCurrent", err.Error()) + } + + result.fn = client.listCurrentNextResults + req, err := client.ListCurrentPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "ListCurrent", nil, "Failure preparing request") + return + } + + resp, err := client.ListCurrentSender(req) + if err != nil { + result.sllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "ListCurrent", resp, "Failure sending request") + return + } + + result.sllr, err = client.ListCurrentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "ListCurrent", resp, "Failure responding to request") + return + } + if result.sllr.hasNextLink() && result.sllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListCurrentPreparer prepares the ListCurrent request. +func (client SQLPoolSensitivityLabelsClient) ListCurrentPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCurrentSender sends the ListCurrent request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolSensitivityLabelsClient) ListCurrentSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListCurrentResponder handles the response to the ListCurrent request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) ListCurrentResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listCurrentNextResults retrieves the next set of results, if any. +func (client SQLPoolSensitivityLabelsClient) listCurrentNextResults(ctx context.Context, lastResults SensitivityLabelListResult) (result SensitivityLabelListResult, err error) { + req, err := lastResults.sensitivityLabelListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "listCurrentNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListCurrentSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "listCurrentNextResults", resp, "Failure sending next results request") + } + result, err = client.ListCurrentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "listCurrentNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListCurrentComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolSensitivityLabelsClient) ListCurrentComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result SensitivityLabelListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.ListCurrent") + 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.ListCurrent(ctx, resourceGroupName, workspaceName, SQLPoolName, filter) + return +} + +// ListRecommended gets sensitivity labels of a given SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// includeDisabledRecommendations - specifies whether to include disabled recommendations or not. +// skipToken - an OData query option to indicate how many elements to skip in the collection. +// filter - an OData filter expression that filters elements in the collection. +func (client SQLPoolSensitivityLabelsClient) ListRecommended(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result SensitivityLabelListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.ListRecommended") + defer func() { + sc := -1 + if result.sllr.Response.Response != nil { + sc = result.sllr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "ListRecommended", err.Error()) + } + + result.fn = client.listRecommendedNextResults + req, err := client.ListRecommendedPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, includeDisabledRecommendations, skipToken, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "ListRecommended", nil, "Failure preparing request") + return + } + + resp, err := client.ListRecommendedSender(req) + if err != nil { + result.sllr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "ListRecommended", resp, "Failure sending request") + return + } + + result.sllr, err = client.ListRecommendedResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "ListRecommended", resp, "Failure responding to request") + return + } + if result.sllr.hasNextLink() && result.sllr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListRecommendedPreparer prepares the ListRecommended request. +func (client SQLPoolSensitivityLabelsClient) ListRecommendedPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, includeDisabledRecommendations *bool, skipToken string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if includeDisabledRecommendations != nil { + queryParameters["includeDisabledRecommendations"] = autorest.Encode("query", *includeDisabledRecommendations) + } + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListRecommendedSender sends the ListRecommended request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolSensitivityLabelsClient) ListRecommendedSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListRecommendedResponder handles the response to the ListRecommended request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) ListRecommendedResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listRecommendedNextResults retrieves the next set of results, if any. +func (client SQLPoolSensitivityLabelsClient) listRecommendedNextResults(ctx context.Context, lastResults SensitivityLabelListResult) (result SensitivityLabelListResult, err error) { + req, err := lastResults.sensitivityLabelListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "listRecommendedNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListRecommendedSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "listRecommendedNextResults", resp, "Failure sending next results request") + } + result, err = client.ListRecommendedResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "listRecommendedNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListRecommendedComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolSensitivityLabelsClient) ListRecommendedComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result SensitivityLabelListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.ListRecommended") + 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.ListRecommended(ctx, resourceGroupName, workspaceName, SQLPoolName, includeDisabledRecommendations, skipToken, filter) + return +} + +// Update update sensitivity labels of a given SQL Pool using an operations batch. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SensitivityLabelUpdateList) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSensitivityLabelsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolSensitivityLabelsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolSensitivityLabelsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SQLPoolSensitivityLabelsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SensitivityLabelUpdateList) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels", 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 SQLPoolSensitivityLabelsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SQLPoolSensitivityLabelsClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltablecolumns.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltablecolumns.go new file mode 100644 index 000000000000..39a128bc9529 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltablecolumns.go @@ -0,0 +1,170 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolTableColumnsClient is the azure Synapse Analytics Management Client +type SQLPoolTableColumnsClient struct { + BaseClient +} + +// NewSQLPoolTableColumnsClient creates an instance of the SQLPoolTableColumnsClient client. +func NewSQLPoolTableColumnsClient(subscriptionID string) SQLPoolTableColumnsClient { + return NewSQLPoolTableColumnsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolTableColumnsClientWithBaseURI creates an instance of the SQLPoolTableColumnsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSQLPoolTableColumnsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolTableColumnsClient { + return SQLPoolTableColumnsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByTableName gets columns in a given table in a SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +// filter - an OData filter expression that filters elements in the collection. +func (client SQLPoolTableColumnsClient) ListByTableName(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, filter string) (result SQLPoolColumnListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableColumnsClient.ListByTableName") + defer func() { + sc := -1 + if result.spclr.Response.Response != nil { + sc = result.spclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolTableColumnsClient", "ListByTableName", err.Error()) + } + + result.fn = client.listByTableNameNextResults + req, err := client.ListByTableNamePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTableColumnsClient", "ListByTableName", nil, "Failure preparing request") + return + } + + resp, err := client.ListByTableNameSender(req) + if err != nil { + result.spclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTableColumnsClient", "ListByTableName", resp, "Failure sending request") + return + } + + result.spclr, err = client.ListByTableNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTableColumnsClient", "ListByTableName", resp, "Failure responding to request") + return + } + if result.spclr.hasNextLink() && result.spclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByTableNamePreparer prepares the ListByTableName request. +func (client SQLPoolTableColumnsClient) ListByTableNamePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByTableNameSender sends the ListByTableName request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolTableColumnsClient) ListByTableNameSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByTableNameResponder handles the response to the ListByTableName request. The method always +// closes the http.Response Body. +func (client SQLPoolTableColumnsClient) ListByTableNameResponder(resp *http.Response) (result SQLPoolColumnListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByTableNameNextResults retrieves the next set of results, if any. +func (client SQLPoolTableColumnsClient) listByTableNameNextResults(ctx context.Context, lastResults SQLPoolColumnListResult) (result SQLPoolColumnListResult, err error) { + req, err := lastResults.sQLPoolColumnListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolTableColumnsClient", "listByTableNameNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByTableNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolTableColumnsClient", "listByTableNameNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByTableNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTableColumnsClient", "listByTableNameNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByTableNameComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolTableColumnsClient) ListByTableNameComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, filter string) (result SQLPoolColumnListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableColumnsClient.ListByTableName") + 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.ListByTableName(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName, filter) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltables.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltables.go new file mode 100644 index 000000000000..feecfece191c --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltables.go @@ -0,0 +1,258 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolTablesClient is the azure Synapse Analytics Management Client +type SQLPoolTablesClient struct { + BaseClient +} + +// NewSQLPoolTablesClient creates an instance of the SQLPoolTablesClient client. +func NewSQLPoolTablesClient(subscriptionID string) SQLPoolTablesClient { + return NewSQLPoolTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolTablesClientWithBaseURI creates an instance of the SQLPoolTablesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolTablesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolTablesClient { + return SQLPoolTablesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get Sql pool table +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// tableName - the name of the table. +func (client SQLPoolTablesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string) (result SQLPoolTable, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTablesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolTablesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolTablesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}", 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 SQLPoolTablesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolTablesClient) GetResponder(resp *http.Response) (result SQLPoolTable, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySchema gets tables of a given schema in a SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// schemaName - the name of the schema. +// filter - an OData filter expression that filters elements in the collection. +func (client SQLPoolTablesClient) ListBySchema(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, filter string) (result SQLPoolTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTablesClient.ListBySchema") + defer func() { + sc := -1 + if result.sptlr.Response.Response != nil { + sc = result.sptlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolTablesClient", "ListBySchema", err.Error()) + } + + result.fn = client.listBySchemaNextResults + req, err := client.ListBySchemaPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "ListBySchema", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySchemaSender(req) + if err != nil { + result.sptlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "ListBySchema", resp, "Failure sending request") + return + } + + result.sptlr, err = client.ListBySchemaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "ListBySchema", resp, "Failure responding to request") + return + } + if result.sptlr.hasNextLink() && result.sptlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySchemaPreparer prepares the ListBySchema request. +func (client SQLPoolTablesClient) ListBySchemaPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "schemaName": autorest.Encode("path", schemaName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySchemaSender sends the ListBySchema request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolTablesClient) ListBySchemaSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySchemaResponder handles the response to the ListBySchema request. The method always +// closes the http.Response Body. +func (client SQLPoolTablesClient) ListBySchemaResponder(resp *http.Response) (result SQLPoolTableListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySchemaNextResults retrieves the next set of results, if any. +func (client SQLPoolTablesClient) listBySchemaNextResults(ctx context.Context, lastResults SQLPoolTableListResult) (result SQLPoolTableListResult, err error) { + req, err := lastResults.sQLPoolTableListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "listBySchemaNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySchemaSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "listBySchemaNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySchemaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTablesClient", "listBySchemaNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySchemaComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolTablesClient) ListBySchemaComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, filter string) (result SQLPoolTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTablesClient.ListBySchema") + 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.ListBySchema(ctx, resourceGroupName, workspaceName, SQLPoolName, schemaName, filter) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltransparentdataencryptions.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltransparentdataencryptions.go new file mode 100644 index 000000000000..37e391fe35cc --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpooltransparentdataencryptions.go @@ -0,0 +1,343 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolTransparentDataEncryptionsClient is the azure Synapse Analytics Management Client +type SQLPoolTransparentDataEncryptionsClient struct { + BaseClient +} + +// NewSQLPoolTransparentDataEncryptionsClient creates an instance of the SQLPoolTransparentDataEncryptionsClient +// client. +func NewSQLPoolTransparentDataEncryptionsClient(subscriptionID string) SQLPoolTransparentDataEncryptionsClient { + return NewSQLPoolTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolTransparentDataEncryptionsClientWithBaseURI creates an instance of the +// SQLPoolTransparentDataEncryptionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolTransparentDataEncryptionsClient { + return SQLPoolTransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Sql pool's transparent data encryption configuration. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the required parameters for creating or updating transparent data encryption. +func (client SQLPoolTransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters TransparentDataEncryption) (result TransparentDataEncryption, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTransparentDataEncryptionsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolTransparentDataEncryptionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolTransparentDataEncryptionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters TransparentDataEncryption) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "transparentDataEncryptionName": autorest.Encode("path", "current"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Location = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}", 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 SQLPoolTransparentDataEncryptionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolTransparentDataEncryptionsClient) CreateOrUpdateResponder(resp *http.Response) (result TransparentDataEncryption, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a SQL pool's transparent data encryption configuration. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolTransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result TransparentDataEncryption, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTransparentDataEncryptionsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolTransparentDataEncryptionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolTransparentDataEncryptionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "transparentDataEncryptionName": autorest.Encode("path", "current"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}", 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 SQLPoolTransparentDataEncryptionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolTransparentDataEncryptionsClient) GetResponder(resp *http.Response) (result TransparentDataEncryption, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get list of SQL pool's transparent data encryption configurations. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolTransparentDataEncryptionsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result TransparentDataEncryptionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTransparentDataEncryptionsClient.List") + defer func() { + sc := -1 + if result.tdelr.Response.Response != nil { + sc = result.tdelr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolTransparentDataEncryptionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.tdelr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "List", resp, "Failure sending request") + return + } + + result.tdelr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "List", resp, "Failure responding to request") + return + } + if result.tdelr.hasNextLink() && result.tdelr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolTransparentDataEncryptionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption", 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 SQLPoolTransparentDataEncryptionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolTransparentDataEncryptionsClient) ListResponder(resp *http.Response) (result TransparentDataEncryptionListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolTransparentDataEncryptionsClient) listNextResults(ctx context.Context, lastResults TransparentDataEncryptionListResult) (result TransparentDataEncryptionListResult, err error) { + req, err := lastResults.transparentDataEncryptionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "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, "synapse.SQLPoolTransparentDataEncryptionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolTransparentDataEncryptionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolTransparentDataEncryptionsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result TransparentDataEncryptionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTransparentDataEncryptionsClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolusages.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolusages.go new file mode 100644 index 000000000000..2592889f8422 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolusages.go @@ -0,0 +1,161 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolUsagesClient is the azure Synapse Analytics Management Client +type SQLPoolUsagesClient struct { + BaseClient +} + +// NewSQLPoolUsagesClient creates an instance of the SQLPoolUsagesClient client. +func NewSQLPoolUsagesClient(subscriptionID string) SQLPoolUsagesClient { + return NewSQLPoolUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolUsagesClientWithBaseURI creates an instance of the SQLPoolUsagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolUsagesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolUsagesClient { + return SQLPoolUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets SQL pool usages. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolUsagesClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolUsageListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsagesClient.List") + defer func() { + sc := -1 + if result.spulr.Response.Response != nil { + sc = result.spulr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolUsagesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolUsagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.spulr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolUsagesClient", "List", resp, "Failure sending request") + return + } + + result.spulr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolUsagesClient", "List", resp, "Failure responding to request") + return + } + if result.spulr.hasNextLink() && result.spulr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolUsagesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/usages", 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 SQLPoolUsagesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolUsagesClient) ListResponder(resp *http.Response) (result SQLPoolUsageListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolUsagesClient) listNextResults(ctx context.Context, lastResults SQLPoolUsageListResult) (result SQLPoolUsageListResult, err error) { + req, err := lastResults.sQLPoolUsageListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolUsagesClient", "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, "synapse.SQLPoolUsagesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolUsagesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolUsagesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolUsageListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsagesClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentrulebaselines.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentrulebaselines.go new file mode 100644 index 000000000000..c15d963c87dd --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentrulebaselines.go @@ -0,0 +1,318 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolVulnerabilityAssessmentRuleBaselinesClient is the azure Synapse Analytics Management Client +type SQLPoolVulnerabilityAssessmentRuleBaselinesClient struct { + BaseClient +} + +// NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient creates an instance of the +// SQLPoolVulnerabilityAssessmentRuleBaselinesClient client. +func NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string) SQLPoolVulnerabilityAssessmentRuleBaselinesClient { + return NewSQLPoolVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the +// SQLPoolVulnerabilityAssessmentRuleBaselinesClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolVulnerabilityAssessmentRuleBaselinesClient { + return SQLPoolVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a Sql pool's vulnerability assessment rule baseline. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// ruleID - the vulnerability assessment rule ID. +// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a Sql +// pool level rule and master for workspace level rule). +// parameters - the requested rule baseline resource. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters SQLPoolVulnerabilityAssessmentRuleBaseline) (result SQLPoolVulnerabilityAssessmentRuleBaseline, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentRuleBaselinesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.SQLPoolVulnerabilityAssessmentRuleBaselineProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SQLPoolVulnerabilityAssessmentRuleBaselineProperties.BaselineResults", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, ruleID, baselineName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters SQLPoolVulnerabilityAssessmentRuleBaseline) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "baselineName": autorest.Encode("path", baselineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleId": autorest.Encode("path", ruleID), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", 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 SQLPoolVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateResponder(resp *http.Response) (result SQLPoolVulnerabilityAssessmentRuleBaseline, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete removes the database's vulnerability assessment rule baseline. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// ruleID - the vulnerability assessment rule ID. +// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a Sql +// pool level rule and master for workspace level rule). +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentRuleBaselinesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, ruleID, baselineName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "baselineName": autorest.Encode("path", baselineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleId": autorest.Encode("path", ruleID), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", 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 SQLPoolVulnerabilityAssessmentRuleBaselinesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a SqlPool's vulnerability assessment rule baseline. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// ruleID - the vulnerability assessment rule ID. +// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a Sql +// pool level rule and master for server level rule). +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (result SQLPoolVulnerabilityAssessmentRuleBaseline, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentRuleBaselinesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, ruleID, baselineName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "baselineName": autorest.Encode("path", baselineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleId": autorest.Encode("path", ruleID), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", 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 SQLPoolVulnerabilityAssessmentRuleBaselinesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentRuleBaselinesClient) GetResponder(resp *http.Response) (result SQLPoolVulnerabilityAssessmentRuleBaseline, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessments.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessments.go new file mode 100644 index 000000000000..256352b5c901 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessments.go @@ -0,0 +1,428 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolVulnerabilityAssessmentsClient is the azure Synapse Analytics Management Client +type SQLPoolVulnerabilityAssessmentsClient struct { + BaseClient +} + +// NewSQLPoolVulnerabilityAssessmentsClient creates an instance of the SQLPoolVulnerabilityAssessmentsClient client. +func NewSQLPoolVulnerabilityAssessmentsClient(subscriptionID string) SQLPoolVulnerabilityAssessmentsClient { + return NewSQLPoolVulnerabilityAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolVulnerabilityAssessmentsClientWithBaseURI creates an instance of the SQLPoolVulnerabilityAssessmentsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewSQLPoolVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolVulnerabilityAssessmentsClient { + return SQLPoolVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the Sql pool vulnerability assessment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// parameters - the requested resource. +func (client SQLPoolVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SQLPoolVulnerabilityAssessment) (result SQLPoolVulnerabilityAssessment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolVulnerabilityAssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters SQLPoolVulnerabilityAssessment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", 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 SQLPoolVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result SQLPoolVulnerabilityAssessment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete removes the database's vulnerability assessment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolVulnerabilityAssessmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", 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 SQLPoolVulnerabilityAssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the Sql pool's vulnerability assessment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolVulnerabilityAssessment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolVulnerabilityAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", 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 SQLPoolVulnerabilityAssessmentsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result SQLPoolVulnerabilityAssessment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the vulnerability assessment policies associated with a SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolVulnerabilityAssessmentsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolVulnerabilityAssessmentListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentsClient.List") + defer func() { + sc := -1 + if result.spvalr.Response.Response != nil { + sc = result.spvalr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.spvalr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "List", resp, "Failure sending request") + return + } + + result.spvalr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "List", resp, "Failure responding to request") + return + } + if result.spvalr.hasNextLink() && result.spvalr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolVulnerabilityAssessmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments", 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 SQLPoolVulnerabilityAssessmentsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentsClient) ListResponder(resp *http.Response) (result SQLPoolVulnerabilityAssessmentListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolVulnerabilityAssessmentsClient) listNextResults(ctx context.Context, lastResults SQLPoolVulnerabilityAssessmentListResult) (result SQLPoolVulnerabilityAssessmentListResult, err error) { + req, err := lastResults.sQLPoolVulnerabilityAssessmentListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "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, "synapse.SQLPoolVulnerabilityAssessmentsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolVulnerabilityAssessmentsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result SQLPoolVulnerabilityAssessmentListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentsClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentscans.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentscans.go new file mode 100644 index 000000000000..5625f20e668c --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolvulnerabilityassessmentscans.go @@ -0,0 +1,435 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolVulnerabilityAssessmentScansClient is the azure Synapse Analytics Management Client +type SQLPoolVulnerabilityAssessmentScansClient struct { + BaseClient +} + +// NewSQLPoolVulnerabilityAssessmentScansClient creates an instance of the SQLPoolVulnerabilityAssessmentScansClient +// client. +func NewSQLPoolVulnerabilityAssessmentScansClient(subscriptionID string) SQLPoolVulnerabilityAssessmentScansClient { + return NewSQLPoolVulnerabilityAssessmentScansClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the +// SQLPoolVulnerabilityAssessmentScansClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLPoolVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolVulnerabilityAssessmentScansClient { + return SQLPoolVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Export convert an existing scan result to a human readable format. If already exists nothing happens +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// scanID - the vulnerability assessment scan Id of the scan to retrieve. +func (client SQLPoolVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (result SQLPoolVulnerabilityAssessmentScansExport, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentScansClient.Export") + 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentScansClient", "Export", err.Error()) + } + + req, err := client.ExportPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, scanID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "Export", nil, "Failure preparing request") + return + } + + resp, err := client.ExportSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "Export", resp, "Failure sending request") + return + } + + result, err = client.ExportResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "Export", resp, "Failure responding to request") + return + } + + return +} + +// ExportPreparer prepares the Export request. +func (client SQLPoolVulnerabilityAssessmentScansClient) ExportPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "scanId": autorest.Encode("path", scanID), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export", pathParameters), + 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 SQLPoolVulnerabilityAssessmentScansClient) ExportSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ExportResponder handles the response to the Export request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentScansClient) ExportResponder(resp *http.Response) (result SQLPoolVulnerabilityAssessmentScansExport, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a vulnerability assessment scan record of a Sql pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// scanID - the vulnerability assessment scan Id of the scan to retrieve. +func (client SQLPoolVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (result VulnerabilityAssessmentScanRecord, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentScansClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentScansClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, scanID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolVulnerabilityAssessmentScansClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "scanId": autorest.Encode("path", scanID), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", 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 SQLPoolVulnerabilityAssessmentScansClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentScansClient) GetResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecord, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InitiateScan executes a Vulnerability Assessment database scan. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// scanID - the vulnerability assessment scan Id of the scan to retrieve. +func (client SQLPoolVulnerabilityAssessmentScansClient) InitiateScan(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (result SQLPoolVulnerabilityAssessmentScansInitiateScanFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentScansClient.InitiateScan") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentScansClient", "InitiateScan", err.Error()) + } + + req, err := client.InitiateScanPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, scanID) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "InitiateScan", nil, "Failure preparing request") + return + } + + result, err = client.InitiateScanSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "InitiateScan", nil, "Failure sending request") + return + } + + return +} + +// InitiateScanPreparer prepares the InitiateScan request. +func (client SQLPoolVulnerabilityAssessmentScansClient) InitiateScanPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "scanId": autorest.Encode("path", scanID), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InitiateScanSender sends the InitiateScan request. The method will close the +// http.Response Body if it receives an error. +func (client SQLPoolVulnerabilityAssessmentScansClient) InitiateScanSender(req *http.Request) (future SQLPoolVulnerabilityAssessmentScansInitiateScanFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// InitiateScanResponder handles the response to the InitiateScan request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentScansClient) InitiateScanResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// List lists the vulnerability assessment scans of a SQL pool. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolVulnerabilityAssessmentScansClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result VulnerabilityAssessmentScanRecordListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentScansClient.List") + defer func() { + sc := -1 + if result.vasrlr.Response.Response != nil { + sc = result.vasrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolVulnerabilityAssessmentScansClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vasrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "List", resp, "Failure sending request") + return + } + + result.vasrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "List", resp, "Failure responding to request") + return + } + if result.vasrlr.hasNextLink() && result.vasrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolVulnerabilityAssessmentScansClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", 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 SQLPoolVulnerabilityAssessmentScansClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolVulnerabilityAssessmentScansClient) ListResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecordListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolVulnerabilityAssessmentScansClient) listNextResults(ctx context.Context, lastResults VulnerabilityAssessmentScanRecordListResult) (result VulnerabilityAssessmentScanRecordListResult, err error) { + req, err := lastResults.vulnerabilityAssessmentScanRecordListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "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, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolVulnerabilityAssessmentScansClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result VulnerabilityAssessmentScanRecordListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentScansClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadclassifier.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadclassifier.go new file mode 100644 index 000000000000..17b2df630ccd --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadclassifier.go @@ -0,0 +1,446 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolWorkloadClassifierClient is the azure Synapse Analytics Management Client +type SQLPoolWorkloadClassifierClient struct { + BaseClient +} + +// NewSQLPoolWorkloadClassifierClient creates an instance of the SQLPoolWorkloadClassifierClient client. +func NewSQLPoolWorkloadClassifierClient(subscriptionID string) SQLPoolWorkloadClassifierClient { + return NewSQLPoolWorkloadClassifierClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolWorkloadClassifierClientWithBaseURI creates an instance of the SQLPoolWorkloadClassifierClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewSQLPoolWorkloadClassifierClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolWorkloadClassifierClient { + return SQLPoolWorkloadClassifierClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create Or Update workload classifier for a Sql pool's workload group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +// workloadClassifierName - the name of the workload classifier. +// parameters - the properties of the workload classifier. +func (client SQLPoolWorkloadClassifierClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier) (result SQLPoolWorkloadClassifierCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadClassifierClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {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("synapse.SQLPoolWorkloadClassifierClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName, workloadClassifierName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolWorkloadClassifierClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadClassifierName": autorest.Encode("path", workloadClassifierName), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolWorkloadClassifierClient) CreateOrUpdateSender(req *http.Request) (future SQLPoolWorkloadClassifierCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadClassifierClient) CreateOrUpdateResponder(resp *http.Response) (result WorkloadClassifier, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete remove workload classifier of a Sql pool's workload group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +// workloadClassifierName - the name of the workload classifier. +func (client SQLPoolWorkloadClassifierClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string) (result SQLPoolWorkloadClassifierDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadClassifierClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolWorkloadClassifierClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName, workloadClassifierName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolWorkloadClassifierClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadClassifierName": autorest.Encode("path", workloadClassifierName), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolWorkloadClassifierClient) DeleteSender(req *http.Request) (future SQLPoolWorkloadClassifierDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadClassifierClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a workload classifier of Sql pool's workload group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +// workloadClassifierName - the name of the workload classifier. +func (client SQLPoolWorkloadClassifierClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string) (result WorkloadClassifier, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadClassifierClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolWorkloadClassifierClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName, workloadClassifierName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolWorkloadClassifierClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadClassifierName": autorest.Encode("path", workloadClassifierName), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolWorkloadClassifierClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadClassifierClient) GetResponder(resp *http.Response) (result WorkloadClassifier, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get list of Sql pool's workload classifier for workload groups. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +func (client SQLPoolWorkloadClassifierClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result WorkloadClassifierListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadClassifierClient.List") + defer func() { + sc := -1 + if result.wclr.Response.Response != nil { + sc = result.wclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolWorkloadClassifierClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "List", resp, "Failure sending request") + return + } + + result.wclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "List", resp, "Failure responding to request") + return + } + if result.wclr.hasNextLink() && result.wclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolWorkloadClassifierClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers", 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 SQLPoolWorkloadClassifierClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadClassifierClient) ListResponder(resp *http.Response) (result WorkloadClassifierListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolWorkloadClassifierClient) listNextResults(ctx context.Context, lastResults WorkloadClassifierListResult) (result WorkloadClassifierListResult, err error) { + req, err := lastResults.workloadClassifierListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "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, "synapse.SQLPoolWorkloadClassifierClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolWorkloadClassifierClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result WorkloadClassifierListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadClassifierClient.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, workspaceName, SQLPoolName, workloadGroupName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadgroup.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadgroup.go new file mode 100644 index 000000000000..d8dc5a2fa279 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/sqlpoolworkloadgroup.go @@ -0,0 +1,441 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// SQLPoolWorkloadGroupClient is the azure Synapse Analytics Management Client +type SQLPoolWorkloadGroupClient struct { + BaseClient +} + +// NewSQLPoolWorkloadGroupClient creates an instance of the SQLPoolWorkloadGroupClient client. +func NewSQLPoolWorkloadGroupClient(subscriptionID string) SQLPoolWorkloadGroupClient { + return NewSQLPoolWorkloadGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLPoolWorkloadGroupClientWithBaseURI creates an instance of the SQLPoolWorkloadGroupClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSQLPoolWorkloadGroupClientWithBaseURI(baseURI string, subscriptionID string) SQLPoolWorkloadGroupClient { + return SQLPoolWorkloadGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create Or Update a Sql pool's workload group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +// parameters - the requested workload group state. +func (client SQLPoolWorkloadGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, parameters WorkloadGroup) (result SQLPoolWorkloadGroupCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadGroupClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {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("synapse.SQLPoolWorkloadGroupClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLPoolWorkloadGroupClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, parameters WorkloadGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolWorkloadGroupClient) CreateOrUpdateSender(req *http.Request) (future SQLPoolWorkloadGroupCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadGroupClient) CreateOrUpdateResponder(resp *http.Response) (result WorkloadGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete remove Sql pool's workload group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +func (client SQLPoolWorkloadGroupClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result SQLPoolWorkloadGroupDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadGroupClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolWorkloadGroupClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLPoolWorkloadGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolWorkloadGroupClient) DeleteSender(req *http.Request) (future SQLPoolWorkloadGroupDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadGroupClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a Sql pool's workload group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +// workloadGroupName - the name of the workload group. +func (client SQLPoolWorkloadGroupClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result WorkloadGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadGroupClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolWorkloadGroupClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName, workloadGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLPoolWorkloadGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/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 SQLPoolWorkloadGroupClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadGroupClient) GetResponder(resp *http.Response) (result WorkloadGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get list of Sql pool's workload groups. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - SQL pool name +func (client SQLPoolWorkloadGroupClient) List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result WorkloadGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadGroupClient.List") + defer func() { + sc := -1 + if result.wglr.Response.Response != nil { + sc = result.wglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.SQLPoolWorkloadGroupClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "List", resp, "Failure sending request") + return + } + + result.wglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "List", resp, "Failure responding to request") + return + } + if result.wglr.hasNextLink() && result.wglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLPoolWorkloadGroupClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups", 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 SQLPoolWorkloadGroupClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLPoolWorkloadGroupClient) ListResponder(resp *http.Response) (result WorkloadGroupListResult, err error) { + err = autorest.Respond( + resp, + 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 SQLPoolWorkloadGroupClient) listNextResults(ctx context.Context, lastResults WorkloadGroupListResult) (result WorkloadGroupListResult, err error) { + req, err := lastResults.workloadGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "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, "synapse.SQLPoolWorkloadGroupClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLPoolWorkloadGroupClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result WorkloadGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolWorkloadGroupClient.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, workspaceName, SQLPoolName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/synapseapi/interfaces.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/synapseapi/interfaces.go new file mode 100644 index 000000000000..92443f29693a --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/synapseapi/interfaces.go @@ -0,0 +1,615 @@ +package synapseapi + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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/synapse/mgmt/2021-06-01-preview/synapse" + "github.com/Azure/go-autorest/autorest" +) + +// BigDataPoolsClientAPI contains the set of methods on the BigDataPoolsClient type. +type BigDataPoolsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolInfo synapse.BigDataPoolResourceInfo, force *bool) (result synapse.BigDataPoolsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string) (result synapse.BigDataPoolsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string) (result synapse.BigDataPoolResourceInfo, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.BigDataPoolResourceInfoListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.BigDataPoolResourceInfoListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolPatchInfo synapse.BigDataPoolPatchInfo) (result synapse.BigDataPoolResourceInfo, err error) +} + +var _ BigDataPoolsClientAPI = (*synapse.BigDataPoolsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + CheckNameAvailability(ctx context.Context, request synapse.CheckNameAvailabilityRequest) (result synapse.CheckNameAvailabilityResponse, err error) + GetAzureAsyncHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string) (result synapse.OperationResource, err error) + GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string) (result autorest.Response, err error) + List(ctx context.Context) (result synapse.ListAvailableRpOperation, err error) +} + +var _ OperationsClientAPI = (*synapse.OperationsClient)(nil) + +// IPFirewallRulesClientAPI contains the set of methods on the IPFirewallRulesClient type. +type IPFirewallRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, IPFirewallRuleInfo synapse.IPFirewallRuleInfo) (result synapse.IPFirewallRulesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string) (result synapse.IPFirewallRulesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string) (result synapse.IPFirewallRuleInfo, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.IPFirewallRuleInfoListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.IPFirewallRuleInfoListResultIterator, err error) + ReplaceAll(ctx context.Context, resourceGroupName string, workspaceName string, request synapse.ReplaceAllIPFirewallRulesRequest) (result synapse.IPFirewallRulesReplaceAllFuture, err error) +} + +var _ IPFirewallRulesClientAPI = (*synapse.IPFirewallRulesClient)(nil) + +// IntegrationRuntimesClientAPI contains the set of methods on the IntegrationRuntimesClient type. +type IntegrationRuntimesClientAPI interface { + Create(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime synapse.IntegrationRuntimeResource, ifMatch string) (result synapse.IntegrationRuntimesCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimesDeleteFuture, err error) + DisableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimesDisableInteractiveQueryFuture, err error) + EnableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimesEnableInteractiveQueryFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, ifNoneMatch string) (result synapse.IntegrationRuntimeResource, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.IntegrationRuntimeListResponsePage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.IntegrationRuntimeListResponseIterator, err error) + ListOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse, err error) + Start(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimesStartFuture, err error) + Stop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimesStopFuture, err error) + Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, updateIntegrationRuntimeRequest synapse.UpdateIntegrationRuntimeRequest) (result synapse.IntegrationRuntimeResource, err error) + Upgrade(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result autorest.Response, err error) +} + +var _ IntegrationRuntimesClientAPI = (*synapse.IntegrationRuntimesClient)(nil) + +// IntegrationRuntimeNodeIPAddressClientAPI contains the set of methods on the IntegrationRuntimeNodeIPAddressClient type. +type IntegrationRuntimeNodeIPAddressClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (result synapse.IntegrationRuntimeNodeIPAddress, err error) +} + +var _ IntegrationRuntimeNodeIPAddressClientAPI = (*synapse.IntegrationRuntimeNodeIPAddressClient)(nil) + +// IntegrationRuntimeObjectMetadataClientAPI contains the set of methods on the IntegrationRuntimeObjectMetadataClient type. +type IntegrationRuntimeObjectMetadataClientAPI interface { + List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, getMetadataRequest *synapse.GetSsisObjectMetadataRequest) (result synapse.SsisObjectMetadataListResponse, err error) + Refresh(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimeObjectMetadataRefreshFuture, err error) +} + +var _ IntegrationRuntimeObjectMetadataClientAPI = (*synapse.IntegrationRuntimeObjectMetadataClient)(nil) + +// IntegrationRuntimeNodesClientAPI contains the set of methods on the IntegrationRuntimeNodesClient type. +type IntegrationRuntimeNodesClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string) (result synapse.SelfHostedIntegrationRuntimeNode, err error) + Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest synapse.UpdateIntegrationRuntimeNodeRequest) (result synapse.SelfHostedIntegrationRuntimeNode, err error) +} + +var _ IntegrationRuntimeNodesClientAPI = (*synapse.IntegrationRuntimeNodesClient)(nil) + +// IntegrationRuntimeCredentialsClientAPI contains the set of methods on the IntegrationRuntimeCredentialsClient type. +type IntegrationRuntimeCredentialsClientAPI interface { + Sync(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result autorest.Response, err error) +} + +var _ IntegrationRuntimeCredentialsClientAPI = (*synapse.IntegrationRuntimeCredentialsClient)(nil) + +// IntegrationRuntimeConnectionInfosClientAPI contains the set of methods on the IntegrationRuntimeConnectionInfosClient type. +type IntegrationRuntimeConnectionInfosClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimeConnectionInfo, err error) +} + +var _ IntegrationRuntimeConnectionInfosClientAPI = (*synapse.IntegrationRuntimeConnectionInfosClient)(nil) + +// IntegrationRuntimeAuthKeysClientAPI contains the set of methods on the IntegrationRuntimeAuthKeysClient type. +type IntegrationRuntimeAuthKeysClientAPI interface { + List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimeAuthKeys, err error) + Regenerate(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, regenerateKeyParameters synapse.IntegrationRuntimeRegenerateKeyParameters) (result synapse.IntegrationRuntimeAuthKeys, err error) +} + +var _ IntegrationRuntimeAuthKeysClientAPI = (*synapse.IntegrationRuntimeAuthKeysClient)(nil) + +// IntegrationRuntimeMonitoringDataClientAPI contains the set of methods on the IntegrationRuntimeMonitoringDataClient type. +type IntegrationRuntimeMonitoringDataClientAPI interface { + List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimeMonitoringData, err error) +} + +var _ IntegrationRuntimeMonitoringDataClientAPI = (*synapse.IntegrationRuntimeMonitoringDataClient)(nil) + +// IntegrationRuntimeStatusClientAPI contains the set of methods on the IntegrationRuntimeStatusClient type. +type IntegrationRuntimeStatusClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result synapse.IntegrationRuntimeStatusResponse, err error) +} + +var _ IntegrationRuntimeStatusClientAPI = (*synapse.IntegrationRuntimeStatusClient)(nil) + +// KeysClientAPI contains the set of methods on the KeysClient type. +type KeysClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, keyProperties synapse.Key) (result synapse.Key, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, keyName string) (result synapse.Key, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, keyName string) (result synapse.Key, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.KeyInfoListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.KeyInfoListResultIterator, err error) +} + +var _ KeysClientAPI = (*synapse.KeysClient)(nil) + +// LibraryClientAPI contains the set of methods on the LibraryClient type. +type LibraryClientAPI interface { + Get(ctx context.Context, resourceGroupName string, libraryName string, workspaceName string) (result synapse.LibraryResource, err error) +} + +var _ LibraryClientAPI = (*synapse.LibraryClient)(nil) + +// LibrariesClientAPI contains the set of methods on the LibrariesClient type. +type LibrariesClientAPI interface { + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.LibraryListResponsePage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.LibraryListResponseIterator, err error) +} + +var _ LibrariesClientAPI = (*synapse.LibrariesClient)(nil) + +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + Create(ctx context.Context, request synapse.PrivateEndpointConnection, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result synapse.PrivateEndpointConnectionsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result synapse.PrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result synapse.PrivateEndpointConnection, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.PrivateEndpointConnectionListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.PrivateEndpointConnectionListIterator, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*synapse.PrivateEndpointConnectionsClient)(nil) + +// PrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkResourcesClient type. +type PrivateLinkResourcesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, privateLinkResourceName string) (result synapse.PrivateLinkResource, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.PrivateLinkResourceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.PrivateLinkResourceListResultIterator, err error) +} + +var _ PrivateLinkResourcesClientAPI = (*synapse.PrivateLinkResourcesClient)(nil) + +// PrivateLinkHubPrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkHubPrivateLinkResourcesClient type. +type PrivateLinkHubPrivateLinkResourcesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkResourceName string) (result synapse.PrivateLinkResource, err error) + List(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateLinkResourceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateLinkResourceListResultIterator, err error) +} + +var _ PrivateLinkHubPrivateLinkResourcesClientAPI = (*synapse.PrivateLinkHubPrivateLinkResourcesClient)(nil) + +// PrivateLinkHubsClientAPI contains the set of methods on the PrivateLinkHubsClient type. +type PrivateLinkHubsClientAPI interface { + CreateOrUpdate(ctx context.Context, privateLinkHubInfo synapse.PrivateLinkHub, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateLinkHub, err error) + Delete(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateLinkHubsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateLinkHub, err error) + List(ctx context.Context) (result synapse.PrivateLinkHubInfoListResultPage, err error) + ListComplete(ctx context.Context) (result synapse.PrivateLinkHubInfoListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result synapse.PrivateLinkHubInfoListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result synapse.PrivateLinkHubInfoListResultIterator, err error) + Update(ctx context.Context, privateLinkHubPatchInfo synapse.PrivateLinkHubPatchInfo, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateLinkHub, err error) +} + +var _ PrivateLinkHubsClientAPI = (*synapse.PrivateLinkHubsClient)(nil) + +// PrivateEndpointConnectionsPrivateLinkHubClientAPI contains the set of methods on the PrivateEndpointConnectionsPrivateLinkHubClient type. +type PrivateEndpointConnectionsPrivateLinkHubClientAPI interface { + Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateEndpointConnectionName string) (result synapse.PrivateEndpointConnectionForPrivateLinkHub, err error) + List(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, privateLinkHubName string) (result synapse.PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator, err error) +} + +var _ PrivateEndpointConnectionsPrivateLinkHubClientAPI = (*synapse.PrivateEndpointConnectionsPrivateLinkHubClient)(nil) + +// SQLPoolsClientAPI contains the set of methods on the SQLPoolsClient type. +type SQLPoolsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, SQLPoolInfo synapse.SQLPool) (result synapse.SQLPoolsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPool, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.SQLPoolInfoListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.SQLPoolInfoListResultIterator, err error) + Pause(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolsPauseFuture, err error) + Rename(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.ResourceMoveDefinition) (result autorest.Response, err error) + Resume(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolsResumeFuture, err error) + Update(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, SQLPoolInfo synapse.SQLPoolPatchInfo) (result synapse.SQLPool, err error) +} + +var _ SQLPoolsClientAPI = (*synapse.SQLPoolsClient)(nil) + +// SQLPoolMetadataSyncConfigsClientAPI contains the set of methods on the SQLPoolMetadataSyncConfigsClient type. +type SQLPoolMetadataSyncConfigsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, metadataSyncConfiguration synapse.MetadataSyncConfig) (result synapse.MetadataSyncConfig, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.MetadataSyncConfig, err error) +} + +var _ SQLPoolMetadataSyncConfigsClientAPI = (*synapse.SQLPoolMetadataSyncConfigsClient)(nil) + +// SQLPoolOperationResultsClientAPI contains the set of methods on the SQLPoolOperationResultsClient type. +type SQLPoolOperationResultsClientAPI interface { + GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, operationID string) (result synapse.SetObject, err error) +} + +var _ SQLPoolOperationResultsClientAPI = (*synapse.SQLPoolOperationResultsClient)(nil) + +// SQLPoolGeoBackupPoliciesClientAPI contains the set of methods on the SQLPoolGeoBackupPoliciesClient type. +type SQLPoolGeoBackupPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.GeoBackupPolicy) (result synapse.GeoBackupPolicy, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.GeoBackupPolicy, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.GeoBackupPolicyListResult, err error) +} + +var _ SQLPoolGeoBackupPoliciesClientAPI = (*synapse.SQLPoolGeoBackupPoliciesClient)(nil) + +// SQLPoolDataWarehouseUserActivitiesClientAPI contains the set of methods on the SQLPoolDataWarehouseUserActivitiesClient type. +type SQLPoolDataWarehouseUserActivitiesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.DataWarehouseUserActivities, err error) +} + +var _ SQLPoolDataWarehouseUserActivitiesClientAPI = (*synapse.SQLPoolDataWarehouseUserActivitiesClient)(nil) + +// SQLPoolRestorePointsClientAPI contains the set of methods on the SQLPoolRestorePointsClient type. +type SQLPoolRestorePointsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.CreateSQLPoolRestorePointDefinition) (result synapse.SQLPoolRestorePointsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, restorePointName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, restorePointName string) (result synapse.RestorePoint, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.RestorePointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.RestorePointListResultIterator, err error) +} + +var _ SQLPoolRestorePointsClientAPI = (*synapse.SQLPoolRestorePointsClient)(nil) + +// SQLPoolReplicationLinksClientAPI contains the set of methods on the SQLPoolReplicationLinksClient type. +type SQLPoolReplicationLinksClientAPI interface { + GetByName(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, linkID string) (result synapse.ReplicationLink, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ReplicationLinkListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ReplicationLinkListResultIterator, err error) +} + +var _ SQLPoolReplicationLinksClientAPI = (*synapse.SQLPoolReplicationLinksClient)(nil) + +// SQLPoolMaintenanceWindowsClientAPI contains the set of methods on the SQLPoolMaintenanceWindowsClient type. +type SQLPoolMaintenanceWindowsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowName string, parameters synapse.MaintenanceWindows) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowName string) (result synapse.MaintenanceWindows, err error) +} + +var _ SQLPoolMaintenanceWindowsClientAPI = (*synapse.SQLPoolMaintenanceWindowsClient)(nil) + +// SQLPoolMaintenanceWindowOptionsClientAPI contains the set of methods on the SQLPoolMaintenanceWindowOptionsClient type. +type SQLPoolMaintenanceWindowOptionsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, maintenanceWindowOptionsName string) (result synapse.MaintenanceWindowOptions, err error) +} + +var _ SQLPoolMaintenanceWindowOptionsClientAPI = (*synapse.SQLPoolMaintenanceWindowOptionsClient)(nil) + +// SQLPoolTransparentDataEncryptionsClientAPI contains the set of methods on the SQLPoolTransparentDataEncryptionsClient type. +type SQLPoolTransparentDataEncryptionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.TransparentDataEncryption) (result synapse.TransparentDataEncryption, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.TransparentDataEncryption, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.TransparentDataEncryptionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.TransparentDataEncryptionListResultIterator, err error) +} + +var _ SQLPoolTransparentDataEncryptionsClientAPI = (*synapse.SQLPoolTransparentDataEncryptionsClient)(nil) + +// SQLPoolBlobAuditingPoliciesClientAPI contains the set of methods on the SQLPoolBlobAuditingPoliciesClient type. +type SQLPoolBlobAuditingPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.SQLPoolBlobAuditingPolicy) (result synapse.SQLPoolBlobAuditingPolicy, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolBlobAuditingPolicy, err error) + ListBySQLPool(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolBlobAuditingPolicyListResultPage, err error) + ListBySQLPoolComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolBlobAuditingPolicyListResultIterator, err error) +} + +var _ SQLPoolBlobAuditingPoliciesClientAPI = (*synapse.SQLPoolBlobAuditingPoliciesClient)(nil) + +// SQLPoolOperationsClientAPI contains the set of methods on the SQLPoolOperationsClient type. +type SQLPoolOperationsClientAPI interface { + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator, err error) +} + +var _ SQLPoolOperationsClientAPI = (*synapse.SQLPoolOperationsClient)(nil) + +// SQLPoolUsagesClientAPI contains the set of methods on the SQLPoolUsagesClient type. +type SQLPoolUsagesClientAPI interface { + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolUsageListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolUsageListResultIterator, err error) +} + +var _ SQLPoolUsagesClientAPI = (*synapse.SQLPoolUsagesClient)(nil) + +// SQLPoolSensitivityLabelsClientAPI contains the set of methods on the SQLPoolSensitivityLabelsClient type. +type SQLPoolSensitivityLabelsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string, parameters synapse.SensitivityLabel) (result synapse.SensitivityLabel, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) + DisableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) + EnableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string, sensitivityLabelSource synapse.SensitivityLabelSource) (result synapse.SensitivityLabel, err error) + ListCurrent(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result synapse.SensitivityLabelListResultPage, err error) + ListCurrentComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result synapse.SensitivityLabelListResultIterator, err error) + ListRecommended(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result synapse.SensitivityLabelListResultPage, err error) + ListRecommendedComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result synapse.SensitivityLabelListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.SensitivityLabelUpdateList) (result autorest.Response, err error) +} + +var _ SQLPoolSensitivityLabelsClientAPI = (*synapse.SQLPoolSensitivityLabelsClient)(nil) + +// SQLPoolRecommendedSensitivityLabelsClientAPI contains the set of methods on the SQLPoolRecommendedSensitivityLabelsClient type. +type SQLPoolRecommendedSensitivityLabelsClientAPI interface { + Update(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.RecommendedSensitivityLabelUpdateList) (result autorest.Response, err error) +} + +var _ SQLPoolRecommendedSensitivityLabelsClientAPI = (*synapse.SQLPoolRecommendedSensitivityLabelsClient)(nil) + +// SQLPoolSchemasClientAPI contains the set of methods on the SQLPoolSchemasClient type. +type SQLPoolSchemasClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string) (result synapse.SQLPoolSchema, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result synapse.SQLPoolSchemaListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, filter string) (result synapse.SQLPoolSchemaListResultIterator, err error) +} + +var _ SQLPoolSchemasClientAPI = (*synapse.SQLPoolSchemasClient)(nil) + +// SQLPoolTablesClientAPI contains the set of methods on the SQLPoolTablesClient type. +type SQLPoolTablesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string) (result synapse.SQLPoolTable, err error) + ListBySchema(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, filter string) (result synapse.SQLPoolTableListResultPage, err error) + ListBySchemaComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, filter string) (result synapse.SQLPoolTableListResultIterator, err error) +} + +var _ SQLPoolTablesClientAPI = (*synapse.SQLPoolTablesClient)(nil) + +// SQLPoolTableColumnsClientAPI contains the set of methods on the SQLPoolTableColumnsClient type. +type SQLPoolTableColumnsClientAPI interface { + ListByTableName(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, filter string) (result synapse.SQLPoolColumnListResultPage, err error) + ListByTableNameComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, filter string) (result synapse.SQLPoolColumnListResultIterator, err error) +} + +var _ SQLPoolTableColumnsClientAPI = (*synapse.SQLPoolTableColumnsClient)(nil) + +// SQLPoolConnectionPoliciesClientAPI contains the set of methods on the SQLPoolConnectionPoliciesClient type. +type SQLPoolConnectionPoliciesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolConnectionPolicy, err error) +} + +var _ SQLPoolConnectionPoliciesClientAPI = (*synapse.SQLPoolConnectionPoliciesClient)(nil) + +// SQLPoolVulnerabilityAssessmentsClientAPI contains the set of methods on the SQLPoolVulnerabilityAssessmentsClient type. +type SQLPoolVulnerabilityAssessmentsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.SQLPoolVulnerabilityAssessment) (result synapse.SQLPoolVulnerabilityAssessment, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolVulnerabilityAssessment, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolVulnerabilityAssessmentListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolVulnerabilityAssessmentListResultIterator, err error) +} + +var _ SQLPoolVulnerabilityAssessmentsClientAPI = (*synapse.SQLPoolVulnerabilityAssessmentsClient)(nil) + +// SQLPoolVulnerabilityAssessmentScansClientAPI contains the set of methods on the SQLPoolVulnerabilityAssessmentScansClient type. +type SQLPoolVulnerabilityAssessmentScansClientAPI interface { + Export(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (result synapse.SQLPoolVulnerabilityAssessmentScansExport, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (result synapse.VulnerabilityAssessmentScanRecord, err error) + InitiateScan(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, scanID string) (result synapse.SQLPoolVulnerabilityAssessmentScansInitiateScanFuture, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.VulnerabilityAssessmentScanRecordListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.VulnerabilityAssessmentScanRecordListResultIterator, err error) +} + +var _ SQLPoolVulnerabilityAssessmentScansClientAPI = (*synapse.SQLPoolVulnerabilityAssessmentScansClient)(nil) + +// SQLPoolSecurityAlertPoliciesClientAPI contains the set of methods on the SQLPoolSecurityAlertPoliciesClient type. +type SQLPoolSecurityAlertPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.SQLPoolSecurityAlertPolicy) (result synapse.SQLPoolSecurityAlertPolicy, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.SQLPoolSecurityAlertPolicy, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ListSQLPoolSecurityAlertPoliciesPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ListSQLPoolSecurityAlertPoliciesIterator, err error) +} + +var _ SQLPoolSecurityAlertPoliciesClientAPI = (*synapse.SQLPoolSecurityAlertPoliciesClient)(nil) + +// SQLPoolVulnerabilityAssessmentRuleBaselinesClientAPI contains the set of methods on the SQLPoolVulnerabilityAssessmentRuleBaselinesClient type. +type SQLPoolVulnerabilityAssessmentRuleBaselinesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName synapse.VulnerabilityAssessmentPolicyBaselineName, parameters synapse.SQLPoolVulnerabilityAssessmentRuleBaseline) (result synapse.SQLPoolVulnerabilityAssessmentRuleBaseline, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName synapse.VulnerabilityAssessmentPolicyBaselineName) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, ruleID string, baselineName synapse.VulnerabilityAssessmentPolicyBaselineName) (result synapse.SQLPoolVulnerabilityAssessmentRuleBaseline, err error) +} + +var _ SQLPoolVulnerabilityAssessmentRuleBaselinesClientAPI = (*synapse.SQLPoolVulnerabilityAssessmentRuleBaselinesClient)(nil) + +// ExtendedSQLPoolBlobAuditingPoliciesClientAPI contains the set of methods on the ExtendedSQLPoolBlobAuditingPoliciesClient type. +type ExtendedSQLPoolBlobAuditingPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.ExtendedSQLPoolBlobAuditingPolicy) (result synapse.ExtendedSQLPoolBlobAuditingPolicy, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ExtendedSQLPoolBlobAuditingPolicy, err error) + ListBySQLPool(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ExtendedSQLPoolBlobAuditingPolicyListResultPage, err error) + ListBySQLPoolComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.ExtendedSQLPoolBlobAuditingPolicyListResultIterator, err error) +} + +var _ ExtendedSQLPoolBlobAuditingPoliciesClientAPI = (*synapse.ExtendedSQLPoolBlobAuditingPoliciesClient)(nil) + +// DataMaskingPoliciesClientAPI contains the set of methods on the DataMaskingPoliciesClient type. +type DataMaskingPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, parameters synapse.DataMaskingPolicy) (result synapse.DataMaskingPolicy, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.DataMaskingPolicy, err error) +} + +var _ DataMaskingPoliciesClientAPI = (*synapse.DataMaskingPoliciesClient)(nil) + +// DataMaskingRulesClientAPI contains the set of methods on the DataMaskingRulesClient type. +type DataMaskingRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, dataMaskingRuleName string, parameters synapse.DataMaskingRule) (result synapse.DataMaskingRule, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, dataMaskingRuleName string) (result synapse.DataMaskingRule, err error) + ListBySQLPool(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.DataMaskingRuleListResult, err error) +} + +var _ DataMaskingRulesClientAPI = (*synapse.DataMaskingRulesClient)(nil) + +// SQLPoolColumnsClientAPI contains the set of methods on the SQLPoolColumnsClient type. +type SQLPoolColumnsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, schemaName string, tableName string, columnName string) (result synapse.SQLPoolColumn, err error) +} + +var _ SQLPoolColumnsClientAPI = (*synapse.SQLPoolColumnsClient)(nil) + +// SQLPoolWorkloadGroupClientAPI contains the set of methods on the SQLPoolWorkloadGroupClient type. +type SQLPoolWorkloadGroupClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, parameters synapse.WorkloadGroup) (result synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result synapse.SQLPoolWorkloadGroupDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result synapse.WorkloadGroup, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.WorkloadGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.WorkloadGroupListResultIterator, err error) +} + +var _ SQLPoolWorkloadGroupClientAPI = (*synapse.SQLPoolWorkloadGroupClient)(nil) + +// SQLPoolWorkloadClassifierClientAPI contains the set of methods on the SQLPoolWorkloadClassifierClient type. +type SQLPoolWorkloadClassifierClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string, parameters synapse.WorkloadClassifier) (result synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string) (result synapse.SQLPoolWorkloadClassifierDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string, workloadClassifierName string) (result synapse.WorkloadClassifier, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result synapse.WorkloadClassifierListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string, workloadGroupName string) (result synapse.WorkloadClassifierListResultIterator, err error) +} + +var _ SQLPoolWorkloadClassifierClientAPI = (*synapse.SQLPoolWorkloadClassifierClient)(nil) + +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientAPI contains the set of methods on the WorkspaceManagedSQLServerBlobAuditingPoliciesClient type. +type WorkspaceManagedSQLServerBlobAuditingPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters synapse.ServerBlobAuditingPolicy) (result synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerBlobAuditingPolicy, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerBlobAuditingPolicyListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerBlobAuditingPolicyListResultIterator, err error) +} + +var _ WorkspaceManagedSQLServerBlobAuditingPoliciesClientAPI = (*synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient)(nil) + +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientAPI contains the set of methods on the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient type. +type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters synapse.ExtendedServerBlobAuditingPolicy) (result synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ExtendedServerBlobAuditingPolicy, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ExtendedServerBlobAuditingPolicyListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ExtendedServerBlobAuditingPolicyListResultIterator, err error) +} + +var _ WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientAPI = (*synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient)(nil) + +// WorkspaceManagedSQLServerSecurityAlertPolicyClientAPI contains the set of methods on the WorkspaceManagedSQLServerSecurityAlertPolicyClient type. +type WorkspaceManagedSQLServerSecurityAlertPolicyClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters synapse.ServerSecurityAlertPolicy) (result synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerSecurityAlertPolicy, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerSecurityAlertPolicyListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerSecurityAlertPolicyListResultIterator, err error) +} + +var _ WorkspaceManagedSQLServerSecurityAlertPolicyClientAPI = (*synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient)(nil) + +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientAPI contains the set of methods on the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient type. +type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters synapse.ServerVulnerabilityAssessment) (result synapse.ServerVulnerabilityAssessment, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerVulnerabilityAssessment, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerVulnerabilityAssessmentListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerVulnerabilityAssessmentListResultIterator, err error) +} + +var _ WorkspaceManagedSQLServerVulnerabilityAssessmentsClientAPI = (*synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient)(nil) + +// WorkspaceManagedSQLServerEncryptionProtectorClientAPI contains the set of methods on the WorkspaceManagedSQLServerEncryptionProtectorClient type. +type WorkspaceManagedSQLServerEncryptionProtectorClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters synapse.EncryptionProtector) (result synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.EncryptionProtector, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.EncryptionProtectorListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.EncryptionProtectorListResultIterator, err error) + Revalidate(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture, err error) +} + +var _ WorkspaceManagedSQLServerEncryptionProtectorClientAPI = (*synapse.WorkspaceManagedSQLServerEncryptionProtectorClient)(nil) + +// WorkspaceManagedSQLServerUsagesClientAPI contains the set of methods on the WorkspaceManagedSQLServerUsagesClient type. +type WorkspaceManagedSQLServerUsagesClientAPI interface { + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerUsageListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ServerUsageListResultIterator, err error) +} + +var _ WorkspaceManagedSQLServerUsagesClientAPI = (*synapse.WorkspaceManagedSQLServerUsagesClient)(nil) + +// WorkspaceManagedSQLServerRecoverableSQLPoolsClientAPI contains the set of methods on the WorkspaceManagedSQLServerRecoverableSQLPoolsClient type. +type WorkspaceManagedSQLServerRecoverableSQLPoolsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result synapse.RecoverableSQLPool, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.RecoverableSQLPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.RecoverableSQLPoolListResultIterator, err error) +} + +var _ WorkspaceManagedSQLServerRecoverableSQLPoolsClientAPI = (*synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient)(nil) + +// WorkspacesClientAPI contains the set of methods on the WorkspacesClient type. +type WorkspacesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspaceInfo synapse.Workspace) (result synapse.WorkspacesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.WorkspacesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.Workspace, err error) + List(ctx context.Context) (result synapse.WorkspaceInfoListResultPage, err error) + ListComplete(ctx context.Context) (result synapse.WorkspaceInfoListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result synapse.WorkspaceInfoListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result synapse.WorkspaceInfoListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchInfo synapse.WorkspacePatchInfo) (result synapse.WorkspacesUpdateFuture, err error) +} + +var _ WorkspacesClientAPI = (*synapse.WorkspacesClient)(nil) + +// WorkspaceAadAdminsClientAPI contains the set of methods on the WorkspaceAadAdminsClient type. +type WorkspaceAadAdminsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo synapse.WorkspaceAadAdminInfo) (result synapse.WorkspaceAadAdminsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.WorkspaceAadAdminsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.WorkspaceAadAdminInfo, err error) +} + +var _ WorkspaceAadAdminsClientAPI = (*synapse.WorkspaceAadAdminsClient)(nil) + +// WorkspaceSQLAadAdminsClientAPI contains the set of methods on the WorkspaceSQLAadAdminsClient type. +type WorkspaceSQLAadAdminsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo synapse.WorkspaceAadAdminInfo) (result synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.WorkspaceSQLAadAdminsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.WorkspaceAadAdminInfo, err error) +} + +var _ WorkspaceSQLAadAdminsClientAPI = (*synapse.WorkspaceSQLAadAdminsClient)(nil) + +// WorkspaceManagedIdentitySQLControlSettingsClientAPI contains the set of methods on the WorkspaceManagedIdentitySQLControlSettingsClient type. +type WorkspaceManagedIdentitySQLControlSettingsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, managedIdentitySQLControlSettings synapse.ManagedIdentitySQLControlSettingsModel) (result synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.ManagedIdentitySQLControlSettingsModel, err error) +} + +var _ WorkspaceManagedIdentitySQLControlSettingsClientAPI = (*synapse.WorkspaceManagedIdentitySQLControlSettingsClient)(nil) + +// RestorableDroppedSQLPoolsClientAPI contains the set of methods on the RestorableDroppedSQLPoolsClient type. +type RestorableDroppedSQLPoolsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, restorableDroppedSQLPoolID string) (result synapse.RestorableDroppedSQLPool, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.RestorableDroppedSQLPoolListResult, err error) +} + +var _ RestorableDroppedSQLPoolsClientAPI = (*synapse.RestorableDroppedSQLPoolsClient)(nil) + +// SparkConfigurationClientAPI contains the set of methods on the SparkConfigurationClient type. +type SparkConfigurationClientAPI interface { + Get(ctx context.Context, resourceGroupName string, sparkConfigurationName string, workspaceName string) (result synapse.SparkConfigurationResource, err error) +} + +var _ SparkConfigurationClientAPI = (*synapse.SparkConfigurationClient)(nil) + +// SparkConfigurationsClientAPI contains the set of methods on the SparkConfigurationsClient type. +type SparkConfigurationsClientAPI interface { + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.SparkConfigurationListResponsePage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.SparkConfigurationListResponseIterator, err error) +} + +var _ SparkConfigurationsClientAPI = (*synapse.SparkConfigurationsClient)(nil) + +// AzureADOnlyAuthenticationsClientAPI contains the set of methods on the AzureADOnlyAuthenticationsClient type. +type AzureADOnlyAuthenticationsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationInfo synapse.AzureADOnlyAuthentication) (result synapse.AzureADOnlyAuthenticationsCreateFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.AzureADOnlyAuthentication, err error) + List(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.AzureADOnlyAuthenticationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result synapse.AzureADOnlyAuthenticationListResultIterator, err error) +} + +var _ AzureADOnlyAuthenticationsClientAPI = (*synapse.AzureADOnlyAuthenticationsClient)(nil) diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/version.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/version.go new file mode 100644 index 000000000000..f082d28387d0 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/version.go @@ -0,0 +1,19 @@ +package synapse + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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() + " synapse/2021-06-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/synapse/mgmt/2021-06-01-preview/synapse/workspaceaadadmins.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaceaadadmins.go new file mode 100644 index 000000000000..9ec8c40514f8 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaceaadadmins.go @@ -0,0 +1,294 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceAadAdminsClient is the azure Synapse Analytics Management Client +type WorkspaceAadAdminsClient struct { + BaseClient +} + +// NewWorkspaceAadAdminsClient creates an instance of the WorkspaceAadAdminsClient client. +func NewWorkspaceAadAdminsClient(subscriptionID string) WorkspaceAadAdminsClient { + return NewWorkspaceAadAdminsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceAadAdminsClientWithBaseURI creates an instance of the WorkspaceAadAdminsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewWorkspaceAadAdminsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceAadAdminsClient { + return WorkspaceAadAdminsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a workspace active directory admin +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// aadAdminInfo - workspace active directory administrator properties +func (client WorkspaceAadAdminsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAadAdminInfo) (result WorkspaceAadAdminsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceAadAdminsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceAadAdminsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, aadAdminInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceAadAdminsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAadAdminInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/administrators/activeDirectory", pathParameters), + autorest.WithJSON(aadAdminInfo), + 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 WorkspaceAadAdminsClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceAadAdminsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceAadAdminsClient) CreateOrUpdateResponder(resp *http.Response) (result WorkspaceAadAdminInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a workspace active directory admin +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceAadAdminsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceAadAdminsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceAadAdminsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceAadAdminsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkspaceAadAdminsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/administrators/activeDirectory", 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 WorkspaceAadAdminsClient) DeleteSender(req *http.Request) (future WorkspaceAadAdminsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkspaceAadAdminsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a workspace active directory admin +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceAadAdminsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceAadAdminInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceAadAdminsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceAadAdminsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceAadAdminsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/administrators/activeDirectory", 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 WorkspaceAadAdminsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceAadAdminsClient) GetResponder(resp *http.Response) (result WorkspaceAadAdminInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedidentitysqlcontrolsettings.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedidentitysqlcontrolsettings.go new file mode 100644 index 000000000000..23da9f183119 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedidentitysqlcontrolsettings.go @@ -0,0 +1,209 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedIdentitySQLControlSettingsClient is the azure Synapse Analytics Management Client +type WorkspaceManagedIdentitySQLControlSettingsClient struct { + BaseClient +} + +// NewWorkspaceManagedIdentitySQLControlSettingsClient creates an instance of the +// WorkspaceManagedIdentitySQLControlSettingsClient client. +func NewWorkspaceManagedIdentitySQLControlSettingsClient(subscriptionID string) WorkspaceManagedIdentitySQLControlSettingsClient { + return NewWorkspaceManagedIdentitySQLControlSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedIdentitySQLControlSettingsClientWithBaseURI creates an instance of the +// WorkspaceManagedIdentitySQLControlSettingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedIdentitySQLControlSettingsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedIdentitySQLControlSettingsClient { + return WorkspaceManagedIdentitySQLControlSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate sends the create or update request. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// managedIdentitySQLControlSettings - managed Identity Sql Control Settings +func (client WorkspaceManagedIdentitySQLControlSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, managedIdentitySQLControlSettings ManagedIdentitySQLControlSettingsModel) (result WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedIdentitySQLControlSettingsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, managedIdentitySQLControlSettings) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceManagedIdentitySQLControlSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, managedIdentitySQLControlSettings ManagedIdentitySQLControlSettingsModel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/managedIdentitySqlControlSettings/default", pathParameters), + autorest.WithJSON(managedIdentitySQLControlSettings), + 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 WorkspaceManagedIdentitySQLControlSettingsClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedIdentitySQLControlSettingsClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedIdentitySQLControlSettingsModel, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get sends the get request. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedIdentitySQLControlSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result ManagedIdentitySQLControlSettingsModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedIdentitySQLControlSettingsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedIdentitySQLControlSettingsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/managedIdentitySqlControlSettings/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 WorkspaceManagedIdentitySQLControlSettingsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedIdentitySQLControlSettingsClient) GetResponder(resp *http.Response) (result ManagedIdentitySQLControlSettingsModel, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverblobauditingpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverblobauditingpolicies.go new file mode 100644 index 000000000000..67b1dcf2c978 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverblobauditingpolicies.go @@ -0,0 +1,338 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerBlobAuditingPoliciesClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerBlobAuditingPoliciesClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient creates an instance of the +// WorkspaceManagedSQLServerBlobAuditingPoliciesClient client. +func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(subscriptionID string) WorkspaceManagedSQLServerBlobAuditingPoliciesClient { + return NewWorkspaceManagedSQLServerBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the +// WorkspaceManagedSQLServerBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerBlobAuditingPoliciesClient { + return WorkspaceManagedSQLServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or Update a workspace managed sql server's blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// parameters - properties of extended blob auditing policy. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters ServerBlobAuditingPolicy) (result WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerBlobAuditingPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters ServerBlobAuditingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/auditingSettings/{blobAuditingPolicyName}", 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 WorkspaceManagedSQLServerBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a workspace managed sql server's blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerBlobAuditingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerBlobAuditingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/auditingSettings/{blobAuditingPolicyName}", 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 WorkspaceManagedSQLServerBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ServerBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace list workspace managed sql server's blob auditing policies. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerBlobAuditingPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerBlobAuditingPoliciesClient.ListByWorkspace") + defer func() { + sc := -1 + if result.sbaplr.Response.Response != nil { + sc = result.sbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.sbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.sbaplr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.sbaplr.hasNextLink() && result.sbaplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/auditingSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) ListByWorkspaceResponder(resp *http.Response) (result ServerBlobAuditingPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) listByWorkspaceNextResults(ctx context.Context, lastResults ServerBlobAuditingPolicyListResult) (result ServerBlobAuditingPolicyListResult, err error) { + req, err := lastResults.serverBlobAuditingPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerBlobAuditingPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerBlobAuditingPoliciesClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverencryptionprotector.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverencryptionprotector.go new file mode 100644 index 000000000000..650a1a049ea7 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverencryptionprotector.go @@ -0,0 +1,427 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerEncryptionProtectorClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerEncryptionProtectorClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerEncryptionProtectorClient creates an instance of the +// WorkspaceManagedSQLServerEncryptionProtectorClient client. +func NewWorkspaceManagedSQLServerEncryptionProtectorClient(subscriptionID string) WorkspaceManagedSQLServerEncryptionProtectorClient { + return NewWorkspaceManagedSQLServerEncryptionProtectorClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerEncryptionProtectorClientWithBaseURI creates an instance of the +// WorkspaceManagedSQLServerEncryptionProtectorClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerEncryptionProtectorClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerEncryptionProtectorClient { + return WorkspaceManagedSQLServerEncryptionProtectorClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate updates workspace managed sql server's encryption protector. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// parameters - the requested encryption protector resource state. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters EncryptionProtector) (result WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerEncryptionProtectorClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters EncryptionProtector) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "encryptionProtectorName": autorest.Encode("path", "current"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Kind = nil + parameters.Location = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}", 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 WorkspaceManagedSQLServerEncryptionProtectorClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) CreateOrUpdateResponder(resp *http.Response) (result EncryptionProtector, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get workspace managed sql server's encryption protector. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result EncryptionProtector, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerEncryptionProtectorClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "encryptionProtectorName": autorest.Encode("path", "current"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}", 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 WorkspaceManagedSQLServerEncryptionProtectorClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) GetResponder(resp *http.Response) (result EncryptionProtector, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get list of encryption protectors for workspace managed sql server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result EncryptionProtectorListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerEncryptionProtectorClient.List") + defer func() { + sc := -1 + if result.eplr.Response.Response != nil { + sc = result.eplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.eplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "List", resp, "Failure sending request") + return + } + + result.eplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "List", resp, "Failure responding to request") + return + } + if result.eplr.hasNextLink() && result.eplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/encryptionProtector", 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 WorkspaceManagedSQLServerEncryptionProtectorClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) ListResponder(resp *http.Response) (result EncryptionProtectorListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspaceManagedSQLServerEncryptionProtectorClient) listNextResults(ctx context.Context, lastResults EncryptionProtectorListResult) (result EncryptionProtectorListResult, err error) { + req, err := lastResults.encryptionProtectorListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "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, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result EncryptionProtectorListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerEncryptionProtectorClient.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, workspaceName) + return +} + +// Revalidate revalidates workspace managed sql server's existing encryption protector. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) Revalidate(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerEncryptionProtectorClient.Revalidate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Revalidate", err.Error()) + } + + req, err := client.RevalidatePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Revalidate", nil, "Failure preparing request") + return + } + + result, err = client.RevalidateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorClient", "Revalidate", nil, "Failure sending request") + return + } + + return +} + +// RevalidatePreparer prepares the Revalidate request. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) RevalidatePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "encryptionProtectorName": autorest.Encode("path", "current"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}/revalidate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevalidateSender sends the Revalidate request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) RevalidateSender(req *http.Request) (future WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RevalidateResponder handles the response to the Revalidate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerEncryptionProtectorClient) RevalidateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverextendedblobauditingpolicies.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverextendedblobauditingpolicies.go new file mode 100644 index 000000000000..ae0e46fbeae2 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverextendedblobauditingpolicies.go @@ -0,0 +1,338 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient creates an instance of the +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient client. +func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(subscriptionID string) WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { + return NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientWithBaseURI creates an instance of the +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { + return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or Update a workspace managed sql server's extended blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// parameters - properties of extended blob auditing policy. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters ExtendedServerBlobAuditingPolicy) (result WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters ExtendedServerBlobAuditingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}", 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 WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a workspace SQL server's extended blob auditing policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result ExtendedServerBlobAuditingPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}", 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 WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace list workspace managed sql server's extended blob auditing policies. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result ExtendedServerBlobAuditingPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.ListByWorkspace") + defer func() { + sc := -1 + if result.esbaplr.Response.Response != nil { + sc = result.esbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.esbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.esbaplr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "ListByWorkspace", resp, "Failure responding to request") + return + } + if result.esbaplr.hasNextLink() && result.esbaplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/extendedAuditingSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) ListByWorkspaceResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkspaceNextResults retrieves the next set of results, if any. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) listByWorkspaceNextResults(ctx context.Context, lastResults ExtendedServerBlobAuditingPolicyListResult) (result ExtendedServerBlobAuditingPolicyListResult, err error) { + req, err := lastResults.extendedServerBlobAuditingPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result ExtendedServerBlobAuditingPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.ListByWorkspace") + 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.ListByWorkspace(ctx, resourceGroupName, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverrecoverablesqlpools.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverrecoverablesqlpools.go new file mode 100644 index 000000000000..a74f69880851 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverrecoverablesqlpools.go @@ -0,0 +1,248 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerRecoverableSQLPoolsClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerRecoverableSQLPoolsClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient creates an instance of the +// WorkspaceManagedSQLServerRecoverableSQLPoolsClient client. +func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID string) WorkspaceManagedSQLServerRecoverableSQLPoolsClient { + return NewWorkspaceManagedSQLServerRecoverableSQLPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerRecoverableSQLPoolsClientWithBaseURI creates an instance of the +// WorkspaceManagedSQLServerRecoverableSQLPoolsClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerRecoverableSQLPoolsClient { + return WorkspaceManagedSQLServerRecoverableSQLPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get recoverable sql pools for workspace managed sql server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// SQLPoolName - the name of the sql pool +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (result RecoverableSQLPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerRecoverableSQLPoolsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, SQLPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, SQLPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlPoolName": autorest.Encode("path", SQLPoolName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlPoolName}", 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 WorkspaceManagedSQLServerRecoverableSQLPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) GetResponder(resp *http.Response) (result RecoverableSQLPool, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get list of recoverable sql pools for workspace managed sql server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result RecoverableSQLPoolListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerRecoverableSQLPoolsClient.List") + defer func() { + sc := -1 + if result.rsplr.Response.Response != nil { + sc = result.rsplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rsplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "List", resp, "Failure sending request") + return + } + + result.rsplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "List", resp, "Failure responding to request") + return + } + if result.rsplr.hasNextLink() && result.rsplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/recoverableSqlPools", 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 WorkspaceManagedSQLServerRecoverableSQLPoolsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) ListResponder(resp *http.Response) (result RecoverableSQLPoolListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspaceManagedSQLServerRecoverableSQLPoolsClient) listNextResults(ctx context.Context, lastResults RecoverableSQLPoolListResult) (result RecoverableSQLPoolListResult, err error) { + req, err := lastResults.recoverableSQLPoolListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "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, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerRecoverableSQLPoolsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerRecoverableSQLPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result RecoverableSQLPoolListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerRecoverableSQLPoolsClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserversecurityalertpolicy.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserversecurityalertpolicy.go new file mode 100644 index 000000000000..c6d1e74586ac --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserversecurityalertpolicy.go @@ -0,0 +1,338 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerSecurityAlertPolicyClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerSecurityAlertPolicyClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerSecurityAlertPolicyClient creates an instance of the +// WorkspaceManagedSQLServerSecurityAlertPolicyClient client. +func NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(subscriptionID string) WorkspaceManagedSQLServerSecurityAlertPolicyClient { + return NewWorkspaceManagedSQLServerSecurityAlertPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerSecurityAlertPolicyClientWithBaseURI creates an instance of the +// WorkspaceManagedSQLServerSecurityAlertPolicyClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerSecurityAlertPolicyClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerSecurityAlertPolicyClient { + return WorkspaceManagedSQLServerSecurityAlertPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or Update a workspace managed sql server's threat detection policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// parameters - the workspace managed sql server security alert policy. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters ServerSecurityAlertPolicy) (result WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerSecurityAlertPolicyClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters ServerSecurityAlertPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityAlertPolicyName": autorest.Encode("path", "Default"), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}", 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 WorkspaceManagedSQLServerSecurityAlertPolicyClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) CreateOrUpdateResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get a workspace managed sql server's security alert policy. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerSecurityAlertPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerSecurityAlertPolicyClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityAlertPolicyName": autorest.Encode("path", "Default"), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}", 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 WorkspaceManagedSQLServerSecurityAlertPolicyClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) GetResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get workspace managed sql server's threat detection policies. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerSecurityAlertPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerSecurityAlertPolicyClient.List") + defer func() { + sc := -1 + if result.ssaplr.Response.Response != nil { + sc = result.ssaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ssaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "List", resp, "Failure sending request") + return + } + + result.ssaplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "List", resp, "Failure responding to request") + return + } + if result.ssaplr.hasNextLink() && result.ssaplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/securityAlertPolicies", 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 WorkspaceManagedSQLServerSecurityAlertPolicyClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) ListResponder(resp *http.Response) (result ServerSecurityAlertPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspaceManagedSQLServerSecurityAlertPolicyClient) listNextResults(ctx context.Context, lastResults ServerSecurityAlertPolicyListResult) (result ServerSecurityAlertPolicyListResult, err error) { + req, err := lastResults.serverSecurityAlertPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "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, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerSecurityAlertPolicyClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerSecurityAlertPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerSecurityAlertPolicyClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverusages.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverusages.go new file mode 100644 index 000000000000..98851ccf40cf --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlserverusages.go @@ -0,0 +1,160 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerUsagesClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerUsagesClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerUsagesClient creates an instance of the WorkspaceManagedSQLServerUsagesClient client. +func NewWorkspaceManagedSQLServerUsagesClient(subscriptionID string) WorkspaceManagedSQLServerUsagesClient { + return NewWorkspaceManagedSQLServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerUsagesClientWithBaseURI creates an instance of the WorkspaceManagedSQLServerUsagesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerUsagesClient { + return WorkspaceManagedSQLServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List get list of server usages metric for workspace managed sql server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerUsagesClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerUsageListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerUsagesClient.List") + defer func() { + sc := -1 + if result.sulr.Response.Response != nil { + sc = result.sulr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerUsagesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerUsagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.sulr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerUsagesClient", "List", resp, "Failure sending request") + return + } + + result.sulr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerUsagesClient", "List", resp, "Failure responding to request") + return + } + if result.sulr.hasNextLink() && result.sulr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkspaceManagedSQLServerUsagesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlUsages", 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 WorkspaceManagedSQLServerUsagesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerUsagesClient) ListResponder(resp *http.Response) (result ServerUsageListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspaceManagedSQLServerUsagesClient) listNextResults(ctx context.Context, lastResults ServerUsageListResult) (result ServerUsageListResult, err error) { + req, err := lastResults.serverUsageListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerUsagesClient", "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, "synapse.WorkspaceManagedSQLServerUsagesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerUsagesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerUsagesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerUsageListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerUsagesClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlservervulnerabilityassessments.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlservervulnerabilityassessments.go new file mode 100644 index 000000000000..ceb2c6715d42 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacemanagedsqlservervulnerabilityassessments.go @@ -0,0 +1,424 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClient is the azure Synapse Analytics Management Client +type WorkspaceManagedSQLServerVulnerabilityAssessmentsClient struct { + BaseClient +} + +// NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient creates an instance of the +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClient client. +func NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(subscriptionID string) WorkspaceManagedSQLServerVulnerabilityAssessmentsClient { + return NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClientWithBaseURI creates an instance of the +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceManagedSQLServerVulnerabilityAssessmentsClient { + return WorkspaceManagedSQLServerVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or Update workspace managed sql server's vulnerability assessment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// parameters - properties for vulnerability assessment. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters ServerVulnerabilityAssessment) (result ServerVulnerabilityAssessment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ServerVulnerabilityAssessmentProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ServerVulnerabilityAssessmentProperties.StorageContainerPath", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters ServerVulnerabilityAssessment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", 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 WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerVulnerabilityAssessment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete remove workspace managed sql server's vulnerability assessment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", 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 WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get workspace managed sql server's vulnerability assessment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerVulnerabilityAssessment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vulnerabilityAssessmentName": autorest.Encode("path", "default"), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", 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 WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result ServerVulnerabilityAssessment, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the vulnerability assessment policies associated with a workspace managed sql server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerVulnerabilityAssessmentListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.List") + defer func() { + sc := -1 + if result.svalr.Response.Response != nil { + sc = result.svalr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.svalr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "List", resp, "Failure sending request") + return + } + + result.svalr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "List", resp, "Failure responding to request") + return + } + if result.svalr.hasNextLink() && result.svalr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments", 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 WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) ListResponder(resp *http.Response) (result ServerVulnerabilityAssessmentListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) listNextResults(ctx context.Context, lastResults ServerVulnerabilityAssessmentListResult) (result ServerVulnerabilityAssessmentListResult, err error) { + req, err := lastResults.serverVulnerabilityAssessmentListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "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, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result ServerVulnerabilityAssessmentListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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, workspaceName) + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaces.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaces.go new file mode 100644 index 000000000000..4fdcb378a824 --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspaces.go @@ -0,0 +1,628 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspacesClient is the azure Synapse Analytics Management Client +type WorkspacesClient struct { + BaseClient +} + +// NewWorkspacesClient creates an instance of the WorkspacesClient client. +func NewWorkspacesClient(subscriptionID string) WorkspacesClient { + return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) WorkspacesClient { + return WorkspacesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// workspaceInfo - workspace create or update request properties +func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspaceInfo Workspace) (result WorkspacesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspacesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, workspaceInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, workspaceInfo Workspace) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}", pathParameters), + autorest.WithJSON(workspaceInfo), + 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 WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (result Workspace, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspacesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspacesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkspacesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}", 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 WorkspacesClient) DeleteSender(req *http.Request) (future WorkspacesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspacesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspacesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}", 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 WorkspacesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) GetResponder(resp *http.Response) (result Workspace, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns a list of workspaces in a subscription +func (client WorkspacesClient) List(ctx context.Context) (result WorkspaceInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.List") + defer func() { + sc := -1 + if result.wilr.Response.Response != nil { + sc = result.wilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("synapse.WorkspacesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "List", resp, "Failure sending request") + return + } + + result.wilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "List", resp, "Failure responding to request") + return + } + if result.wilr.hasNextLink() && result.wilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkspacesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/workspaces", 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 WorkspacesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) ListResponder(resp *http.Response) (result WorkspaceInfoListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspacesClient) listNextResults(ctx context.Context, lastResults WorkspaceInfoListResult) (result WorkspaceInfoListResult, err error) { + req, err := lastResults.workspaceInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "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, "synapse.WorkspacesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspacesClient) ListComplete(ctx context.Context) (result WorkspaceInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.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 returns a list of workspaces in a resource group +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +func (client WorkspacesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result WorkspaceInfoListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.wilr.Response.Response != nil { + sc = result.wilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspacesClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.wilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.wilr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.wilr.hasNextLink() && result.wilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client WorkspacesClient) 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 = "2021-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.Synapse/workspaces", 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 WorkspacesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) ListByResourceGroupResponder(resp *http.Response) (result WorkspaceInfoListResult, err error) { + err = autorest.Respond( + resp, + 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 WorkspacesClient) listByResourceGroupNextResults(ctx context.Context, lastResults WorkspaceInfoListResult) (result WorkspaceInfoListResult, err error) { + req, err := lastResults.workspaceInfoListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "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, "synapse.WorkspacesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result WorkspaceInfoListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.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 a workspace +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// workspacePatchInfo - workspace patch request properties +func (client WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchInfo WorkspacePatchInfo) (result WorkspacesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspacesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, workspacePatchInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspacesClient", "Update", nil, "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client WorkspacesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchInfo WorkspacePatchInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}", pathParameters), + autorest.WithJSON(workspacePatchInfo), + 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 WorkspacesClient) UpdateSender(req *http.Request) (future WorkspacesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) UpdateResponder(resp *http.Response) (result Workspace, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacesqlaadadmins.go b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacesqlaadadmins.go new file mode 100644 index 000000000000..0a871f3c0a0f --- /dev/null +++ b/services/preview/synapse/mgmt/2021-06-01-preview/synapse/workspacesqlaadadmins.go @@ -0,0 +1,294 @@ +package synapse + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// WorkspaceSQLAadAdminsClient is the azure Synapse Analytics Management Client +type WorkspaceSQLAadAdminsClient struct { + BaseClient +} + +// NewWorkspaceSQLAadAdminsClient creates an instance of the WorkspaceSQLAadAdminsClient client. +func NewWorkspaceSQLAadAdminsClient(subscriptionID string) WorkspaceSQLAadAdminsClient { + return NewWorkspaceSQLAadAdminsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkspaceSQLAadAdminsClientWithBaseURI creates an instance of the WorkspaceSQLAadAdminsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewWorkspaceSQLAadAdminsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceSQLAadAdminsClient { + return WorkspaceSQLAadAdminsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a workspace SQL active directory admin +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +// aadAdminInfo - workspace active directory administrator properties +func (client WorkspaceSQLAadAdminsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAadAdminInfo) (result WorkspaceSQLAadAdminsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSQLAadAdminsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceSQLAadAdminsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, aadAdminInfo) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "CreateOrUpdate", nil, "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkspaceSQLAadAdminsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAadAdminInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory", pathParameters), + autorest.WithJSON(aadAdminInfo), + 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 WorkspaceSQLAadAdminsClient) CreateOrUpdateSender(req *http.Request) (future WorkspaceSQLAadAdminsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkspaceSQLAadAdminsClient) CreateOrUpdateResponder(resp *http.Response) (result WorkspaceAadAdminInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a workspace SQL active directory admin +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceSQLAadAdminsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceSQLAadAdminsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSQLAadAdminsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceSQLAadAdminsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "Delete", nil, "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkspaceSQLAadAdminsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory", 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 WorkspaceSQLAadAdminsClient) DeleteSender(req *http.Request) (future WorkspaceSQLAadAdminsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkspaceSQLAadAdminsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a workspace SQL active directory admin +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// workspaceName - the name of the workspace +func (client WorkspaceSQLAadAdminsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceAadAdminInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSQLAadAdminsClient.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, 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}}}}); err != nil { + return result, validation.NewError("synapse.WorkspaceSQLAadAdminsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkspaceSQLAadAdminsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2021-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.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory", 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 WorkspaceSQLAadAdminsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkspaceSQLAadAdminsClient) GetResponder(resp *http.Response) (result WorkspaceAadAdminInfo, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/CHANGELOG.md b/services/securityinsight/mgmt/v1.0/securityinsight/CHANGELOG.md deleted file mode 100644 index 3c456b5cf1f0..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/CHANGELOG.md +++ /dev/null @@ -1,11 +0,0 @@ -# Change History - -## Additive Changes - -### New Funcs - -1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) -1. ErrorResponse.MarshalJSON() ([]byte, error) -1. IncidentAdditionalData.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. ThreatIntelligence.MarshalJSON() ([]byte, error) diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/_meta.json b/services/securityinsight/mgmt/v1.0/securityinsight/_meta.json deleted file mode 100644 index 99958e37d6bc..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/securityinsights/resource-manager/readme.md", - "tag": "package-composite-v1", - "use": "@microsoft.azure/autorest.go@2.1.183", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-composite-v1 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/securityinsights/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/actions.go b/services/securityinsight/mgmt/v1.0/securityinsight/actions.go deleted file mode 100644 index 5b74f3961382..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/actions.go +++ /dev/null @@ -1,166 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// ActionsClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type ActionsClient struct { - BaseClient -} - -// NewActionsClient creates an instance of the ActionsClient client. -func NewActionsClient(subscriptionID string) ActionsClient { - return NewActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewActionsClientWithBaseURI creates an instance of the ActionsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewActionsClientWithBaseURI(baseURI string, subscriptionID string) ActionsClient { - return ActionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByAlertRule gets all actions of alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -func (client ActionsClient) ListByAlertRule(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result ActionsListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ActionsClient.ListByAlertRule") - defer func() { - sc := -1 - if result.al.Response.Response != nil { - sc = result.al.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.ActionsClient", "ListByAlertRule", err.Error()) - } - - result.fn = client.listByAlertRuleNextResults - req, err := client.ListByAlertRulePreparer(ctx, resourceGroupName, workspaceName, ruleID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.ActionsClient", "ListByAlertRule", nil, "Failure preparing request") - return - } - - resp, err := client.ListByAlertRuleSender(req) - if err != nil { - result.al.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.ActionsClient", "ListByAlertRule", resp, "Failure sending request") - return - } - - result.al, err = client.ListByAlertRuleResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.ActionsClient", "ListByAlertRule", resp, "Failure responding to request") - return - } - if result.al.hasNextLink() && result.al.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByAlertRulePreparer prepares the ListByAlertRule request. -func (client ActionsClient) ListByAlertRulePreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByAlertRuleSender sends the ListByAlertRule request. The method will close the -// http.Response Body if it receives an error. -func (client ActionsClient) ListByAlertRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByAlertRuleResponder handles the response to the ListByAlertRule request. The method always -// closes the http.Response Body. -func (client ActionsClient) ListByAlertRuleResponder(resp *http.Response) (result ActionsList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByAlertRuleNextResults retrieves the next set of results, if any. -func (client ActionsClient) listByAlertRuleNextResults(ctx context.Context, lastResults ActionsList) (result ActionsList, err error) { - req, err := lastResults.actionsListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.ActionsClient", "listByAlertRuleNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByAlertRuleSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "securityinsight.ActionsClient", "listByAlertRuleNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByAlertRuleResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.ActionsClient", "listByAlertRuleNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByAlertRuleComplete enumerates all values, automatically crossing page boundaries as required. -func (client ActionsClient) ListByAlertRuleComplete(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result ActionsListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ActionsClient.ListByAlertRule") - 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.ListByAlertRule(ctx, resourceGroupName, workspaceName, ruleID) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/alertrules.go b/services/securityinsight/mgmt/v1.0/securityinsight/alertrules.go deleted file mode 100644 index b6e576e71a3e..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/alertrules.go +++ /dev/null @@ -1,726 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// AlertRulesClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type AlertRulesClient struct { - BaseClient -} - -// NewAlertRulesClient creates an instance of the AlertRulesClient client. -func NewAlertRulesClient(subscriptionID string) AlertRulesClient { - return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) AlertRulesClient { - return AlertRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -// alertRule - the alert rule -func (client AlertRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, alertRule BasicAlertRule) (result AlertRuleModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, ruleID, alertRule) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AlertRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, alertRule BasicAlertRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", pathParameters), - autorest.WithJSON(alertRule), - 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 AlertRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) CreateOrUpdateResponder(resp *http.Response) (result AlertRuleModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdateAction creates or updates the action of alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -// actionID - action ID -// action - the action -func (client AlertRulesClient) CreateOrUpdateAction(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string, action ActionRequest) (result ActionResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.CreateOrUpdateAction") - 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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "CreateOrUpdateAction", err.Error()) - } - - req, err := client.CreateOrUpdateActionPreparer(ctx, resourceGroupName, workspaceName, ruleID, actionID, action) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "CreateOrUpdateAction", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateActionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "CreateOrUpdateAction", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateActionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "CreateOrUpdateAction", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdateActionPreparer prepares the CreateOrUpdateAction request. -func (client AlertRulesClient) CreateOrUpdateActionPreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string, action ActionRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionId": autorest.Encode("path", actionID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", pathParameters), - autorest.WithJSON(action), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateActionSender sends the CreateOrUpdateAction request. The method will close the -// http.Response Body if it receives an error. -func (client AlertRulesClient) CreateOrUpdateActionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateActionResponder handles the response to the CreateOrUpdateAction request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) CreateOrUpdateActionResponder(resp *http.Response) (result ActionResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete the alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -func (client AlertRulesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, ruleID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client AlertRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", 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 AlertRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DeleteAction delete the action of alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -// actionID - action ID -func (client AlertRulesClient) DeleteAction(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.DeleteAction") - 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "DeleteAction", err.Error()) - } - - req, err := client.DeleteActionPreparer(ctx, resourceGroupName, workspaceName, ruleID, actionID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "DeleteAction", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteActionSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "DeleteAction", resp, "Failure sending request") - return - } - - result, err = client.DeleteActionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "DeleteAction", resp, "Failure responding to request") - return - } - - return -} - -// DeleteActionPreparer prepares the DeleteAction request. -func (client AlertRulesClient) DeleteActionPreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionId": autorest.Encode("path", actionID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteActionSender sends the DeleteAction request. The method will close the -// http.Response Body if it receives an error. -func (client AlertRulesClient) DeleteActionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteActionResponder handles the response to the DeleteAction request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) DeleteActionResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -func (client AlertRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result AlertRuleModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, ruleID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AlertRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", 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 AlertRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) GetResponder(resp *http.Response) (result AlertRuleModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetAction gets the action of alert rule. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// ruleID - alert rule ID -// actionID - action ID -func (client AlertRulesClient) GetAction(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string) (result ActionResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.GetAction") - 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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "GetAction", err.Error()) - } - - req, err := client.GetActionPreparer(ctx, resourceGroupName, workspaceName, ruleID, actionID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "GetAction", nil, "Failure preparing request") - return - } - - resp, err := client.GetActionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "GetAction", resp, "Failure sending request") - return - } - - result, err = client.GetActionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "GetAction", resp, "Failure responding to request") - return - } - - return -} - -// GetActionPreparer prepares the GetAction request. -func (client AlertRulesClient) GetActionPreparer(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionId": autorest.Encode("path", actionID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleId": autorest.Encode("path", ruleID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetActionSender sends the GetAction request. The method will close the -// http.Response Body if it receives an error. -func (client AlertRulesClient) GetActionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetActionResponder handles the response to the GetAction request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) GetActionResponder(resp *http.Response) (result ActionResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all alert rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -func (client AlertRulesClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result AlertRulesListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.List") - defer func() { - sc := -1 - if result.arl.Response.Response != nil { - sc = result.arl.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRulesClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.arl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "List", resp, "Failure sending request") - return - } - - result.arl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "List", resp, "Failure responding to request") - return - } - if result.arl.hasNextLink() && result.arl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client AlertRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules", 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 AlertRulesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client AlertRulesClient) ListResponder(resp *http.Response) (result AlertRulesList, err error) { - err = autorest.Respond( - resp, - 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 AlertRulesClient) listNextResults(ctx context.Context, lastResults AlertRulesList) (result AlertRulesList, err error) { - req, err := lastResults.alertRulesListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "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, "securityinsight.AlertRulesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRulesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AlertRulesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result AlertRulesListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.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, workspaceName) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/alertruletemplates.go b/services/securityinsight/mgmt/v1.0/securityinsight/alertruletemplates.go deleted file mode 100644 index 4c7197f654c0..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/alertruletemplates.go +++ /dev/null @@ -1,257 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// AlertRuleTemplatesClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type AlertRuleTemplatesClient struct { - BaseClient -} - -// NewAlertRuleTemplatesClient creates an instance of the AlertRuleTemplatesClient client. -func NewAlertRuleTemplatesClient(subscriptionID string) AlertRuleTemplatesClient { - return NewAlertRuleTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAlertRuleTemplatesClientWithBaseURI creates an instance of the AlertRuleTemplatesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewAlertRuleTemplatesClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleTemplatesClient { - return AlertRuleTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the alert rule template. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// alertRuleTemplateID - alert rule template ID -func (client AlertRuleTemplatesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, alertRuleTemplateID string) (result AlertRuleTemplateModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleTemplatesClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRuleTemplatesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, alertRuleTemplateID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AlertRuleTemplatesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, alertRuleTemplateID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "alertRuleTemplateId": autorest.Encode("path", alertRuleTemplateID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates/{alertRuleTemplateId}", 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 AlertRuleTemplatesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client AlertRuleTemplatesClient) GetResponder(resp *http.Response) (result AlertRuleTemplateModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all alert rule templates. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -func (client AlertRuleTemplatesClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result AlertRuleTemplatesListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleTemplatesClient.List") - defer func() { - sc := -1 - if result.artl.Response.Response != nil { - sc = result.artl.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.AlertRuleTemplatesClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.artl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "List", resp, "Failure sending request") - return - } - - result.artl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "List", resp, "Failure responding to request") - return - } - if result.artl.hasNextLink() && result.artl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client AlertRuleTemplatesClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates", 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 AlertRuleTemplatesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client AlertRuleTemplatesClient) ListResponder(resp *http.Response) (result AlertRuleTemplatesList, err error) { - err = autorest.Respond( - resp, - 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 AlertRuleTemplatesClient) listNextResults(ctx context.Context, lastResults AlertRuleTemplatesList) (result AlertRuleTemplatesList, err error) { - req, err := lastResults.alertRuleTemplatesListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "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, "securityinsight.AlertRuleTemplatesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.AlertRuleTemplatesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AlertRuleTemplatesClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result AlertRuleTemplatesListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleTemplatesClient.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, workspaceName) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/bookmarks.go b/services/securityinsight/mgmt/v1.0/securityinsight/bookmarks.go deleted file mode 100644 index 728bb17218d2..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/bookmarks.go +++ /dev/null @@ -1,456 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// BookmarksClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type BookmarksClient struct { - BaseClient -} - -// NewBookmarksClient creates an instance of the BookmarksClient client. -func NewBookmarksClient(subscriptionID string) BookmarksClient { - return NewBookmarksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBookmarksClientWithBaseURI creates an instance of the BookmarksClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewBookmarksClientWithBaseURI(baseURI string, subscriptionID string) BookmarksClient { - return BookmarksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the bookmark. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// bookmarkID - bookmark ID -// bookmark - the bookmark -func (client BookmarksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, bookmark Bookmark) (result Bookmark, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarksClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: bookmark, - Constraints: []validation.Constraint{{Target: "bookmark.BookmarkProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "bookmark.BookmarkProperties.CreatedBy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "bookmark.BookmarkProperties.CreatedBy.ObjectID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "bookmark.BookmarkProperties.DisplayName", Name: validation.Null, Rule: true, Chain: nil}, - {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()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, bookmarkID, bookmark) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BookmarksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, bookmark Bookmark) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bookmarkId": autorest.Encode("path", bookmarkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}", pathParameters), - autorest.WithJSON(bookmark), - 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 BookmarksClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client BookmarksClient) CreateOrUpdateResponder(resp *http.Response) (result Bookmark, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete the bookmark. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// bookmarkID - bookmark ID -func (client BookmarksClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarksClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.BookmarksClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, bookmarkID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client BookmarksClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bookmarkId": autorest.Encode("path", bookmarkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}", 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 BookmarksClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client BookmarksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a bookmark. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// bookmarkID - bookmark ID -func (client BookmarksClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string) (result Bookmark, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarksClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.BookmarksClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, bookmarkID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client BookmarksClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bookmarkId": autorest.Encode("path", bookmarkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}", 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 BookmarksClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client BookmarksClient) GetResponder(resp *http.Response) (result Bookmark, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all bookmarks. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -func (client BookmarksClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result BookmarkListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarksClient.List") - defer func() { - sc := -1 - if result.bl.Response.Response != nil { - sc = result.bl.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.BookmarksClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.bl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "List", resp, "Failure sending request") - return - } - - result.bl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "List", resp, "Failure responding to request") - return - } - if result.bl.hasNextLink() && result.bl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client BookmarksClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks", 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 BookmarksClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client BookmarksClient) ListResponder(resp *http.Response) (result BookmarkList, err error) { - err = autorest.Respond( - resp, - 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 BookmarksClient) listNextResults(ctx context.Context, lastResults BookmarkList) (result BookmarkList, err error) { - req, err := lastResults.bookmarkListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "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, "securityinsight.BookmarksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.BookmarksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BookmarksClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result BookmarkListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarksClient.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, workspaceName) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/dataconnectors.go b/services/securityinsight/mgmt/v1.0/securityinsight/dataconnectors.go deleted file mode 100644 index 2ee07fbf35ff..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/dataconnectors.go +++ /dev/null @@ -1,442 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// DataConnectorsClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type DataConnectorsClient struct { - BaseClient -} - -// NewDataConnectorsClient creates an instance of the DataConnectorsClient client. -func NewDataConnectorsClient(subscriptionID string) DataConnectorsClient { - return NewDataConnectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDataConnectorsClientWithBaseURI creates an instance of the DataConnectorsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDataConnectorsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectorsClient { - return DataConnectorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the data connector. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// dataConnectorID - connector ID -// dataConnector - the data connector -func (client DataConnectorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, dataConnector BasicDataConnector) (result DataConnectorModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.DataConnectorsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, dataConnectorID, dataConnector) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DataConnectorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, dataConnector BasicDataConnector) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dataConnectorId": autorest.Encode("path", dataConnectorID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}", pathParameters), - autorest.WithJSON(dataConnector), - 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 DataConnectorsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DataConnectorsClient) CreateOrUpdateResponder(resp *http.Response) (result DataConnectorModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete the data connector. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// dataConnectorID - connector ID -func (client DataConnectorsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.DataConnectorsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, dataConnectorID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DataConnectorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dataConnectorId": autorest.Encode("path", dataConnectorID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}", 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 DataConnectorsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DataConnectorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a data connector. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// dataConnectorID - connector ID -func (client DataConnectorsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string) (result DataConnectorModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.DataConnectorsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, dataConnectorID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DataConnectorsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "dataConnectorId": autorest.Encode("path", dataConnectorID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}", 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 DataConnectorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DataConnectorsClient) GetResponder(resp *http.Response) (result DataConnectorModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all data connectors. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -func (client DataConnectorsClient) List(ctx context.Context, resourceGroupName string, workspaceName string) (result DataConnectorListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorsClient.List") - defer func() { - sc := -1 - if result.dcl.Response.Response != nil { - sc = result.dcl.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.DataConnectorsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.dcl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "List", resp, "Failure sending request") - return - } - - result.dcl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "List", resp, "Failure responding to request") - return - } - if result.dcl.hasNextLink() && result.dcl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client DataConnectorsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors", 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 DataConnectorsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client DataConnectorsClient) ListResponder(resp *http.Response) (result DataConnectorList, err error) { - err = autorest.Respond( - resp, - 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 DataConnectorsClient) listNextResults(ctx context.Context, lastResults DataConnectorList) (result DataConnectorList, err error) { - req, err := lastResults.dataConnectorListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "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, "securityinsight.DataConnectorsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.DataConnectorsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DataConnectorsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result DataConnectorListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorsClient.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, workspaceName) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/enums.go b/services/securityinsight/mgmt/v1.0/securityinsight/enums.go deleted file mode 100644 index 7cff6198a975..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/enums.go +++ /dev/null @@ -1,416 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// AlertRuleKind enumerates the values for alert rule kind. -type AlertRuleKind string - -const ( - // Fusion ... - Fusion AlertRuleKind = "Fusion" - // MicrosoftSecurityIncidentCreation ... - MicrosoftSecurityIncidentCreation AlertRuleKind = "MicrosoftSecurityIncidentCreation" - // Scheduled ... - Scheduled AlertRuleKind = "Scheduled" -) - -// PossibleAlertRuleKindValues returns an array of possible values for the AlertRuleKind const type. -func PossibleAlertRuleKindValues() []AlertRuleKind { - return []AlertRuleKind{Fusion, MicrosoftSecurityIncidentCreation, Scheduled} -} - -// AlertSeverity enumerates the values for alert severity. -type AlertSeverity string - -const ( - // High High severity - High AlertSeverity = "High" - // Informational Informational severity - Informational AlertSeverity = "Informational" - // Low Low severity - Low AlertSeverity = "Low" - // Medium Medium severity - Medium AlertSeverity = "Medium" -) - -// PossibleAlertSeverityValues returns an array of possible values for the AlertSeverity const type. -func PossibleAlertSeverityValues() []AlertSeverity { - return []AlertSeverity{High, Informational, Low, Medium} -} - -// AttackTactic enumerates the values for attack tactic. -type AttackTactic string - -const ( - // Collection ... - Collection AttackTactic = "Collection" - // CommandAndControl ... - CommandAndControl AttackTactic = "CommandAndControl" - // CredentialAccess ... - CredentialAccess AttackTactic = "CredentialAccess" - // DefenseEvasion ... - DefenseEvasion AttackTactic = "DefenseEvasion" - // Discovery ... - Discovery AttackTactic = "Discovery" - // Execution ... - Execution AttackTactic = "Execution" - // Exfiltration ... - Exfiltration AttackTactic = "Exfiltration" - // Impact ... - Impact AttackTactic = "Impact" - // InitialAccess ... - InitialAccess AttackTactic = "InitialAccess" - // LateralMovement ... - LateralMovement AttackTactic = "LateralMovement" - // Persistence ... - Persistence AttackTactic = "Persistence" - // PrivilegeEscalation ... - PrivilegeEscalation AttackTactic = "PrivilegeEscalation" -) - -// PossibleAttackTacticValues returns an array of possible values for the AttackTactic const type. -func PossibleAttackTacticValues() []AttackTactic { - return []AttackTactic{Collection, CommandAndControl, CredentialAccess, DefenseEvasion, Discovery, Execution, Exfiltration, Impact, InitialAccess, LateralMovement, Persistence, PrivilegeEscalation} -} - -// CaseSeverity enumerates the values for case severity. -type CaseSeverity string - -const ( - // CaseSeverityCritical Critical severity - CaseSeverityCritical CaseSeverity = "Critical" - // CaseSeverityHigh High severity - CaseSeverityHigh CaseSeverity = "High" - // CaseSeverityInformational Informational severity - CaseSeverityInformational CaseSeverity = "Informational" - // CaseSeverityLow Low severity - CaseSeverityLow CaseSeverity = "Low" - // CaseSeverityMedium Medium severity - CaseSeverityMedium CaseSeverity = "Medium" -) - -// PossibleCaseSeverityValues returns an array of possible values for the CaseSeverity const type. -func PossibleCaseSeverityValues() []CaseSeverity { - return []CaseSeverity{CaseSeverityCritical, CaseSeverityHigh, CaseSeverityInformational, CaseSeverityLow, CaseSeverityMedium} -} - -// DataConnectorKind enumerates the values for data connector kind. -type DataConnectorKind string - -const ( - // DataConnectorKindAmazonWebServicesCloudTrail ... - DataConnectorKindAmazonWebServicesCloudTrail DataConnectorKind = "AmazonWebServicesCloudTrail" - // DataConnectorKindAzureActiveDirectory ... - DataConnectorKindAzureActiveDirectory DataConnectorKind = "AzureActiveDirectory" - // DataConnectorKindAzureAdvancedThreatProtection ... - DataConnectorKindAzureAdvancedThreatProtection DataConnectorKind = "AzureAdvancedThreatProtection" - // DataConnectorKindAzureSecurityCenter ... - DataConnectorKindAzureSecurityCenter DataConnectorKind = "AzureSecurityCenter" - // DataConnectorKindMicrosoftCloudAppSecurity ... - DataConnectorKindMicrosoftCloudAppSecurity DataConnectorKind = "MicrosoftCloudAppSecurity" - // DataConnectorKindMicrosoftDefenderAdvancedThreatProtection ... - DataConnectorKindMicrosoftDefenderAdvancedThreatProtection DataConnectorKind = "MicrosoftDefenderAdvancedThreatProtection" - // DataConnectorKindOffice365 ... - DataConnectorKindOffice365 DataConnectorKind = "Office365" - // DataConnectorKindThreatIntelligence ... - DataConnectorKindThreatIntelligence DataConnectorKind = "ThreatIntelligence" -) - -// PossibleDataConnectorKindValues returns an array of possible values for the DataConnectorKind const type. -func PossibleDataConnectorKindValues() []DataConnectorKind { - return []DataConnectorKind{DataConnectorKindAmazonWebServicesCloudTrail, DataConnectorKindAzureActiveDirectory, DataConnectorKindAzureAdvancedThreatProtection, DataConnectorKindAzureSecurityCenter, DataConnectorKindMicrosoftCloudAppSecurity, DataConnectorKindMicrosoftDefenderAdvancedThreatProtection, DataConnectorKindOffice365, DataConnectorKindThreatIntelligence} -} - -// DataTypeState enumerates the values for data type state. -type DataTypeState string - -const ( - // Disabled ... - Disabled DataTypeState = "Disabled" - // Enabled ... - Enabled DataTypeState = "Enabled" -) - -// PossibleDataTypeStateValues returns an array of possible values for the DataTypeState const type. -func PossibleDataTypeStateValues() []DataTypeState { - return []DataTypeState{Disabled, Enabled} -} - -// IncidentClassification enumerates the values for incident classification. -type IncidentClassification string - -const ( - // BenignPositive Incident was benign positive - BenignPositive IncidentClassification = "BenignPositive" - // FalsePositive Incident was false positive - FalsePositive IncidentClassification = "FalsePositive" - // TruePositive Incident was true positive - TruePositive IncidentClassification = "TruePositive" - // Undetermined Incident classification was undetermined - Undetermined IncidentClassification = "Undetermined" -) - -// PossibleIncidentClassificationValues returns an array of possible values for the IncidentClassification const type. -func PossibleIncidentClassificationValues() []IncidentClassification { - return []IncidentClassification{BenignPositive, FalsePositive, TruePositive, Undetermined} -} - -// IncidentClassificationReason enumerates the values for incident classification reason. -type IncidentClassificationReason string - -const ( - // InaccurateData Classification reason was inaccurate data - InaccurateData IncidentClassificationReason = "InaccurateData" - // IncorrectAlertLogic Classification reason was incorrect alert logic - IncorrectAlertLogic IncidentClassificationReason = "IncorrectAlertLogic" - // SuspiciousActivity Classification reason was suspicious activity - SuspiciousActivity IncidentClassificationReason = "SuspiciousActivity" - // SuspiciousButExpected Classification reason was suspicious but expected - SuspiciousButExpected IncidentClassificationReason = "SuspiciousButExpected" -) - -// PossibleIncidentClassificationReasonValues returns an array of possible values for the IncidentClassificationReason const type. -func PossibleIncidentClassificationReasonValues() []IncidentClassificationReason { - return []IncidentClassificationReason{InaccurateData, IncorrectAlertLogic, SuspiciousActivity, SuspiciousButExpected} -} - -// IncidentLabelType enumerates the values for incident label type. -type IncidentLabelType string - -const ( - // System Label automatically created by the system - System IncidentLabelType = "System" - // User Label manually created by a user - User IncidentLabelType = "User" -) - -// PossibleIncidentLabelTypeValues returns an array of possible values for the IncidentLabelType const type. -func PossibleIncidentLabelTypeValues() []IncidentLabelType { - return []IncidentLabelType{System, User} -} - -// IncidentSeverity enumerates the values for incident severity. -type IncidentSeverity string - -const ( - // 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{IncidentSeverityHigh, IncidentSeverityInformational, IncidentSeverityLow, IncidentSeverityMedium} -} - -// IncidentStatus enumerates the values for incident status. -type IncidentStatus string - -const ( - // IncidentStatusActive An active incident which is being handled - IncidentStatusActive IncidentStatus = "Active" - // IncidentStatusClosed A non-active incident - IncidentStatusClosed IncidentStatus = "Closed" - // IncidentStatusNew An active incident which isn't being handled currently - IncidentStatusNew IncidentStatus = "New" -) - -// PossibleIncidentStatusValues returns an array of possible values for the IncidentStatus const type. -func PossibleIncidentStatusValues() []IncidentStatus { - return []IncidentStatus{IncidentStatusActive, IncidentStatusClosed, IncidentStatusNew} -} - -// Kind enumerates the values for kind. -type Kind string - -const ( - // KindAlertRule ... - KindAlertRule Kind = "AlertRule" - // KindFusion ... - KindFusion Kind = "Fusion" - // KindMicrosoftSecurityIncidentCreation ... - KindMicrosoftSecurityIncidentCreation Kind = "MicrosoftSecurityIncidentCreation" - // KindScheduled ... - KindScheduled Kind = "Scheduled" -) - -// PossibleKindValues returns an array of possible values for the Kind const type. -func PossibleKindValues() []Kind { - return []Kind{KindAlertRule, KindFusion, KindMicrosoftSecurityIncidentCreation, KindScheduled} -} - -// KindBasicAlertRuleTemplate enumerates the values for kind basic alert rule template. -type KindBasicAlertRuleTemplate string - -const ( - // KindBasicAlertRuleTemplateKindAlertRuleTemplate ... - KindBasicAlertRuleTemplateKindAlertRuleTemplate KindBasicAlertRuleTemplate = "AlertRuleTemplate" - // KindBasicAlertRuleTemplateKindFusion ... - KindBasicAlertRuleTemplateKindFusion KindBasicAlertRuleTemplate = "Fusion" - // KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation ... - KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation KindBasicAlertRuleTemplate = "MicrosoftSecurityIncidentCreation" - // KindBasicAlertRuleTemplateKindScheduled ... - KindBasicAlertRuleTemplateKindScheduled KindBasicAlertRuleTemplate = "Scheduled" -) - -// PossibleKindBasicAlertRuleTemplateValues returns an array of possible values for the KindBasicAlertRuleTemplate const type. -func PossibleKindBasicAlertRuleTemplateValues() []KindBasicAlertRuleTemplate { - return []KindBasicAlertRuleTemplate{KindBasicAlertRuleTemplateKindAlertRuleTemplate, KindBasicAlertRuleTemplateKindFusion, KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation, KindBasicAlertRuleTemplateKindScheduled} -} - -// KindBasicDataConnector enumerates the values for kind basic data connector. -type KindBasicDataConnector string - -const ( - // KindAmazonWebServicesCloudTrail ... - KindAmazonWebServicesCloudTrail KindBasicDataConnector = "AmazonWebServicesCloudTrail" - // KindAzureActiveDirectory ... - KindAzureActiveDirectory KindBasicDataConnector = "AzureActiveDirectory" - // KindAzureAdvancedThreatProtection ... - KindAzureAdvancedThreatProtection KindBasicDataConnector = "AzureAdvancedThreatProtection" - // KindAzureSecurityCenter ... - KindAzureSecurityCenter KindBasicDataConnector = "AzureSecurityCenter" - // KindDataConnector ... - KindDataConnector KindBasicDataConnector = "DataConnector" - // KindMicrosoftCloudAppSecurity ... - KindMicrosoftCloudAppSecurity KindBasicDataConnector = "MicrosoftCloudAppSecurity" - // KindMicrosoftDefenderAdvancedThreatProtection ... - KindMicrosoftDefenderAdvancedThreatProtection KindBasicDataConnector = "MicrosoftDefenderAdvancedThreatProtection" - // KindOffice365 ... - KindOffice365 KindBasicDataConnector = "Office365" - // KindThreatIntelligence ... - KindThreatIntelligence KindBasicDataConnector = "ThreatIntelligence" -) - -// PossibleKindBasicDataConnectorValues returns an array of possible values for the KindBasicDataConnector const type. -func PossibleKindBasicDataConnectorValues() []KindBasicDataConnector { - return []KindBasicDataConnector{KindAmazonWebServicesCloudTrail, KindAzureActiveDirectory, KindAzureAdvancedThreatProtection, KindAzureSecurityCenter, KindDataConnector, KindMicrosoftCloudAppSecurity, KindMicrosoftDefenderAdvancedThreatProtection, KindOffice365, KindThreatIntelligence} -} - -// KindBasicSettings enumerates the values for kind basic settings. -type KindBasicSettings string - -const ( - // KindSettings ... - KindSettings KindBasicSettings = "Settings" - // KindToggleSettings ... - KindToggleSettings KindBasicSettings = "ToggleSettings" - // KindUebaSettings ... - KindUebaSettings KindBasicSettings = "UebaSettings" -) - -// PossibleKindBasicSettingsValues returns an array of possible values for the KindBasicSettings const type. -func PossibleKindBasicSettingsValues() []KindBasicSettings { - return []KindBasicSettings{KindSettings, KindToggleSettings, KindUebaSettings} -} - -// LicenseStatus enumerates the values for license status. -type LicenseStatus string - -const ( - // LicenseStatusDisabled ... - LicenseStatusDisabled LicenseStatus = "Disabled" - // LicenseStatusEnabled ... - LicenseStatusEnabled LicenseStatus = "Enabled" -) - -// PossibleLicenseStatusValues returns an array of possible values for the LicenseStatus const type. -func PossibleLicenseStatusValues() []LicenseStatus { - return []LicenseStatus{LicenseStatusDisabled, LicenseStatusEnabled} -} - -// MicrosoftSecurityProductName enumerates the values for microsoft security product name. -type MicrosoftSecurityProductName string - -const ( - // AzureActiveDirectoryIdentityProtection ... - AzureActiveDirectoryIdentityProtection MicrosoftSecurityProductName = "Azure Active Directory Identity Protection" - // AzureAdvancedThreatProtection ... - AzureAdvancedThreatProtection MicrosoftSecurityProductName = "Azure Advanced Threat Protection" - // AzureSecurityCenter ... - AzureSecurityCenter MicrosoftSecurityProductName = "Azure Security Center" - // AzureSecurityCenterforIoT ... - AzureSecurityCenterforIoT MicrosoftSecurityProductName = "Azure Security Center for IoT" - // MicrosoftCloudAppSecurity ... - MicrosoftCloudAppSecurity MicrosoftSecurityProductName = "Microsoft Cloud App Security" -) - -// PossibleMicrosoftSecurityProductNameValues returns an array of possible values for the MicrosoftSecurityProductName const type. -func PossibleMicrosoftSecurityProductNameValues() []MicrosoftSecurityProductName { - return []MicrosoftSecurityProductName{AzureActiveDirectoryIdentityProtection, AzureAdvancedThreatProtection, AzureSecurityCenter, AzureSecurityCenterforIoT, MicrosoftCloudAppSecurity} -} - -// SettingKind enumerates the values for setting kind. -type SettingKind string - -const ( - // SettingKindToggleSettings ... - SettingKindToggleSettings SettingKind = "ToggleSettings" - // SettingKindUebaSettings ... - SettingKindUebaSettings SettingKind = "UebaSettings" -) - -// PossibleSettingKindValues returns an array of possible values for the SettingKind const type. -func PossibleSettingKindValues() []SettingKind { - return []SettingKind{SettingKindToggleSettings, SettingKindUebaSettings} -} - -// StatusInMcas enumerates the values for status in mcas. -type StatusInMcas string - -const ( - // StatusInMcasDisabled ... - StatusInMcasDisabled StatusInMcas = "Disabled" - // StatusInMcasEnabled ... - StatusInMcasEnabled StatusInMcas = "Enabled" -) - -// PossibleStatusInMcasValues returns an array of possible values for the StatusInMcas const type. -func PossibleStatusInMcasValues() []StatusInMcas { - return []StatusInMcas{StatusInMcasDisabled, StatusInMcasEnabled} -} - -// TemplateStatus enumerates the values for template status. -type TemplateStatus string - -const ( - // Available Alert rule template is available. - Available TemplateStatus = "Available" - // Installed Alert rule template installed. and can not use more then once - Installed TemplateStatus = "Installed" - // NotAvailable Alert rule template is not available - NotAvailable TemplateStatus = "NotAvailable" -) - -// PossibleTemplateStatusValues returns an array of possible values for the TemplateStatus const type. -func PossibleTemplateStatusValues() []TemplateStatus { - return []TemplateStatus{Available, Installed, NotAvailable} -} - -// TriggerOperator enumerates the values for trigger operator. -type TriggerOperator string - -const ( - // Equal ... - Equal TriggerOperator = "Equal" - // GreaterThan ... - GreaterThan TriggerOperator = "GreaterThan" - // LessThan ... - LessThan TriggerOperator = "LessThan" - // NotEqual ... - NotEqual TriggerOperator = "NotEqual" -) - -// PossibleTriggerOperatorValues returns an array of possible values for the TriggerOperator const type. -func PossibleTriggerOperatorValues() []TriggerOperator { - return []TriggerOperator{Equal, GreaterThan, LessThan, NotEqual} -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/incidentcomments.go b/services/securityinsight/mgmt/v1.0/securityinsight/incidentcomments.go deleted file mode 100644 index 61918707ec45..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/incidentcomments.go +++ /dev/null @@ -1,379 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// IncidentCommentsClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type IncidentCommentsClient struct { - BaseClient -} - -// NewIncidentCommentsClient creates an instance of the IncidentCommentsClient client. -func NewIncidentCommentsClient(subscriptionID string) IncidentCommentsClient { - return NewIncidentCommentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIncidentCommentsClientWithBaseURI creates an instance of the IncidentCommentsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewIncidentCommentsClientWithBaseURI(baseURI string, subscriptionID string) IncidentCommentsClient { - return IncidentCommentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateComment creates the incident comment. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// incidentID - incident ID -// incidentCommentID - incident comment ID -// incidentComment - the incident comment -func (client IncidentCommentsClient) CreateComment(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string, incidentComment IncidentComment) (result IncidentComment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentCommentsClient.CreateComment") - 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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: incidentComment, - Constraints: []validation.Constraint{{Target: "incidentComment.IncidentCommentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "incidentComment.IncidentCommentProperties.Message", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentCommentsClient", "CreateComment", err.Error()) - } - - req, err := client.CreateCommentPreparer(ctx, resourceGroupName, workspaceName, incidentID, incidentCommentID, incidentComment) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "CreateComment", nil, "Failure preparing request") - return - } - - resp, err := client.CreateCommentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "CreateComment", resp, "Failure sending request") - return - } - - result, err = client.CreateCommentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "CreateComment", resp, "Failure responding to request") - return - } - - return -} - -// CreateCommentPreparer prepares the CreateComment request. -func (client IncidentCommentsClient) CreateCommentPreparer(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string, incidentComment IncidentComment) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "incidentCommentId": autorest.Encode("path", incidentCommentID), - "incidentId": autorest.Encode("path", incidentID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}", pathParameters), - autorest.WithJSON(incidentComment), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateCommentSender sends the CreateComment request. The method will close the -// http.Response Body if it receives an error. -func (client IncidentCommentsClient) CreateCommentSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateCommentResponder handles the response to the CreateComment request. The method always -// closes the http.Response Body. -func (client IncidentCommentsClient) CreateCommentResponder(resp *http.Response) (result IncidentComment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets an incident comment. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// incidentID - incident ID -// incidentCommentID - incident comment ID -func (client IncidentCommentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string) (result IncidentComment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentCommentsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentCommentsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, incidentID, incidentCommentID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IncidentCommentsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "incidentCommentId": autorest.Encode("path", incidentCommentID), - "incidentId": autorest.Encode("path", incidentID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}", 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 IncidentCommentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IncidentCommentsClient) GetResponder(resp *http.Response) (result IncidentComment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByIncident gets all incident comments. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// incidentID - incident ID -// filter - filters the results, based on a Boolean condition. Optional. -// orderby - sorts the results. Optional. -// top - returns only the first n results. Optional. -// skipToken - skiptoken is only used if a previous operation returned a partial result. If a previous response -// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that -// specifies a starting point to use for subsequent calls. Optional. -func (client IncidentCommentsClient) ListByIncident(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, filter string, orderby string, top *int32, skipToken string) (result IncidentCommentListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentCommentsClient.ListByIncident") - defer func() { - sc := -1 - if result.icl.Response.Response != nil { - sc = result.icl.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentCommentsClient", "ListByIncident", err.Error()) - } - - result.fn = client.listByIncidentNextResults - req, err := client.ListByIncidentPreparer(ctx, resourceGroupName, workspaceName, incidentID, filter, orderby, top, skipToken) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "ListByIncident", nil, "Failure preparing request") - return - } - - resp, err := client.ListByIncidentSender(req) - if err != nil { - result.icl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "ListByIncident", resp, "Failure sending request") - return - } - - result.icl, err = client.ListByIncidentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "ListByIncident", resp, "Failure responding to request") - return - } - if result.icl.hasNextLink() && result.icl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByIncidentPreparer prepares the ListByIncident request. -func (client IncidentCommentsClient) ListByIncidentPreparer(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, filter string, orderby string, top *int32, skipToken string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "incidentId": autorest.Encode("path", incidentID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(orderby) > 0 { - queryParameters["$orderby"] = autorest.Encode("query", orderby) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - 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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByIncidentSender sends the ListByIncident request. The method will close the -// http.Response Body if it receives an error. -func (client IncidentCommentsClient) ListByIncidentSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByIncidentResponder handles the response to the ListByIncident request. The method always -// closes the http.Response Body. -func (client IncidentCommentsClient) ListByIncidentResponder(resp *http.Response) (result IncidentCommentList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByIncidentNextResults retrieves the next set of results, if any. -func (client IncidentCommentsClient) listByIncidentNextResults(ctx context.Context, lastResults IncidentCommentList) (result IncidentCommentList, err error) { - req, err := lastResults.incidentCommentListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "listByIncidentNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByIncidentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "listByIncidentNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByIncidentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentCommentsClient", "listByIncidentNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByIncidentComplete enumerates all values, automatically crossing page boundaries as required. -func (client IncidentCommentsClient) ListByIncidentComplete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, filter string, orderby string, top *int32, skipToken string) (result IncidentCommentListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentCommentsClient.ListByIncident") - 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.ListByIncident(ctx, resourceGroupName, workspaceName, incidentID, filter, orderby, top, skipToken) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/incidents.go b/services/securityinsight/mgmt/v1.0/securityinsight/incidents.go deleted file mode 100644 index c6d63f07fae7..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/incidents.go +++ /dev/null @@ -1,463 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// IncidentsClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider -type IncidentsClient struct { - BaseClient -} - -// NewIncidentsClient creates an instance of the IncidentsClient client. -func NewIncidentsClient(subscriptionID string) IncidentsClient { - return NewIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIncidentsClientWithBaseURI creates an instance of the IncidentsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIncidentsClientWithBaseURI(baseURI string, subscriptionID string) IncidentsClient { - return IncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the incident. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// incidentID - incident ID -// incident - the incident -func (client IncidentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incident Incident) (result Incident, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: incident, - Constraints: []validation.Constraint{{Target: "incident.IncidentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "incident.IncidentProperties.Title", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, incidentID, incident) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IncidentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incident Incident) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "incidentId": autorest.Encode("path", incidentID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}", pathParameters), - autorest.WithJSON(incident), - 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 IncidentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IncidentsClient) CreateOrUpdateResponder(resp *http.Response) (result Incident, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete the incident. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// incidentID - incident ID -func (client IncidentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, incidentID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IncidentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "incidentId": autorest.Encode("path", incidentID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}", 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 IncidentsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IncidentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an incident. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// incidentID - incident ID -func (client IncidentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string) (result Incident, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentsClient.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: 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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, incidentID) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IncidentsClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "incidentId": autorest.Encode("path", incidentID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}", 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 IncidentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IncidentsClient) GetResponder(resp *http.Response) (result Incident, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all incidents. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// workspaceName - the name of the workspace. -// filter - filters the results, based on a Boolean condition. Optional. -// orderby - sorts the results. Optional. -// top - returns only the first n results. Optional. -// skipToken - skiptoken is only used if a previous operation returned a partial result. If a previous response -// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that -// specifies a starting point to use for subsequent calls. Optional. -func (client IncidentsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (result IncidentListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentsClient.List") - defer func() { - sc := -1 - if result.il.Response.Response != nil { - sc = result.il.Response.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}}}, - {TargetValue: workspaceName, - Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("securityinsight.IncidentsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workspaceName, filter, orderby, top, skipToken) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.il.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "List", resp, "Failure sending request") - return - } - - result.il, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "List", resp, "Failure responding to request") - return - } - if result.il.hasNextLink() && result.il.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IncidentsClient) ListPreparer(ctx context.Context, resourceGroupName string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workspaceName": autorest.Encode("path", workspaceName), - } - - const APIVersion = "2020-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(orderby) > 0 { - queryParameters["$orderby"] = autorest.Encode("query", orderby) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - 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.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents", 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 IncidentsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IncidentsClient) ListResponder(resp *http.Response) (result IncidentList, err error) { - err = autorest.Respond( - resp, - 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 IncidentsClient) listNextResults(ctx context.Context, lastResults IncidentList) (result IncidentList, err error) { - req, err := lastResults.incidentListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "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, "securityinsight.IncidentsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "securityinsight.IncidentsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IncidentsClient) ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (result IncidentListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentsClient.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, workspaceName, filter, orderby, top, skipToken) - return -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/models.go b/services/securityinsight/mgmt/v1.0/securityinsight/models.go deleted file mode 100644 index c803d1a90d2b..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/models.go +++ /dev/null @@ -1,5548 +0,0 @@ -package securityinsight - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" - "github.com/gofrs/uuid" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/securityinsight/mgmt/v1.0/securityinsight" - -// AADDataConnector represents AAD (Azure Active Directory) data connector. -type AADDataConnector struct { - // AADDataConnectorProperties - AAD (Azure Active Directory) data connector properties. - *AADDataConnectorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` -} - -// MarshalJSON is the custom marshaler for AADDataConnector. -func (adc AADDataConnector) MarshalJSON() ([]byte, error) { - adc.Kind = KindAzureActiveDirectory - objectMap := make(map[string]interface{}) - if adc.AADDataConnectorProperties != nil { - objectMap["properties"] = adc.AADDataConnectorProperties - } - if adc.Kind != "" { - objectMap["kind"] = adc.Kind - } - if adc.Etag != nil { - objectMap["etag"] = adc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return &adc, true -} - -// AsAATPDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for AADDataConnector. -func (adc AADDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &adc, true -} - -// UnmarshalJSON is the custom unmarshaler for AADDataConnector struct. -func (adc *AADDataConnector) 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 aADDataConnectorProperties AADDataConnectorProperties - err = json.Unmarshal(*v, &aADDataConnectorProperties) - if err != nil { - return err - } - adc.AADDataConnectorProperties = &aADDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - adc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - adc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - adc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - adc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - adc.Etag = &etag - } - } - } - - return nil -} - -// AADDataConnectorProperties AAD (Azure Active Directory) data connector properties. -type AADDataConnectorProperties struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` -} - -// AATPDataConnector represents AATP (Azure Advanced Threat Protection) data connector. -type AATPDataConnector struct { - // AATPDataConnectorProperties - AATP (Azure Advanced Threat Protection) data connector properties. - *AATPDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for AATPDataConnector. -func (adc AATPDataConnector) MarshalJSON() ([]byte, error) { - adc.Kind = KindAzureAdvancedThreatProtection - objectMap := make(map[string]interface{}) - if adc.AATPDataConnectorProperties != nil { - objectMap["properties"] = adc.AATPDataConnectorProperties - } - if adc.Kind != "" { - objectMap["kind"] = adc.Kind - } - if adc.Etag != nil { - objectMap["etag"] = adc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return &adc, true -} - -// AsASCDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for AATPDataConnector. -func (adc AATPDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &adc, true -} - -// UnmarshalJSON is the custom unmarshaler for AATPDataConnector struct. -func (adc *AATPDataConnector) 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 aATPDataConnectorProperties AATPDataConnectorProperties - err = json.Unmarshal(*v, &aATPDataConnectorProperties) - if err != nil { - return err - } - adc.AATPDataConnectorProperties = &aATPDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - adc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - adc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - adc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - adc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - adc.Etag = &etag - } - } - } - - return nil -} - -// AATPDataConnectorProperties AATP (Azure Advanced Threat Protection) data connector properties. -type AATPDataConnectorProperties struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` -} - -// ActionPropertiesBase action property bag base. -type ActionPropertiesBase struct { - // LogicAppResourceID - Logic App Resource Id, /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` -} - -// ActionRequest action for alert rule. -type ActionRequest struct { - // ActionRequestProperties - Action properties for put request - *ActionRequestProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ActionRequest. -func (ar ActionRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ar.ActionRequestProperties != nil { - objectMap["properties"] = ar.ActionRequestProperties - } - if ar.Etag != nil { - objectMap["etag"] = ar.Etag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ActionRequest struct. -func (ar *ActionRequest) 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 actionRequestProperties ActionRequestProperties - err = json.Unmarshal(*v, &actionRequestProperties) - if err != nil { - return err - } - ar.ActionRequestProperties = &actionRequestProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ar.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ar.Etag = &etag - } - } - } - - return nil -} - -// ActionRequestProperties action property bag. -type ActionRequestProperties struct { - // TriggerURI - Logic App Callback URL for this specific workflow. - TriggerURI *string `json:"triggerUri,omitempty"` - // LogicAppResourceID - Logic App Resource Id, /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` -} - -// ActionResponse action for alert rule. -type ActionResponse struct { - autorest.Response `json:"-"` - // Etag - Etag of the action. - Etag *string `json:"etag,omitempty"` - // ActionResponseProperties - Action properties for get request - *ActionResponseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ActionResponse. -func (ar ActionResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ar.Etag != nil { - objectMap["etag"] = ar.Etag - } - if ar.ActionResponseProperties != nil { - objectMap["properties"] = ar.ActionResponseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ActionResponse struct. -func (ar *ActionResponse) 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 "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ar.Etag = &etag - } - case "properties": - if v != nil { - var actionResponseProperties ActionResponseProperties - err = json.Unmarshal(*v, &actionResponseProperties) - if err != nil { - return err - } - ar.ActionResponseProperties = &actionResponseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ar.Type = &typeVar - } - } - } - - return nil -} - -// ActionResponseProperties action property bag. -type ActionResponseProperties struct { - // WorkflowID - The name of the logic app's workflow. - WorkflowID *string `json:"workflowId,omitempty"` - // LogicAppResourceID - Logic App Resource Id, /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` -} - -// ActionsList list all the actions. -type ActionsList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of actions. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of actions. - Value *[]ActionResponse `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ActionsList. -func (al ActionsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if al.Value != nil { - objectMap["value"] = al.Value - } - return json.Marshal(objectMap) -} - -// ActionsListIterator provides access to a complete listing of ActionResponse values. -type ActionsListIterator struct { - i int - page ActionsListPage -} - -// 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 *ActionsListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ActionsListIterator.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 *ActionsListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ActionsListIterator) 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 ActionsListIterator) Response() ActionsList { - 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 ActionsListIterator) Value() ActionResponse { - if !iter.page.NotDone() { - return ActionResponse{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ActionsListIterator type. -func NewActionsListIterator(page ActionsListPage) ActionsListIterator { - return ActionsListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (al ActionsList) IsEmpty() bool { - return al.Value == nil || len(*al.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (al ActionsList) hasNextLink() bool { - return al.NextLink != nil && len(*al.NextLink) != 0 -} - -// actionsListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (al ActionsList) actionsListPreparer(ctx context.Context) (*http.Request, error) { - if !al.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(al.NextLink))) -} - -// ActionsListPage contains a page of ActionResponse values. -type ActionsListPage struct { - fn func(context.Context, ActionsList) (ActionsList, error) - al ActionsList -} - -// 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 *ActionsListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ActionsListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.al) - if err != nil { - return err - } - page.al = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *ActionsListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ActionsListPage) NotDone() bool { - return !page.al.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ActionsListPage) Response() ActionsList { - return page.al -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ActionsListPage) Values() []ActionResponse { - if page.al.IsEmpty() { - return nil - } - return *page.al.Value -} - -// Creates a new instance of the ActionsListPage type. -func NewActionsListPage(cur ActionsList, getNextPage func(context.Context, ActionsList) (ActionsList, error)) ActionsListPage { - return ActionsListPage{ - fn: getNextPage, - al: cur, - } -} - -// BasicAlertRule alert rule. -type BasicAlertRule interface { - AsFusionAlertRule() (*FusionAlertRule, bool) - AsMicrosoftSecurityIncidentCreationAlertRule() (*MicrosoftSecurityIncidentCreationAlertRule, bool) - AsScheduledAlertRule() (*ScheduledAlertRule, bool) - AsAlertRule() (*AlertRule, bool) -} - -// AlertRule alert rule. -type AlertRule struct { - autorest.Response `json:"-"` - // Kind - Possible values include: 'KindAlertRule', 'KindFusion', 'KindMicrosoftSecurityIncidentCreation', 'KindScheduled' - Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -func unmarshalBasicAlertRule(body []byte) (BasicAlertRule, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["kind"] { - case string(KindFusion): - var far FusionAlertRule - err := json.Unmarshal(body, &far) - return far, err - case string(KindMicrosoftSecurityIncidentCreation): - var msicar MicrosoftSecurityIncidentCreationAlertRule - err := json.Unmarshal(body, &msicar) - return msicar, err - case string(KindScheduled): - var sar ScheduledAlertRule - err := json.Unmarshal(body, &sar) - return sar, err - default: - var ar AlertRule - err := json.Unmarshal(body, &ar) - return ar, err - } -} -func unmarshalBasicAlertRuleArray(body []byte) ([]BasicAlertRule, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - arArray := make([]BasicAlertRule, len(rawMessages)) - - for index, rawMessage := range rawMessages { - ar, err := unmarshalBasicAlertRule(*rawMessage) - if err != nil { - return nil, err - } - arArray[index] = ar - } - return arArray, nil -} - -// MarshalJSON is the custom marshaler for AlertRule. -func (ar AlertRule) MarshalJSON() ([]byte, error) { - ar.Kind = KindAlertRule - objectMap := make(map[string]interface{}) - if ar.Kind != "" { - objectMap["kind"] = ar.Kind - } - if ar.Etag != nil { - objectMap["etag"] = ar.Etag - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRule is the BasicAlertRule implementation for AlertRule. -func (ar AlertRule) AsFusionAlertRule() (*FusionAlertRule, bool) { - return nil, false -} - -// AsMicrosoftSecurityIncidentCreationAlertRule is the BasicAlertRule implementation for AlertRule. -func (ar AlertRule) AsMicrosoftSecurityIncidentCreationAlertRule() (*MicrosoftSecurityIncidentCreationAlertRule, bool) { - return nil, false -} - -// AsScheduledAlertRule is the BasicAlertRule implementation for AlertRule. -func (ar AlertRule) AsScheduledAlertRule() (*ScheduledAlertRule, bool) { - return nil, false -} - -// AsAlertRule is the BasicAlertRule implementation for AlertRule. -func (ar AlertRule) AsAlertRule() (*AlertRule, bool) { - return &ar, true -} - -// AsBasicAlertRule is the BasicAlertRule implementation for AlertRule. -func (ar AlertRule) AsBasicAlertRule() (BasicAlertRule, bool) { - return &ar, true -} - -// AlertRuleModel ... -type AlertRuleModel struct { - autorest.Response `json:"-"` - Value BasicAlertRule `json:"value,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for AlertRuleModel struct. -func (arm *AlertRuleModel) UnmarshalJSON(body []byte) error { - ar, err := unmarshalBasicAlertRule(body) - if err != nil { - return err - } - arm.Value = ar - - return nil -} - -// AlertRulesList list all the alert rules. -type AlertRulesList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of alert rules. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of alert rules. - Value *[]BasicAlertRule `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for AlertRulesList. -func (arl AlertRulesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if arl.Value != nil { - objectMap["value"] = arl.Value - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AlertRulesList struct. -func (arl *AlertRulesList) 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 "nextLink": - if v != nil { - var nextLink string - err = json.Unmarshal(*v, &nextLink) - if err != nil { - return err - } - arl.NextLink = &nextLink - } - case "value": - if v != nil { - value, err := unmarshalBasicAlertRuleArray(*v) - if err != nil { - return err - } - arl.Value = &value - } - } - } - - return nil -} - -// AlertRulesListIterator provides access to a complete listing of AlertRule values. -type AlertRulesListIterator struct { - i int - page AlertRulesListPage -} - -// 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 *AlertRulesListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesListIterator.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 *AlertRulesListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AlertRulesListIterator) 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 AlertRulesListIterator) Response() AlertRulesList { - 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 AlertRulesListIterator) Value() BasicAlertRule { - if !iter.page.NotDone() { - return AlertRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AlertRulesListIterator type. -func NewAlertRulesListIterator(page AlertRulesListPage) AlertRulesListIterator { - return AlertRulesListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (arl AlertRulesList) IsEmpty() bool { - return arl.Value == nil || len(*arl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (arl AlertRulesList) hasNextLink() bool { - return arl.NextLink != nil && len(*arl.NextLink) != 0 -} - -// alertRulesListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (arl AlertRulesList) alertRulesListPreparer(ctx context.Context) (*http.Request, error) { - if !arl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(arl.NextLink))) -} - -// AlertRulesListPage contains a page of BasicAlertRule values. -type AlertRulesListPage struct { - fn func(context.Context, AlertRulesList) (AlertRulesList, error) - arl AlertRulesList -} - -// 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 *AlertRulesListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.arl) - if err != nil { - return err - } - page.arl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *AlertRulesListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AlertRulesListPage) NotDone() bool { - return !page.arl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AlertRulesListPage) Response() AlertRulesList { - return page.arl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AlertRulesListPage) Values() []BasicAlertRule { - if page.arl.IsEmpty() { - return nil - } - return *page.arl.Value -} - -// Creates a new instance of the AlertRulesListPage type. -func NewAlertRulesListPage(cur AlertRulesList, getNextPage func(context.Context, AlertRulesList) (AlertRulesList, error)) AlertRulesListPage { - return AlertRulesListPage{ - fn: getNextPage, - arl: cur, - } -} - -// BasicAlertRuleTemplate alert rule template. -type BasicAlertRuleTemplate interface { - AsFusionAlertRuleTemplate() (*FusionAlertRuleTemplate, bool) - AsMicrosoftSecurityIncidentCreationAlertRuleTemplate() (*MicrosoftSecurityIncidentCreationAlertRuleTemplate, bool) - AsScheduledAlertRuleTemplate() (*ScheduledAlertRuleTemplate, bool) - AsAlertRuleTemplate() (*AlertRuleTemplate, bool) -} - -// AlertRuleTemplate alert rule template. -type AlertRuleTemplate struct { - autorest.Response `json:"-"` - // Kind - Possible values include: 'KindBasicAlertRuleTemplateKindAlertRuleTemplate', 'KindBasicAlertRuleTemplateKindFusion', 'KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation', 'KindBasicAlertRuleTemplateKindScheduled' - Kind KindBasicAlertRuleTemplate `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -func unmarshalBasicAlertRuleTemplate(body []byte) (BasicAlertRuleTemplate, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["kind"] { - case string(KindBasicAlertRuleTemplateKindFusion): - var fart FusionAlertRuleTemplate - err := json.Unmarshal(body, &fart) - return fart, err - case string(KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation): - var msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate - err := json.Unmarshal(body, &msicart) - return msicart, err - case string(KindBasicAlertRuleTemplateKindScheduled): - var sart ScheduledAlertRuleTemplate - err := json.Unmarshal(body, &sart) - return sart, err - default: - var art AlertRuleTemplate - err := json.Unmarshal(body, &art) - return art, err - } -} -func unmarshalBasicAlertRuleTemplateArray(body []byte) ([]BasicAlertRuleTemplate, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - artArray := make([]BasicAlertRuleTemplate, len(rawMessages)) - - for index, rawMessage := range rawMessages { - art, err := unmarshalBasicAlertRuleTemplate(*rawMessage) - if err != nil { - return nil, err - } - artArray[index] = art - } - return artArray, nil -} - -// MarshalJSON is the custom marshaler for AlertRuleTemplate. -func (art AlertRuleTemplate) MarshalJSON() ([]byte, error) { - art.Kind = KindBasicAlertRuleTemplateKindAlertRuleTemplate - objectMap := make(map[string]interface{}) - if art.Kind != "" { - objectMap["kind"] = art.Kind - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRuleTemplate is the BasicAlertRuleTemplate implementation for AlertRuleTemplate. -func (art AlertRuleTemplate) AsFusionAlertRuleTemplate() (*FusionAlertRuleTemplate, bool) { - return nil, false -} - -// AsMicrosoftSecurityIncidentCreationAlertRuleTemplate is the BasicAlertRuleTemplate implementation for AlertRuleTemplate. -func (art AlertRuleTemplate) AsMicrosoftSecurityIncidentCreationAlertRuleTemplate() (*MicrosoftSecurityIncidentCreationAlertRuleTemplate, bool) { - return nil, false -} - -// AsScheduledAlertRuleTemplate is the BasicAlertRuleTemplate implementation for AlertRuleTemplate. -func (art AlertRuleTemplate) AsScheduledAlertRuleTemplate() (*ScheduledAlertRuleTemplate, bool) { - return nil, false -} - -// AsAlertRuleTemplate is the BasicAlertRuleTemplate implementation for AlertRuleTemplate. -func (art AlertRuleTemplate) AsAlertRuleTemplate() (*AlertRuleTemplate, bool) { - return &art, true -} - -// AsBasicAlertRuleTemplate is the BasicAlertRuleTemplate implementation for AlertRuleTemplate. -func (art AlertRuleTemplate) AsBasicAlertRuleTemplate() (BasicAlertRuleTemplate, bool) { - return &art, true -} - -// AlertRuleTemplateDataSource alert rule template data sources -type AlertRuleTemplateDataSource struct { - // ConnectorID - The connector id that provides the following data types - ConnectorID *string `json:"connectorId,omitempty"` - // DataTypes - The data types used by the alert rule template - DataTypes *[]string `json:"dataTypes,omitempty"` -} - -// AlertRuleTemplateModel ... -type AlertRuleTemplateModel struct { - autorest.Response `json:"-"` - Value BasicAlertRuleTemplate `json:"value,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for AlertRuleTemplateModel struct. -func (artm *AlertRuleTemplateModel) UnmarshalJSON(body []byte) error { - art, err := unmarshalBasicAlertRuleTemplate(body) - if err != nil { - return err - } - artm.Value = art - - return nil -} - -// AlertRuleTemplatesList list all the alert rule templates. -type AlertRuleTemplatesList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of alert rule templates. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of alert rule templates. - Value *[]BasicAlertRuleTemplate `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for AlertRuleTemplatesList. -func (artl AlertRuleTemplatesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if artl.Value != nil { - objectMap["value"] = artl.Value - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AlertRuleTemplatesList struct. -func (artl *AlertRuleTemplatesList) 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 "nextLink": - if v != nil { - var nextLink string - err = json.Unmarshal(*v, &nextLink) - if err != nil { - return err - } - artl.NextLink = &nextLink - } - case "value": - if v != nil { - value, err := unmarshalBasicAlertRuleTemplateArray(*v) - if err != nil { - return err - } - artl.Value = &value - } - } - } - - return nil -} - -// AlertRuleTemplatesListIterator provides access to a complete listing of AlertRuleTemplate values. -type AlertRuleTemplatesListIterator struct { - i int - page AlertRuleTemplatesListPage -} - -// 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 *AlertRuleTemplatesListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleTemplatesListIterator.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 *AlertRuleTemplatesListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AlertRuleTemplatesListIterator) 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 AlertRuleTemplatesListIterator) Response() AlertRuleTemplatesList { - 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 AlertRuleTemplatesListIterator) Value() BasicAlertRuleTemplate { - if !iter.page.NotDone() { - return AlertRuleTemplate{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AlertRuleTemplatesListIterator type. -func NewAlertRuleTemplatesListIterator(page AlertRuleTemplatesListPage) AlertRuleTemplatesListIterator { - return AlertRuleTemplatesListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (artl AlertRuleTemplatesList) IsEmpty() bool { - return artl.Value == nil || len(*artl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (artl AlertRuleTemplatesList) hasNextLink() bool { - return artl.NextLink != nil && len(*artl.NextLink) != 0 -} - -// alertRuleTemplatesListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (artl AlertRuleTemplatesList) alertRuleTemplatesListPreparer(ctx context.Context) (*http.Request, error) { - if !artl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(artl.NextLink))) -} - -// AlertRuleTemplatesListPage contains a page of BasicAlertRuleTemplate values. -type AlertRuleTemplatesListPage struct { - fn func(context.Context, AlertRuleTemplatesList) (AlertRuleTemplatesList, error) - artl AlertRuleTemplatesList -} - -// 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 *AlertRuleTemplatesListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleTemplatesListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.artl) - if err != nil { - return err - } - page.artl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *AlertRuleTemplatesListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AlertRuleTemplatesListPage) NotDone() bool { - return !page.artl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AlertRuleTemplatesListPage) Response() AlertRuleTemplatesList { - return page.artl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AlertRuleTemplatesListPage) Values() []BasicAlertRuleTemplate { - if page.artl.IsEmpty() { - return nil - } - return *page.artl.Value -} - -// Creates a new instance of the AlertRuleTemplatesListPage type. -func NewAlertRuleTemplatesListPage(cur AlertRuleTemplatesList, getNextPage func(context.Context, AlertRuleTemplatesList) (AlertRuleTemplatesList, error)) AlertRuleTemplatesListPage { - return AlertRuleTemplatesListPage{ - fn: getNextPage, - artl: cur, - } -} - -// AlertsDataTypeOfDataConnector alerts data type for data connectors. -type AlertsDataTypeOfDataConnector struct { - // Alerts - Alerts data type connection. - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` -} - -// ASCDataConnector represents ASC (Azure Security Center) data connector. -type ASCDataConnector struct { - // ASCDataConnectorProperties - ASC (Azure Security Center) data connector properties. - *ASCDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ASCDataConnector. -func (adc ASCDataConnector) MarshalJSON() ([]byte, error) { - adc.Kind = KindAzureSecurityCenter - objectMap := make(map[string]interface{}) - if adc.ASCDataConnectorProperties != nil { - objectMap["properties"] = adc.ASCDataConnectorProperties - } - if adc.Kind != "" { - objectMap["kind"] = adc.Kind - } - if adc.Etag != nil { - objectMap["etag"] = adc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return &adc, true -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for ASCDataConnector. -func (adc ASCDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &adc, true -} - -// UnmarshalJSON is the custom unmarshaler for ASCDataConnector struct. -func (adc *ASCDataConnector) 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 aSCDataConnectorProperties ASCDataConnectorProperties - err = json.Unmarshal(*v, &aSCDataConnectorProperties) - if err != nil { - return err - } - adc.ASCDataConnectorProperties = &aSCDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - adc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - adc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - adc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - adc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - adc.Etag = &etag - } - } - } - - return nil -} - -// ASCDataConnectorProperties ASC (Azure Security Center) data connector properties. -type ASCDataConnectorProperties struct { - // SubscriptionID - The subscription id to connect to, and get the data from. - SubscriptionID *string `json:"subscriptionId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` -} - -// AwsCloudTrailDataConnector represents Amazon Web Services CloudTrail data connector. -type AwsCloudTrailDataConnector struct { - // AwsCloudTrailDataConnectorProperties - Amazon Web Services CloudTrail data connector properties. - *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { - actdc.Kind = KindAmazonWebServicesCloudTrail - objectMap := make(map[string]interface{}) - if actdc.AwsCloudTrailDataConnectorProperties != nil { - objectMap["properties"] = actdc.AwsCloudTrailDataConnectorProperties - } - if actdc.Kind != "" { - objectMap["kind"] = actdc.Kind - } - if actdc.Etag != nil { - objectMap["etag"] = actdc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return &actdc, true -} - -// AsMCASDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for AwsCloudTrailDataConnector. -func (actdc AwsCloudTrailDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &actdc, true -} - -// UnmarshalJSON is the custom unmarshaler for AwsCloudTrailDataConnector struct. -func (actdc *AwsCloudTrailDataConnector) 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 awsCloudTrailDataConnectorProperties AwsCloudTrailDataConnectorProperties - err = json.Unmarshal(*v, &awsCloudTrailDataConnectorProperties) - if err != nil { - return err - } - actdc.AwsCloudTrailDataConnectorProperties = &awsCloudTrailDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - actdc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - actdc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - actdc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - actdc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - actdc.Etag = &etag - } - } - } - - return nil -} - -// AwsCloudTrailDataConnectorDataTypes the available data types for Amazon Web Services CloudTrail data -// connector. -type AwsCloudTrailDataConnectorDataTypes struct { - // Logs - Logs data type. - Logs *AwsCloudTrailDataConnectorDataTypesLogs `json:"logs,omitempty"` -} - -// AwsCloudTrailDataConnectorDataTypesLogs logs data type. -type AwsCloudTrailDataConnectorDataTypesLogs struct { - // State - Describe whether this data type connection is enabled or not. Possible values include: 'Enabled', 'Disabled' - State DataTypeState `json:"state,omitempty"` -} - -// AwsCloudTrailDataConnectorProperties amazon Web Services CloudTrail data connector properties. -type AwsCloudTrailDataConnectorProperties struct { - // AwsRoleArn - The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws account. - AwsRoleArn *string `json:"awsRoleArn,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *AwsCloudTrailDataConnectorDataTypes `json:"dataTypes,omitempty"` -} - -// Bookmark represents a bookmark in Azure Security Insights. -type Bookmark struct { - autorest.Response `json:"-"` - // BookmarkProperties - Bookmark properties - *BookmarkProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for Bookmark. -func (b Bookmark) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if b.BookmarkProperties != nil { - objectMap["properties"] = b.BookmarkProperties - } - if b.Etag != nil { - objectMap["etag"] = b.Etag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Bookmark struct. -func (b *Bookmark) 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 bookmarkProperties BookmarkProperties - err = json.Unmarshal(*v, &bookmarkProperties) - if err != nil { - return err - } - b.BookmarkProperties = &bookmarkProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - b.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - b.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - b.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - b.Etag = &etag - } - } - } - - return nil -} - -// BookmarkList list all the bookmarks. -type BookmarkList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of cases. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of bookmarks. - Value *[]Bookmark `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for BookmarkList. -func (bl BookmarkList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bl.Value != nil { - objectMap["value"] = bl.Value - } - return json.Marshal(objectMap) -} - -// BookmarkListIterator provides access to a complete listing of Bookmark values. -type BookmarkListIterator struct { - i int - page BookmarkListPage -} - -// 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 *BookmarkListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarkListIterator.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 *BookmarkListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter BookmarkListIterator) 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 BookmarkListIterator) Response() BookmarkList { - 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 BookmarkListIterator) Value() Bookmark { - if !iter.page.NotDone() { - return Bookmark{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the BookmarkListIterator type. -func NewBookmarkListIterator(page BookmarkListPage) BookmarkListIterator { - return BookmarkListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (bl BookmarkList) IsEmpty() bool { - return bl.Value == nil || len(*bl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (bl BookmarkList) hasNextLink() bool { - return bl.NextLink != nil && len(*bl.NextLink) != 0 -} - -// bookmarkListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (bl BookmarkList) bookmarkListPreparer(ctx context.Context) (*http.Request, error) { - if !bl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(bl.NextLink))) -} - -// BookmarkListPage contains a page of Bookmark values. -type BookmarkListPage struct { - fn func(context.Context, BookmarkList) (BookmarkList, error) - bl BookmarkList -} - -// 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 *BookmarkListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BookmarkListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.bl) - if err != nil { - return err - } - page.bl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *BookmarkListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page BookmarkListPage) NotDone() bool { - return !page.bl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page BookmarkListPage) Response() BookmarkList { - return page.bl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page BookmarkListPage) Values() []Bookmark { - if page.bl.IsEmpty() { - return nil - } - return *page.bl.Value -} - -// Creates a new instance of the BookmarkListPage type. -func NewBookmarkListPage(cur BookmarkList, getNextPage func(context.Context, BookmarkList) (BookmarkList, error)) BookmarkListPage { - return BookmarkListPage{ - fn: getNextPage, - bl: cur, - } -} - -// BookmarkProperties describes bookmark properties -type BookmarkProperties struct { - // Created - The time the bookmark was created - Created *date.Time `json:"created,omitempty"` - // CreatedBy - Describes a user that created the bookmark - CreatedBy *UserInfo `json:"createdBy,omitempty"` - // DisplayName - The display name of the bookmark - DisplayName *string `json:"displayName,omitempty"` - // Labels - List of labels relevant to this bookmark - Labels *[]string `json:"labels,omitempty"` - // Notes - The notes of the bookmark - Notes *string `json:"notes,omitempty"` - // Query - The query of the bookmark. - Query *string `json:"query,omitempty"` - // QueryResult - The query result of the bookmark. - QueryResult *string `json:"queryResult,omitempty"` - // Updated - The last time the bookmark was updated - 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"` -} - -// ClientInfo information on the client (user or application) that made some action -type ClientInfo struct { - // Email - The email of the client. - Email *string `json:"email,omitempty"` - // Name - The name of the client. - Name *string `json:"name,omitempty"` - // ObjectID - The object id of the client. - ObjectID *uuid.UUID `json:"objectId,omitempty"` - // UserPrincipalName - The user principal name of the client. - UserPrincipalName *string `json:"userPrincipalName,omitempty"` -} - -// CloudError an error response for a resource management request. -type CloudError struct { - // Error - The error object of the CloudError response - Error *ErrorResponse `json:"error,omitempty"` -} - -// BasicDataConnector data connector. -type BasicDataConnector interface { - AsAADDataConnector() (*AADDataConnector, bool) - AsAATPDataConnector() (*AATPDataConnector, bool) - AsASCDataConnector() (*ASCDataConnector, bool) - AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) - AsMCASDataConnector() (*MCASDataConnector, bool) - AsMDATPDataConnector() (*MDATPDataConnector, bool) - AsOfficeDataConnector() (*OfficeDataConnector, bool) - AsTIDataConnector() (*TIDataConnector, bool) - AsDataConnector() (*DataConnector, bool) -} - -// DataConnector data connector. -type DataConnector struct { - autorest.Response `json:"-"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -func unmarshalBasicDataConnector(body []byte) (BasicDataConnector, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["kind"] { - case string(KindAzureActiveDirectory): - var adc AADDataConnector - err := json.Unmarshal(body, &adc) - return adc, err - case string(KindAzureAdvancedThreatProtection): - var adc AATPDataConnector - err := json.Unmarshal(body, &adc) - return adc, err - case string(KindAzureSecurityCenter): - var adc ASCDataConnector - err := json.Unmarshal(body, &adc) - return adc, err - case string(KindAmazonWebServicesCloudTrail): - var actdc AwsCloudTrailDataConnector - err := json.Unmarshal(body, &actdc) - return actdc, err - case string(KindMicrosoftCloudAppSecurity): - var mdc MCASDataConnector - err := json.Unmarshal(body, &mdc) - return mdc, err - case string(KindMicrosoftDefenderAdvancedThreatProtection): - var mdc MDATPDataConnector - err := json.Unmarshal(body, &mdc) - return mdc, err - case string(KindOffice365): - var odc OfficeDataConnector - err := json.Unmarshal(body, &odc) - return odc, err - case string(KindThreatIntelligence): - var tdc TIDataConnector - err := json.Unmarshal(body, &tdc) - return tdc, err - default: - var dc DataConnector - err := json.Unmarshal(body, &dc) - return dc, err - } -} -func unmarshalBasicDataConnectorArray(body []byte) ([]BasicDataConnector, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - dcArray := make([]BasicDataConnector, len(rawMessages)) - - for index, rawMessage := range rawMessages { - dc, err := unmarshalBasicDataConnector(*rawMessage) - if err != nil { - return nil, err - } - dcArray[index] = dc - } - return dcArray, nil -} - -// MarshalJSON is the custom marshaler for DataConnector. -func (dc DataConnector) MarshalJSON() ([]byte, error) { - dc.Kind = KindDataConnector - objectMap := make(map[string]interface{}) - if dc.Kind != "" { - objectMap["kind"] = dc.Kind - } - if dc.Etag != nil { - objectMap["etag"] = dc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsDataConnector() (*DataConnector, bool) { - return &dc, true -} - -// AsBasicDataConnector is the BasicDataConnector implementation for DataConnector. -func (dc DataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &dc, true -} - -// DataConnectorDataTypeCommon common field for data type in data connectors. -type DataConnectorDataTypeCommon struct { - // State - Describe whether this data type connection is enabled or not. Possible values include: 'Enabled', 'Disabled' - State DataTypeState `json:"state,omitempty"` -} - -// DataConnectorList list all the data connectors. -type DataConnectorList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of data connectors. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of data connectors. - Value *[]BasicDataConnector `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for DataConnectorList. -func (dcl DataConnectorList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dcl.Value != nil { - objectMap["value"] = dcl.Value - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DataConnectorList struct. -func (dcl *DataConnectorList) 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 "nextLink": - if v != nil { - var nextLink string - err = json.Unmarshal(*v, &nextLink) - if err != nil { - return err - } - dcl.NextLink = &nextLink - } - case "value": - if v != nil { - value, err := unmarshalBasicDataConnectorArray(*v) - if err != nil { - return err - } - dcl.Value = &value - } - } - } - - return nil -} - -// DataConnectorListIterator provides access to a complete listing of DataConnector values. -type DataConnectorListIterator struct { - i int - page DataConnectorListPage -} - -// 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 *DataConnectorListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorListIterator.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 *DataConnectorListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DataConnectorListIterator) 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 DataConnectorListIterator) Response() DataConnectorList { - 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 DataConnectorListIterator) Value() BasicDataConnector { - if !iter.page.NotDone() { - return DataConnector{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DataConnectorListIterator type. -func NewDataConnectorListIterator(page DataConnectorListPage) DataConnectorListIterator { - return DataConnectorListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dcl DataConnectorList) IsEmpty() bool { - return dcl.Value == nil || len(*dcl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dcl DataConnectorList) hasNextLink() bool { - return dcl.NextLink != nil && len(*dcl.NextLink) != 0 -} - -// dataConnectorListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dcl DataConnectorList) dataConnectorListPreparer(ctx context.Context) (*http.Request, error) { - if !dcl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dcl.NextLink))) -} - -// DataConnectorListPage contains a page of BasicDataConnector values. -type DataConnectorListPage struct { - fn func(context.Context, DataConnectorList) (DataConnectorList, error) - dcl DataConnectorList -} - -// 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 *DataConnectorListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectorListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dcl) - if err != nil { - return err - } - page.dcl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *DataConnectorListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DataConnectorListPage) NotDone() bool { - return !page.dcl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DataConnectorListPage) Response() DataConnectorList { - return page.dcl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DataConnectorListPage) Values() []BasicDataConnector { - if page.dcl.IsEmpty() { - return nil - } - return *page.dcl.Value -} - -// Creates a new instance of the DataConnectorListPage type. -func NewDataConnectorListPage(cur DataConnectorList, getNextPage func(context.Context, DataConnectorList) (DataConnectorList, error)) DataConnectorListPage { - return DataConnectorListPage{ - fn: getNextPage, - dcl: cur, - } -} - -// DataConnectorModel ... -type DataConnectorModel struct { - autorest.Response `json:"-"` - Value BasicDataConnector `json:"value,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for DataConnectorModel struct. -func (dcm *DataConnectorModel) UnmarshalJSON(body []byte) error { - dc, err := unmarshalBasicDataConnector(body) - if err != nil { - return err - } - dcm.Value = dc - - return nil -} - -// DataConnectorTenantID properties data connector on tenant level. -type DataConnectorTenantID struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` -} - -// DataConnectorWithAlertsProperties data connector properties. -type DataConnectorWithAlertsProperties struct { - // DataTypes - The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` -} - -// ErrorAdditionalInfo the resource management error additional info. -type ErrorAdditionalInfo struct { - // Type - READ-ONLY; The additional info type. - Type *string `json:"type,omitempty"` - // Info - READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty"` -} - -// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. -func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for -// failed operations. (This also follows the OData error response format.) -type ErrorResponse struct { - // Code - READ-ONLY; The error code. - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; The error message. - Message *string `json:"message,omitempty"` - // Target - READ-ONLY; The error target. - Target *string `json:"target,omitempty"` - // Details - READ-ONLY; The error details. - Details *[]ErrorResponse `json:"details,omitempty"` - // AdditionalInfo - READ-ONLY; The error additional info. - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` -} - -// MarshalJSON is the custom marshaler for ErrorResponse. -func (er ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// FusionAlertRule represents Fusion alert rule. -type FusionAlertRule struct { - // FusionAlertRuleProperties - Fusion alert rule properties - *FusionAlertRuleProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindAlertRule', 'KindFusion', 'KindMicrosoftSecurityIncidentCreation', 'KindScheduled' - Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for FusionAlertRule. -func (far FusionAlertRule) MarshalJSON() ([]byte, error) { - far.Kind = KindFusion - objectMap := make(map[string]interface{}) - if far.FusionAlertRuleProperties != nil { - objectMap["properties"] = far.FusionAlertRuleProperties - } - if far.Kind != "" { - objectMap["kind"] = far.Kind - } - if far.Etag != nil { - objectMap["etag"] = far.Etag - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRule is the BasicAlertRule implementation for FusionAlertRule. -func (far FusionAlertRule) AsFusionAlertRule() (*FusionAlertRule, bool) { - return &far, true -} - -// AsMicrosoftSecurityIncidentCreationAlertRule is the BasicAlertRule implementation for FusionAlertRule. -func (far FusionAlertRule) AsMicrosoftSecurityIncidentCreationAlertRule() (*MicrosoftSecurityIncidentCreationAlertRule, bool) { - return nil, false -} - -// AsScheduledAlertRule is the BasicAlertRule implementation for FusionAlertRule. -func (far FusionAlertRule) AsScheduledAlertRule() (*ScheduledAlertRule, bool) { - return nil, false -} - -// AsAlertRule is the BasicAlertRule implementation for FusionAlertRule. -func (far FusionAlertRule) AsAlertRule() (*AlertRule, bool) { - return nil, false -} - -// AsBasicAlertRule is the BasicAlertRule implementation for FusionAlertRule. -func (far FusionAlertRule) AsBasicAlertRule() (BasicAlertRule, bool) { - return &far, true -} - -// UnmarshalJSON is the custom unmarshaler for FusionAlertRule struct. -func (far *FusionAlertRule) 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 fusionAlertRuleProperties FusionAlertRuleProperties - err = json.Unmarshal(*v, &fusionAlertRuleProperties) - if err != nil { - return err - } - far.FusionAlertRuleProperties = &fusionAlertRuleProperties - } - case "kind": - if v != nil { - var kind Kind - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - far.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - far.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - far.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - far.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - far.Etag = &etag - } - } - } - - return nil -} - -// FusionAlertRuleProperties fusion alert rule base property bag. -type FusionAlertRuleProperties struct { - // AlertRuleTemplateName - The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` - // Description - READ-ONLY; The description of the alert rule. - Description *string `json:"description,omitempty"` - // DisplayName - READ-ONLY; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty"` - // Enabled - Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` - // LastModifiedUtc - READ-ONLY; The last time that this alert has been modified. - LastModifiedUtc *date.Time `json:"lastModifiedUtc,omitempty"` - // Severity - READ-ONLY; The severity for alerts created by this alert rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' - Severity AlertSeverity `json:"severity,omitempty"` - // Tactics - READ-ONLY; The tactics of the alert rule - Tactics *[]AttackTactic `json:"tactics,omitempty"` -} - -// MarshalJSON is the custom marshaler for FusionAlertRuleProperties. -func (farp FusionAlertRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if farp.AlertRuleTemplateName != nil { - objectMap["alertRuleTemplateName"] = farp.AlertRuleTemplateName - } - if farp.Enabled != nil { - objectMap["enabled"] = farp.Enabled - } - return json.Marshal(objectMap) -} - -// FusionAlertRuleTemplate represents Fusion alert rule template. -type FusionAlertRuleTemplate struct { - // FusionAlertRuleTemplateProperties - Fusion alert rule template properties - *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindBasicAlertRuleTemplateKindAlertRuleTemplate', 'KindBasicAlertRuleTemplateKindFusion', 'KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation', 'KindBasicAlertRuleTemplateKindScheduled' - Kind KindBasicAlertRuleTemplate `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FusionAlertRuleTemplate. -func (fart FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { - fart.Kind = KindBasicAlertRuleTemplateKindFusion - objectMap := make(map[string]interface{}) - if fart.FusionAlertRuleTemplateProperties != nil { - objectMap["properties"] = fart.FusionAlertRuleTemplateProperties - } - if fart.Kind != "" { - objectMap["kind"] = fart.Kind - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRuleTemplate is the BasicAlertRuleTemplate implementation for FusionAlertRuleTemplate. -func (fart FusionAlertRuleTemplate) AsFusionAlertRuleTemplate() (*FusionAlertRuleTemplate, bool) { - return &fart, true -} - -// AsMicrosoftSecurityIncidentCreationAlertRuleTemplate is the BasicAlertRuleTemplate implementation for FusionAlertRuleTemplate. -func (fart FusionAlertRuleTemplate) AsMicrosoftSecurityIncidentCreationAlertRuleTemplate() (*MicrosoftSecurityIncidentCreationAlertRuleTemplate, bool) { - return nil, false -} - -// AsScheduledAlertRuleTemplate is the BasicAlertRuleTemplate implementation for FusionAlertRuleTemplate. -func (fart FusionAlertRuleTemplate) AsScheduledAlertRuleTemplate() (*ScheduledAlertRuleTemplate, bool) { - return nil, false -} - -// AsAlertRuleTemplate is the BasicAlertRuleTemplate implementation for FusionAlertRuleTemplate. -func (fart FusionAlertRuleTemplate) AsAlertRuleTemplate() (*AlertRuleTemplate, bool) { - return nil, false -} - -// AsBasicAlertRuleTemplate is the BasicAlertRuleTemplate implementation for FusionAlertRuleTemplate. -func (fart FusionAlertRuleTemplate) AsBasicAlertRuleTemplate() (BasicAlertRuleTemplate, bool) { - return &fart, true -} - -// UnmarshalJSON is the custom unmarshaler for FusionAlertRuleTemplate struct. -func (fart *FusionAlertRuleTemplate) 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 fusionAlertRuleTemplateProperties FusionAlertRuleTemplateProperties - err = json.Unmarshal(*v, &fusionAlertRuleTemplateProperties) - if err != nil { - return err - } - fart.FusionAlertRuleTemplateProperties = &fusionAlertRuleTemplateProperties - } - case "kind": - if v != nil { - var kind KindBasicAlertRuleTemplate - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - fart.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fart.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fart.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fart.Type = &typeVar - } - } - } - - return nil -} - -// FusionAlertRuleTemplateProperties represents Fusion alert rule template properties -type FusionAlertRuleTemplateProperties struct { - // AlertRulesCreatedByTemplateCount - the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` - // CreatedDateUTC - READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *date.Time `json:"createdDateUTC,omitempty"` - // Description - The description of the alert rule template. - Description *string `json:"description,omitempty"` - // DisplayName - The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` - // RequiredDataConnectors - The required data connectors for this template - RequiredDataConnectors *[]AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` - // Status - The alert rule template status. Possible values include: 'Installed', 'Available', 'NotAvailable' - Status TemplateStatus `json:"status,omitempty"` - // Severity - The severity for alerts created by this alert rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' - Severity AlertSeverity `json:"severity,omitempty"` - // Tactics - The tactics of the alert rule template - Tactics *[]AttackTactic `json:"tactics,omitempty"` -} - -// MarshalJSON is the custom marshaler for FusionAlertRuleTemplateProperties. -func (fartp FusionAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fartp.AlertRulesCreatedByTemplateCount != nil { - objectMap["alertRulesCreatedByTemplateCount"] = fartp.AlertRulesCreatedByTemplateCount - } - if fartp.Description != nil { - objectMap["description"] = fartp.Description - } - if fartp.DisplayName != nil { - objectMap["displayName"] = fartp.DisplayName - } - if fartp.RequiredDataConnectors != nil { - objectMap["requiredDataConnectors"] = fartp.RequiredDataConnectors - } - if fartp.Status != "" { - objectMap["status"] = fartp.Status - } - if fartp.Severity != "" { - objectMap["severity"] = fartp.Severity - } - if fartp.Tactics != nil { - objectMap["tactics"] = fartp.Tactics - } - return json.Marshal(objectMap) -} - -// Incident represents an incident in Azure Security Insights. -type Incident struct { - autorest.Response `json:"-"` - // IncidentProperties - Incident properties - *IncidentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for Incident. -func (i Incident) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if i.IncidentProperties != nil { - objectMap["properties"] = i.IncidentProperties - } - if i.Etag != nil { - objectMap["etag"] = i.Etag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Incident struct. -func (i *Incident) 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 incidentProperties IncidentProperties - err = json.Unmarshal(*v, &incidentProperties) - if err != nil { - return err - } - i.IncidentProperties = &incidentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - i.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - i.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - i.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - i.Etag = &etag - } - } - } - - return nil -} - -// IncidentAdditionalData incident additional data property bag. -type IncidentAdditionalData struct { - // AlertsCount - READ-ONLY; The number of alerts in the incident - AlertsCount *int32 `json:"alertsCount,omitempty"` - // BookmarksCount - READ-ONLY; The number of bookmarks in the incident - BookmarksCount *int32 `json:"bookmarksCount,omitempty"` - // CommentsCount - READ-ONLY; The number of comments in the incident - CommentsCount *int32 `json:"commentsCount,omitempty"` - // AlertProductNames - READ-ONLY; List of product names of alerts in the incident - AlertProductNames *[]string `json:"alertProductNames,omitempty"` - // Tactics - READ-ONLY; The tactics associated with incident - Tactics *[]AttackTactic `json:"tactics,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentAdditionalData. -func (iad IncidentAdditionalData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IncidentComment represents an incident comment -type IncidentComment struct { - autorest.Response `json:"-"` - // IncidentCommentProperties - Incident comment properties - *IncidentCommentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentComment. -func (ic IncidentComment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ic.IncidentCommentProperties != nil { - objectMap["properties"] = ic.IncidentCommentProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IncidentComment struct. -func (ic *IncidentComment) 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 incidentCommentProperties IncidentCommentProperties - err = json.Unmarshal(*v, &incidentCommentProperties) - if err != nil { - return err - } - ic.IncidentCommentProperties = &incidentCommentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ic.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ic.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ic.Type = &typeVar - } - } - } - - return nil -} - -// IncidentCommentList list of incident comments. -type IncidentCommentList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of comments. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of comments. - Value *[]IncidentComment `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentCommentList. -func (icl IncidentCommentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if icl.Value != nil { - objectMap["value"] = icl.Value - } - return json.Marshal(objectMap) -} - -// IncidentCommentListIterator provides access to a complete listing of IncidentComment values. -type IncidentCommentListIterator struct { - i int - page IncidentCommentListPage -} - -// 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 *IncidentCommentListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentCommentListIterator.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 *IncidentCommentListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IncidentCommentListIterator) 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 IncidentCommentListIterator) Response() IncidentCommentList { - 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 IncidentCommentListIterator) Value() IncidentComment { - if !iter.page.NotDone() { - return IncidentComment{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IncidentCommentListIterator type. -func NewIncidentCommentListIterator(page IncidentCommentListPage) IncidentCommentListIterator { - return IncidentCommentListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (icl IncidentCommentList) IsEmpty() bool { - return icl.Value == nil || len(*icl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (icl IncidentCommentList) hasNextLink() bool { - return icl.NextLink != nil && len(*icl.NextLink) != 0 -} - -// incidentCommentListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (icl IncidentCommentList) incidentCommentListPreparer(ctx context.Context) (*http.Request, error) { - if !icl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(icl.NextLink))) -} - -// IncidentCommentListPage contains a page of IncidentComment values. -type IncidentCommentListPage struct { - fn func(context.Context, IncidentCommentList) (IncidentCommentList, error) - icl IncidentCommentList -} - -// 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 *IncidentCommentListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentCommentListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.icl) - if err != nil { - return err - } - page.icl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *IncidentCommentListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IncidentCommentListPage) NotDone() bool { - return !page.icl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IncidentCommentListPage) Response() IncidentCommentList { - return page.icl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IncidentCommentListPage) Values() []IncidentComment { - if page.icl.IsEmpty() { - return nil - } - return *page.icl.Value -} - -// Creates a new instance of the IncidentCommentListPage type. -func NewIncidentCommentListPage(cur IncidentCommentList, getNextPage func(context.Context, IncidentCommentList) (IncidentCommentList, error)) IncidentCommentListPage { - return IncidentCommentListPage{ - fn: getNextPage, - icl: cur, - } -} - -// IncidentCommentProperties incident comment property bag. -type IncidentCommentProperties struct { - // CreatedTimeUtc - READ-ONLY; The time the comment was created - CreatedTimeUtc *date.Time `json:"createdTimeUtc,omitempty"` - // Message - The comment message - Message *string `json:"message,omitempty"` - // Author - READ-ONLY; Describes the client that created the comment - Author *ClientInfo `json:"author,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentCommentProperties. -func (icp IncidentCommentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if icp.Message != nil { - objectMap["message"] = icp.Message - } - 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: 'CaseSeverityCritical', 'CaseSeverityHigh', 'CaseSeverityMedium', 'CaseSeverityLow', 'CaseSeverityInformational' - Severity CaseSeverity `json:"severity,omitempty"` - // Title - The title of the incident - Title *string `json:"title,omitempty"` - // RelationName - Relation Name - RelationName *string `json:"relationName,omitempty"` -} - -// IncidentLabel represents an incident label -type IncidentLabel struct { - // LabelName - The name of the label - LabelName *string `json:"labelName,omitempty"` - // LabelType - READ-ONLY; The type of the label. Possible values include: 'User', 'System' - LabelType IncidentLabelType `json:"labelType,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentLabel. -func (il IncidentLabel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if il.LabelName != nil { - objectMap["labelName"] = il.LabelName - } - return json.Marshal(objectMap) -} - -// IncidentList list all the incidents. -type IncidentList struct { - autorest.Response `json:"-"` - // NextLink - READ-ONLY; URL to fetch the next set of incidents. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of incidents. - Value *[]Incident `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentList. -func (il IncidentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if il.Value != nil { - objectMap["value"] = il.Value - } - return json.Marshal(objectMap) -} - -// IncidentListIterator provides access to a complete listing of Incident values. -type IncidentListIterator struct { - i int - page IncidentListPage -} - -// 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 *IncidentListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentListIterator.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 *IncidentListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IncidentListIterator) 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 IncidentListIterator) Response() IncidentList { - 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 IncidentListIterator) Value() Incident { - if !iter.page.NotDone() { - return Incident{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IncidentListIterator type. -func NewIncidentListIterator(page IncidentListPage) IncidentListIterator { - return IncidentListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (il IncidentList) IsEmpty() bool { - return il.Value == nil || len(*il.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (il IncidentList) hasNextLink() bool { - return il.NextLink != nil && len(*il.NextLink) != 0 -} - -// incidentListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (il IncidentList) incidentListPreparer(ctx context.Context) (*http.Request, error) { - if !il.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(il.NextLink))) -} - -// IncidentListPage contains a page of Incident values. -type IncidentListPage struct { - fn func(context.Context, IncidentList) (IncidentList, error) - il IncidentList -} - -// 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 *IncidentListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IncidentListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.il) - if err != nil { - return err - } - page.il = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *IncidentListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IncidentListPage) NotDone() bool { - return !page.il.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IncidentListPage) Response() IncidentList { - return page.il -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IncidentListPage) Values() []Incident { - if page.il.IsEmpty() { - return nil - } - return *page.il.Value -} - -// Creates a new instance of the IncidentListPage type. -func NewIncidentListPage(cur IncidentList, getNextPage func(context.Context, IncidentList) (IncidentList, error)) IncidentListPage { - return IncidentListPage{ - fn: getNextPage, - il: cur, - } -} - -// IncidentOwnerInfo information on the user an incident is assigned to -type IncidentOwnerInfo struct { - // Email - The email of the user the incident is assigned to. - Email *string `json:"email,omitempty"` - // AssignedTo - The name of the user the incident is assigned to. - AssignedTo *string `json:"assignedTo,omitempty"` - // ObjectID - The object id of the user the incident is assigned to. - ObjectID *uuid.UUID `json:"objectId,omitempty"` - // UserPrincipalName - The user principal name of the user the incident is assigned to. - UserPrincipalName *string `json:"userPrincipalName,omitempty"` -} - -// IncidentProperties describes incident properties -type IncidentProperties struct { - // AdditionalData - READ-ONLY; Additional data on the incident - AdditionalData *IncidentAdditionalData `json:"additionalData,omitempty"` - // Classification - The reason the incident was closed. Possible values include: 'Undetermined', 'TruePositive', 'BenignPositive', 'FalsePositive' - Classification IncidentClassification `json:"classification,omitempty"` - // ClassificationComment - Describes the reason the incident was closed - ClassificationComment *string `json:"classificationComment,omitempty"` - // ClassificationReason - The classification reason the incident was closed with. Possible values include: 'SuspiciousActivity', 'SuspiciousButExpected', 'IncorrectAlertLogic', 'InaccurateData' - ClassificationReason IncidentClassificationReason `json:"classificationReason,omitempty"` - // CreatedTimeUtc - READ-ONLY; The time the incident was created - CreatedTimeUtc *date.Time `json:"createdTimeUtc,omitempty"` - // Description - The description of the incident - Description *string `json:"description,omitempty"` - // FirstActivityTimeUtc - The time of the first activity in the incident - FirstActivityTimeUtc *date.Time `json:"firstActivityTimeUtc,omitempty"` - // IncidentURL - READ-ONLY; The deep-link url to the incident in Azure portal - IncidentURL *string `json:"incidentUrl,omitempty"` - // IncidentNumber - READ-ONLY; A sequential number - IncidentNumber *int32 `json:"incidentNumber,omitempty"` - // Labels - List of labels relevant to this incident - Labels *[]IncidentLabel `json:"labels,omitempty"` - // LastActivityTimeUtc - The time of the last activity in the incident - LastActivityTimeUtc *date.Time `json:"lastActivityTimeUtc,omitempty"` - // LastModifiedTimeUtc - READ-ONLY; The last time the incident was updated - LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` - // Owner - Describes a user that the incident is assigned to - Owner *IncidentOwnerInfo `json:"owner,omitempty"` - // RelatedAnalyticRuleIds - READ-ONLY; List of resource ids of Analytic rules related to the incident - RelatedAnalyticRuleIds *[]string `json:"relatedAnalyticRuleIds,omitempty"` - // Severity - The severity of the incident. Possible values include: 'IncidentSeverityHigh', 'IncidentSeverityMedium', 'IncidentSeverityLow', 'IncidentSeverityInformational' - Severity IncidentSeverity `json:"severity,omitempty"` - // Status - The status of the incident. Possible values include: 'IncidentStatusNew', 'IncidentStatusActive', 'IncidentStatusClosed' - Status IncidentStatus `json:"status,omitempty"` - // Title - The title of the incident - Title *string `json:"title,omitempty"` -} - -// MarshalJSON is the custom marshaler for IncidentProperties. -func (IP IncidentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if IP.Classification != "" { - objectMap["classification"] = IP.Classification - } - if IP.ClassificationComment != nil { - objectMap["classificationComment"] = IP.ClassificationComment - } - if IP.ClassificationReason != "" { - objectMap["classificationReason"] = IP.ClassificationReason - } - if IP.Description != nil { - objectMap["description"] = IP.Description - } - if IP.FirstActivityTimeUtc != nil { - objectMap["firstActivityTimeUtc"] = IP.FirstActivityTimeUtc - } - if IP.Labels != nil { - objectMap["labels"] = IP.Labels - } - if IP.LastActivityTimeUtc != nil { - objectMap["lastActivityTimeUtc"] = IP.LastActivityTimeUtc - } - if IP.Owner != nil { - objectMap["owner"] = IP.Owner - } - if IP.Severity != "" { - objectMap["severity"] = IP.Severity - } - if IP.Status != "" { - objectMap["status"] = IP.Status - } - if IP.Title != nil { - objectMap["title"] = IP.Title - } - return json.Marshal(objectMap) -} - -// MCASDataConnector represents MCAS (Microsoft Cloud App Security) data connector. -type MCASDataConnector struct { - // MCASDataConnectorProperties - MCAS (Microsoft Cloud App Security) data connector properties. - *MCASDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for MCASDataConnector. -func (mdc MCASDataConnector) MarshalJSON() ([]byte, error) { - mdc.Kind = KindMicrosoftCloudAppSecurity - objectMap := make(map[string]interface{}) - if mdc.MCASDataConnectorProperties != nil { - objectMap["properties"] = mdc.MCASDataConnectorProperties - } - if mdc.Kind != "" { - objectMap["kind"] = mdc.Kind - } - if mdc.Etag != nil { - objectMap["etag"] = mdc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return &mdc, true -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for MCASDataConnector. -func (mdc MCASDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &mdc, true -} - -// UnmarshalJSON is the custom unmarshaler for MCASDataConnector struct. -func (mdc *MCASDataConnector) 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 mCASDataConnectorProperties MCASDataConnectorProperties - err = json.Unmarshal(*v, &mCASDataConnectorProperties) - if err != nil { - return err - } - mdc.MCASDataConnectorProperties = &mCASDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - mdc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mdc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mdc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mdc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - mdc.Etag = &etag - } - } - } - - return nil -} - -// MCASDataConnectorDataTypes the available data types for MCAS (Microsoft Cloud App Security) data -// connector. -type MCASDataConnectorDataTypes struct { - // DiscoveryLogs - Discovery log data type connection. - DiscoveryLogs *DataConnectorDataTypeCommon `json:"discoveryLogs,omitempty"` - // Alerts - Alerts data type connection. - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` -} - -// MCASDataConnectorProperties MCAS (Microsoft Cloud App Security) data connector properties. -type MCASDataConnectorProperties struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *MCASDataConnectorDataTypes `json:"dataTypes,omitempty"` -} - -// MDATPDataConnector represents MDATP (Microsoft Defender Advanced Threat Protection) data connector. -type MDATPDataConnector struct { - // MDATPDataConnectorProperties - MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. - *MDATPDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for MDATPDataConnector. -func (mdc MDATPDataConnector) MarshalJSON() ([]byte, error) { - mdc.Kind = KindMicrosoftDefenderAdvancedThreatProtection - objectMap := make(map[string]interface{}) - if mdc.MDATPDataConnectorProperties != nil { - objectMap["properties"] = mdc.MDATPDataConnectorProperties - } - if mdc.Kind != "" { - objectMap["kind"] = mdc.Kind - } - if mdc.Etag != nil { - objectMap["etag"] = mdc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return &mdc, true -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for MDATPDataConnector. -func (mdc MDATPDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &mdc, true -} - -// UnmarshalJSON is the custom unmarshaler for MDATPDataConnector struct. -func (mdc *MDATPDataConnector) 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 mDATPDataConnectorProperties MDATPDataConnectorProperties - err = json.Unmarshal(*v, &mDATPDataConnectorProperties) - if err != nil { - return err - } - mdc.MDATPDataConnectorProperties = &mDATPDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - mdc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mdc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mdc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mdc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - mdc.Etag = &etag - } - } - } - - return nil -} - -// MDATPDataConnectorProperties MDATP (Microsoft Defender Advanced Threat Protection) data connector -// properties. -type MDATPDataConnectorProperties struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` -} - -// MicrosoftSecurityIncidentCreationAlertRule represents MicrosoftSecurityIncidentCreation rule. -type MicrosoftSecurityIncidentCreationAlertRule struct { - // MicrosoftSecurityIncidentCreationAlertRuleProperties - MicrosoftSecurityIncidentCreation rule properties - *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindAlertRule', 'KindFusion', 'KindMicrosoftSecurityIncidentCreation', 'KindScheduled' - Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for MicrosoftSecurityIncidentCreationAlertRule. -func (msicar MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error) { - msicar.Kind = KindMicrosoftSecurityIncidentCreation - objectMap := make(map[string]interface{}) - if msicar.MicrosoftSecurityIncidentCreationAlertRuleProperties != nil { - objectMap["properties"] = msicar.MicrosoftSecurityIncidentCreationAlertRuleProperties - } - if msicar.Kind != "" { - objectMap["kind"] = msicar.Kind - } - if msicar.Etag != nil { - objectMap["etag"] = msicar.Etag - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRule is the BasicAlertRule implementation for MicrosoftSecurityIncidentCreationAlertRule. -func (msicar MicrosoftSecurityIncidentCreationAlertRule) AsFusionAlertRule() (*FusionAlertRule, bool) { - return nil, false -} - -// AsMicrosoftSecurityIncidentCreationAlertRule is the BasicAlertRule implementation for MicrosoftSecurityIncidentCreationAlertRule. -func (msicar MicrosoftSecurityIncidentCreationAlertRule) AsMicrosoftSecurityIncidentCreationAlertRule() (*MicrosoftSecurityIncidentCreationAlertRule, bool) { - return &msicar, true -} - -// AsScheduledAlertRule is the BasicAlertRule implementation for MicrosoftSecurityIncidentCreationAlertRule. -func (msicar MicrosoftSecurityIncidentCreationAlertRule) AsScheduledAlertRule() (*ScheduledAlertRule, bool) { - return nil, false -} - -// AsAlertRule is the BasicAlertRule implementation for MicrosoftSecurityIncidentCreationAlertRule. -func (msicar MicrosoftSecurityIncidentCreationAlertRule) AsAlertRule() (*AlertRule, bool) { - return nil, false -} - -// AsBasicAlertRule is the BasicAlertRule implementation for MicrosoftSecurityIncidentCreationAlertRule. -func (msicar MicrosoftSecurityIncidentCreationAlertRule) AsBasicAlertRule() (BasicAlertRule, bool) { - return &msicar, true -} - -// UnmarshalJSON is the custom unmarshaler for MicrosoftSecurityIncidentCreationAlertRule struct. -func (msicar *MicrosoftSecurityIncidentCreationAlertRule) 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 microsoftSecurityIncidentCreationAlertRuleProperties MicrosoftSecurityIncidentCreationAlertRuleProperties - err = json.Unmarshal(*v, µsoftSecurityIncidentCreationAlertRuleProperties) - if err != nil { - return err - } - msicar.MicrosoftSecurityIncidentCreationAlertRuleProperties = µsoftSecurityIncidentCreationAlertRuleProperties - } - case "kind": - if v != nil { - var kind Kind - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - msicar.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - msicar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - msicar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - msicar.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - msicar.Etag = &etag - } - } - } - - return nil -} - -// MicrosoftSecurityIncidentCreationAlertRuleCommonProperties microsoftSecurityIncidentCreation rule common -// property bag. -type MicrosoftSecurityIncidentCreationAlertRuleCommonProperties struct { - // DisplayNamesFilter - the alerts' displayNames on which the cases will be generated - DisplayNamesFilter *[]string `json:"displayNamesFilter,omitempty"` - // DisplayNamesExcludeFilter - the alerts' displayNames on which the cases will not be generated - DisplayNamesExcludeFilter *[]string `json:"displayNamesExcludeFilter,omitempty"` - // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection', 'AzureSecurityCenterforIoT' - ProductFilter MicrosoftSecurityProductName `json:"productFilter,omitempty"` - // SeveritiesFilter - the alerts' severities on which the cases will be generated - SeveritiesFilter *[]AlertSeverity `json:"severitiesFilter,omitempty"` -} - -// MicrosoftSecurityIncidentCreationAlertRuleProperties microsoftSecurityIncidentCreation rule property -// bag. -type MicrosoftSecurityIncidentCreationAlertRuleProperties struct { - // AlertRuleTemplateName - The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` - // Description - The description of the alert rule. - Description *string `json:"description,omitempty"` - // DisplayName - The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty"` - // Enabled - Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` - // LastModifiedUtc - READ-ONLY; The last time that this alert has been modified. - LastModifiedUtc *date.Time `json:"lastModifiedUtc,omitempty"` - // DisplayNamesFilter - the alerts' displayNames on which the cases will be generated - DisplayNamesFilter *[]string `json:"displayNamesFilter,omitempty"` - // DisplayNamesExcludeFilter - the alerts' displayNames on which the cases will not be generated - DisplayNamesExcludeFilter *[]string `json:"displayNamesExcludeFilter,omitempty"` - // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection', 'AzureSecurityCenterforIoT' - ProductFilter MicrosoftSecurityProductName `json:"productFilter,omitempty"` - // SeveritiesFilter - the alerts' severities on which the cases will be generated - SeveritiesFilter *[]AlertSeverity `json:"severitiesFilter,omitempty"` -} - -// MarshalJSON is the custom marshaler for MicrosoftSecurityIncidentCreationAlertRuleProperties. -func (msicarp MicrosoftSecurityIncidentCreationAlertRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if msicarp.AlertRuleTemplateName != nil { - objectMap["alertRuleTemplateName"] = msicarp.AlertRuleTemplateName - } - if msicarp.Description != nil { - objectMap["description"] = msicarp.Description - } - if msicarp.DisplayName != nil { - objectMap["displayName"] = msicarp.DisplayName - } - if msicarp.Enabled != nil { - objectMap["enabled"] = msicarp.Enabled - } - if msicarp.DisplayNamesFilter != nil { - objectMap["displayNamesFilter"] = msicarp.DisplayNamesFilter - } - if msicarp.DisplayNamesExcludeFilter != nil { - objectMap["displayNamesExcludeFilter"] = msicarp.DisplayNamesExcludeFilter - } - if msicarp.ProductFilter != "" { - objectMap["productFilter"] = msicarp.ProductFilter - } - if msicarp.SeveritiesFilter != nil { - objectMap["severitiesFilter"] = msicarp.SeveritiesFilter - } - return json.Marshal(objectMap) -} - -// MicrosoftSecurityIncidentCreationAlertRuleTemplate represents MicrosoftSecurityIncidentCreation rule -// template. -type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { - // MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties - MicrosoftSecurityIncidentCreation rule template properties - *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindBasicAlertRuleTemplateKindAlertRuleTemplate', 'KindBasicAlertRuleTemplateKindFusion', 'KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation', 'KindBasicAlertRuleTemplateKindScheduled' - Kind KindBasicAlertRuleTemplate `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for MicrosoftSecurityIncidentCreationAlertRuleTemplate. -func (msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byte, error) { - msicart.Kind = KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation - objectMap := make(map[string]interface{}) - if msicart.MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties != nil { - objectMap["properties"] = msicart.MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties - } - if msicart.Kind != "" { - objectMap["kind"] = msicart.Kind - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRuleTemplate is the BasicAlertRuleTemplate implementation for MicrosoftSecurityIncidentCreationAlertRuleTemplate. -func (msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate) AsFusionAlertRuleTemplate() (*FusionAlertRuleTemplate, bool) { - return nil, false -} - -// AsMicrosoftSecurityIncidentCreationAlertRuleTemplate is the BasicAlertRuleTemplate implementation for MicrosoftSecurityIncidentCreationAlertRuleTemplate. -func (msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate) AsMicrosoftSecurityIncidentCreationAlertRuleTemplate() (*MicrosoftSecurityIncidentCreationAlertRuleTemplate, bool) { - return &msicart, true -} - -// AsScheduledAlertRuleTemplate is the BasicAlertRuleTemplate implementation for MicrosoftSecurityIncidentCreationAlertRuleTemplate. -func (msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate) AsScheduledAlertRuleTemplate() (*ScheduledAlertRuleTemplate, bool) { - return nil, false -} - -// AsAlertRuleTemplate is the BasicAlertRuleTemplate implementation for MicrosoftSecurityIncidentCreationAlertRuleTemplate. -func (msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate) AsAlertRuleTemplate() (*AlertRuleTemplate, bool) { - return nil, false -} - -// AsBasicAlertRuleTemplate is the BasicAlertRuleTemplate implementation for MicrosoftSecurityIncidentCreationAlertRuleTemplate. -func (msicart MicrosoftSecurityIncidentCreationAlertRuleTemplate) AsBasicAlertRuleTemplate() (BasicAlertRuleTemplate, bool) { - return &msicart, true -} - -// UnmarshalJSON is the custom unmarshaler for MicrosoftSecurityIncidentCreationAlertRuleTemplate struct. -func (msicart *MicrosoftSecurityIncidentCreationAlertRuleTemplate) 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 microsoftSecurityIncidentCreationAlertRuleTemplateProperties MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties - err = json.Unmarshal(*v, µsoftSecurityIncidentCreationAlertRuleTemplateProperties) - if err != nil { - return err - } - msicart.MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties = µsoftSecurityIncidentCreationAlertRuleTemplateProperties - } - case "kind": - if v != nil { - var kind KindBasicAlertRuleTemplate - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - msicart.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - msicart.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - msicart.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - msicart.Type = &typeVar - } - } - } - - return nil -} - -// MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties microsoftSecurityIncidentCreation rule -// template properties -type MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties struct { - // AlertRulesCreatedByTemplateCount - the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` - // CreatedDateUTC - READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *date.Time `json:"createdDateUTC,omitempty"` - // Description - The description of the alert rule template. - Description *string `json:"description,omitempty"` - // DisplayName - The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` - // RequiredDataConnectors - The required data connectors for this template - RequiredDataConnectors *[]AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` - // Status - The alert rule template status. Possible values include: 'Installed', 'Available', 'NotAvailable' - Status TemplateStatus `json:"status,omitempty"` - // DisplayNamesFilter - the alerts' displayNames on which the cases will be generated - DisplayNamesFilter *[]string `json:"displayNamesFilter,omitempty"` - // DisplayNamesExcludeFilter - the alerts' displayNames on which the cases will not be generated - DisplayNamesExcludeFilter *[]string `json:"displayNamesExcludeFilter,omitempty"` - // ProductFilter - The alerts' productName on which the cases will be generated. Possible values include: 'MicrosoftCloudAppSecurity', 'AzureSecurityCenter', 'AzureAdvancedThreatProtection', 'AzureActiveDirectoryIdentityProtection', 'AzureSecurityCenterforIoT' - ProductFilter MicrosoftSecurityProductName `json:"productFilter,omitempty"` - // SeveritiesFilter - the alerts' severities on which the cases will be generated - SeveritiesFilter *[]AlertSeverity `json:"severitiesFilter,omitempty"` -} - -// MarshalJSON is the custom marshaler for MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties. -func (msicartp MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if msicartp.AlertRulesCreatedByTemplateCount != nil { - objectMap["alertRulesCreatedByTemplateCount"] = msicartp.AlertRulesCreatedByTemplateCount - } - if msicartp.Description != nil { - objectMap["description"] = msicartp.Description - } - if msicartp.DisplayName != nil { - objectMap["displayName"] = msicartp.DisplayName - } - if msicartp.RequiredDataConnectors != nil { - objectMap["requiredDataConnectors"] = msicartp.RequiredDataConnectors - } - if msicartp.Status != "" { - objectMap["status"] = msicartp.Status - } - if msicartp.DisplayNamesFilter != nil { - objectMap["displayNamesFilter"] = msicartp.DisplayNamesFilter - } - if msicartp.DisplayNamesExcludeFilter != nil { - objectMap["displayNamesExcludeFilter"] = msicartp.DisplayNamesExcludeFilter - } - if msicartp.ProductFilter != "" { - objectMap["productFilter"] = msicartp.ProductFilter - } - if msicartp.SeveritiesFilter != nil { - objectMap["severitiesFilter"] = msicartp.SeveritiesFilter - } - return json.Marshal(objectMap) -} - -// OfficeConsent consent for Office365 tenant that already made. -type OfficeConsent struct { - // OfficeConsentProperties - Office consent properties - *OfficeConsentProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for OfficeConsent. -func (oc OfficeConsent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if oc.OfficeConsentProperties != nil { - objectMap["properties"] = oc.OfficeConsentProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OfficeConsent struct. -func (oc *OfficeConsent) 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 officeConsentProperties OfficeConsentProperties - err = json.Unmarshal(*v, &officeConsentProperties) - if err != nil { - return err - } - oc.OfficeConsentProperties = &officeConsentProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - oc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - oc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - oc.Type = &typeVar - } - } - } - - return nil -} - -// OfficeConsentList list of all the office365 consents. -type OfficeConsentList struct { - // NextLink - READ-ONLY; URL to fetch the next set of office consents. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of the consents. - Value *[]OfficeConsent `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for OfficeConsentList. -func (ocl OfficeConsentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ocl.Value != nil { - objectMap["value"] = ocl.Value - } - return json.Marshal(objectMap) -} - -// OfficeConsentProperties consent property bag. -type OfficeConsentProperties struct { - // TenantID - The tenantId of the Office365 with the consent. - TenantID *string `json:"tenantId,omitempty"` - // TenantName - READ-ONLY; The tenant name of the Office365 with the consent. - TenantName *string `json:"tenantName,omitempty"` -} - -// MarshalJSON is the custom marshaler for OfficeConsentProperties. -func (ocp OfficeConsentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ocp.TenantID != nil { - objectMap["tenantId"] = ocp.TenantID - } - return json.Marshal(objectMap) -} - -// OfficeDataConnector represents office data connector. -type OfficeDataConnector struct { - // OfficeDataConnectorProperties - Office data connector properties. - *OfficeDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for OfficeDataConnector. -func (odc OfficeDataConnector) MarshalJSON() ([]byte, error) { - odc.Kind = KindOffice365 - objectMap := make(map[string]interface{}) - if odc.OfficeDataConnectorProperties != nil { - objectMap["properties"] = odc.OfficeDataConnectorProperties - } - if odc.Kind != "" { - objectMap["kind"] = odc.Kind - } - if odc.Etag != nil { - objectMap["etag"] = odc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return &odc, true -} - -// AsTIDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return nil, false -} - -// AsDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for OfficeDataConnector. -func (odc OfficeDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &odc, true -} - -// UnmarshalJSON is the custom unmarshaler for OfficeDataConnector struct. -func (odc *OfficeDataConnector) 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 officeDataConnectorProperties OfficeDataConnectorProperties - err = json.Unmarshal(*v, &officeDataConnectorProperties) - if err != nil { - return err - } - odc.OfficeDataConnectorProperties = &officeDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - odc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - odc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - odc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - odc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - odc.Etag = &etag - } - } - } - - return nil -} - -// OfficeDataConnectorDataTypes the available data types for office data connector. -type OfficeDataConnectorDataTypes struct { - // Exchange - Exchange data type connection. - Exchange *OfficeDataConnectorDataTypesExchange `json:"exchange,omitempty"` - // SharePoint - SharePoint data type connection. - SharePoint *OfficeDataConnectorDataTypesSharePoint `json:"sharePoint,omitempty"` -} - -// OfficeDataConnectorDataTypesExchange exchange data type connection. -type OfficeDataConnectorDataTypesExchange struct { - // State - Describe whether this data type connection is enabled or not. Possible values include: 'Enabled', 'Disabled' - State DataTypeState `json:"state,omitempty"` -} - -// OfficeDataConnectorDataTypesSharePoint sharePoint data type connection. -type OfficeDataConnectorDataTypesSharePoint struct { - // State - Describe whether this data type connection is enabled or not. Possible values include: 'Enabled', 'Disabled' - State DataTypeState `json:"state,omitempty"` -} - -// OfficeDataConnectorProperties office data connector properties. -type OfficeDataConnectorProperties struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *OfficeDataConnectorDataTypes `json:"dataTypes,omitempty"` -} - -// Operation operation provided by provider -type Operation struct { - // Display - Properties of the operation - Display *OperationDisplay `json:"display,omitempty"` - // Name - Name of the operation - Name *string `json:"name,omitempty"` -} - -// OperationDisplay properties of the operation -type OperationDisplay struct { - // Description - Description of the operation - Description *string `json:"description,omitempty"` - // Operation - Operation name - Operation *string `json:"operation,omitempty"` - // Provider - Provider name - Provider *string `json:"provider,omitempty"` - // Resource - Resource name - Resource *string `json:"resource,omitempty"` -} - -// OperationsList lists the operations available in the SecurityInsights RP. -type OperationsList struct { - autorest.Response `json:"-"` - // NextLink - URL to fetch the next set of operations. - NextLink *string `json:"nextLink,omitempty"` - // Value - Array of operations - Value *[]Operation `json:"value,omitempty"` -} - -// OperationsListIterator provides access to a complete listing of Operation values. -type OperationsListIterator struct { - i int - page OperationsListPage -} - -// 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 *OperationsListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListIterator.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 *OperationsListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationsListIterator) 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 OperationsListIterator) Response() OperationsList { - 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 OperationsListIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationsListIterator type. -func NewOperationsListIterator(page OperationsListPage) OperationsListIterator { - return OperationsListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ol OperationsList) IsEmpty() bool { - return ol.Value == nil || len(*ol.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ol OperationsList) hasNextLink() bool { - return ol.NextLink != nil && len(*ol.NextLink) != 0 -} - -// operationsListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ol OperationsList) operationsListPreparer(ctx context.Context) (*http.Request, error) { - if !ol.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ol.NextLink))) -} - -// OperationsListPage contains a page of Operation values. -type OperationsListPage struct { - fn func(context.Context, OperationsList) (OperationsList, error) - ol OperationsList -} - -// 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 *OperationsListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.ol) - if err != nil { - return err - } - page.ol = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *OperationsListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationsListPage) NotDone() bool { - return !page.ol.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationsListPage) Response() OperationsList { - return page.ol -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationsListPage) Values() []Operation { - if page.ol.IsEmpty() { - return nil - } - return *page.ol.Value -} - -// Creates a new instance of the OperationsListPage type. -func NewOperationsListPage(cur OperationsList, getNextPage func(context.Context, OperationsList) (OperationsList, error)) OperationsListPage { - return OperationsListPage{ - fn: getNextPage, - ol: cur, - } -} - -// Resource an azure resource object -type Resource struct { - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceWithEtag an azure resource object with an Etag property -type ResourceWithEtag struct { - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceWithEtag. -func (rwe ResourceWithEtag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rwe.Etag != nil { - objectMap["etag"] = rwe.Etag - } - return json.Marshal(objectMap) -} - -// ScheduledAlertRule represents scheduled alert rule. -type ScheduledAlertRule struct { - // ScheduledAlertRuleProperties - Scheduled alert rule properties - *ScheduledAlertRuleProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindAlertRule', 'KindFusion', 'KindMicrosoftSecurityIncidentCreation', 'KindScheduled' - Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ScheduledAlertRule. -func (sar ScheduledAlertRule) MarshalJSON() ([]byte, error) { - sar.Kind = KindScheduled - objectMap := make(map[string]interface{}) - if sar.ScheduledAlertRuleProperties != nil { - objectMap["properties"] = sar.ScheduledAlertRuleProperties - } - if sar.Kind != "" { - objectMap["kind"] = sar.Kind - } - if sar.Etag != nil { - objectMap["etag"] = sar.Etag - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRule is the BasicAlertRule implementation for ScheduledAlertRule. -func (sar ScheduledAlertRule) AsFusionAlertRule() (*FusionAlertRule, bool) { - return nil, false -} - -// AsMicrosoftSecurityIncidentCreationAlertRule is the BasicAlertRule implementation for ScheduledAlertRule. -func (sar ScheduledAlertRule) AsMicrosoftSecurityIncidentCreationAlertRule() (*MicrosoftSecurityIncidentCreationAlertRule, bool) { - return nil, false -} - -// AsScheduledAlertRule is the BasicAlertRule implementation for ScheduledAlertRule. -func (sar ScheduledAlertRule) AsScheduledAlertRule() (*ScheduledAlertRule, bool) { - return &sar, true -} - -// AsAlertRule is the BasicAlertRule implementation for ScheduledAlertRule. -func (sar ScheduledAlertRule) AsAlertRule() (*AlertRule, bool) { - return nil, false -} - -// AsBasicAlertRule is the BasicAlertRule implementation for ScheduledAlertRule. -func (sar ScheduledAlertRule) AsBasicAlertRule() (BasicAlertRule, bool) { - return &sar, true -} - -// UnmarshalJSON is the custom unmarshaler for ScheduledAlertRule struct. -func (sar *ScheduledAlertRule) 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 scheduledAlertRuleProperties ScheduledAlertRuleProperties - err = json.Unmarshal(*v, &scheduledAlertRuleProperties) - if err != nil { - return err - } - sar.ScheduledAlertRuleProperties = &scheduledAlertRuleProperties - } - case "kind": - if v != nil { - var kind Kind - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sar.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sar.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sar.Etag = &etag - } - } - } - - return nil -} - -// ScheduledAlertRuleCommonProperties schedule alert rule template property bag. -type ScheduledAlertRuleCommonProperties struct { - // Query - The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` - // QueryFrequency - The frequency (in ISO 8601 duration format) for this alert rule to run. - QueryFrequency *string `json:"queryFrequency,omitempty"` - // QueryPeriod - The period (in ISO 8601 duration format) that this alert rule looks at. - QueryPeriod *string `json:"queryPeriod,omitempty"` - // Severity - The severity for alerts created by this alert rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' - Severity AlertSeverity `json:"severity,omitempty"` - // TriggerOperator - The operation against the threshold that triggers alert rule. Possible values include: 'GreaterThan', 'LessThan', 'Equal', 'NotEqual' - TriggerOperator TriggerOperator `json:"triggerOperator,omitempty"` - // TriggerThreshold - The threshold triggers this alert rule. - TriggerThreshold *int32 `json:"triggerThreshold,omitempty"` -} - -// ScheduledAlertRuleProperties scheduled alert rule base property bag. -type ScheduledAlertRuleProperties struct { - // AlertRuleTemplateName - The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` - // Description - The description of the alert rule. - Description *string `json:"description,omitempty"` - // DisplayName - The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty"` - // Enabled - Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` - // LastModifiedUtc - READ-ONLY; The last time that this alert rule has been modified. - LastModifiedUtc *date.Time `json:"lastModifiedUtc,omitempty"` - // SuppressionDuration - The suppression (in ISO 8601 duration format) to wait since last time this alert rule been triggered. - SuppressionDuration *string `json:"suppressionDuration,omitempty"` - // SuppressionEnabled - Determines whether the suppression for this alert rule is enabled or disabled. - SuppressionEnabled *bool `json:"suppressionEnabled,omitempty"` - // Tactics - The tactics of the alert rule - Tactics *[]AttackTactic `json:"tactics,omitempty"` - // Query - The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` - // QueryFrequency - The frequency (in ISO 8601 duration format) for this alert rule to run. - QueryFrequency *string `json:"queryFrequency,omitempty"` - // QueryPeriod - The period (in ISO 8601 duration format) that this alert rule looks at. - QueryPeriod *string `json:"queryPeriod,omitempty"` - // Severity - The severity for alerts created by this alert rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' - Severity AlertSeverity `json:"severity,omitempty"` - // TriggerOperator - The operation against the threshold that triggers alert rule. Possible values include: 'GreaterThan', 'LessThan', 'Equal', 'NotEqual' - TriggerOperator TriggerOperator `json:"triggerOperator,omitempty"` - // TriggerThreshold - The threshold triggers this alert rule. - TriggerThreshold *int32 `json:"triggerThreshold,omitempty"` -} - -// MarshalJSON is the custom marshaler for ScheduledAlertRuleProperties. -func (sarp ScheduledAlertRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sarp.AlertRuleTemplateName != nil { - objectMap["alertRuleTemplateName"] = sarp.AlertRuleTemplateName - } - if sarp.Description != nil { - objectMap["description"] = sarp.Description - } - if sarp.DisplayName != nil { - objectMap["displayName"] = sarp.DisplayName - } - if sarp.Enabled != nil { - objectMap["enabled"] = sarp.Enabled - } - if sarp.SuppressionDuration != nil { - objectMap["suppressionDuration"] = sarp.SuppressionDuration - } - if sarp.SuppressionEnabled != nil { - objectMap["suppressionEnabled"] = sarp.SuppressionEnabled - } - if sarp.Tactics != nil { - objectMap["tactics"] = sarp.Tactics - } - if sarp.Query != nil { - objectMap["query"] = sarp.Query - } - if sarp.QueryFrequency != nil { - objectMap["queryFrequency"] = sarp.QueryFrequency - } - if sarp.QueryPeriod != nil { - objectMap["queryPeriod"] = sarp.QueryPeriod - } - if sarp.Severity != "" { - objectMap["severity"] = sarp.Severity - } - if sarp.TriggerOperator != "" { - objectMap["triggerOperator"] = sarp.TriggerOperator - } - if sarp.TriggerThreshold != nil { - objectMap["triggerThreshold"] = sarp.TriggerThreshold - } - return json.Marshal(objectMap) -} - -// ScheduledAlertRuleTemplate represents scheduled alert rule template. -type ScheduledAlertRuleTemplate struct { - // ScheduledAlertRuleTemplateProperties - Scheduled alert rule template properties - *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindBasicAlertRuleTemplateKindAlertRuleTemplate', 'KindBasicAlertRuleTemplateKindFusion', 'KindBasicAlertRuleTemplateKindMicrosoftSecurityIncidentCreation', 'KindBasicAlertRuleTemplateKindScheduled' - Kind KindBasicAlertRuleTemplate `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ScheduledAlertRuleTemplate. -func (sart ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { - sart.Kind = KindBasicAlertRuleTemplateKindScheduled - objectMap := make(map[string]interface{}) - if sart.ScheduledAlertRuleTemplateProperties != nil { - objectMap["properties"] = sart.ScheduledAlertRuleTemplateProperties - } - if sart.Kind != "" { - objectMap["kind"] = sart.Kind - } - return json.Marshal(objectMap) -} - -// AsFusionAlertRuleTemplate is the BasicAlertRuleTemplate implementation for ScheduledAlertRuleTemplate. -func (sart ScheduledAlertRuleTemplate) AsFusionAlertRuleTemplate() (*FusionAlertRuleTemplate, bool) { - return nil, false -} - -// AsMicrosoftSecurityIncidentCreationAlertRuleTemplate is the BasicAlertRuleTemplate implementation for ScheduledAlertRuleTemplate. -func (sart ScheduledAlertRuleTemplate) AsMicrosoftSecurityIncidentCreationAlertRuleTemplate() (*MicrosoftSecurityIncidentCreationAlertRuleTemplate, bool) { - return nil, false -} - -// AsScheduledAlertRuleTemplate is the BasicAlertRuleTemplate implementation for ScheduledAlertRuleTemplate. -func (sart ScheduledAlertRuleTemplate) AsScheduledAlertRuleTemplate() (*ScheduledAlertRuleTemplate, bool) { - return &sart, true -} - -// AsAlertRuleTemplate is the BasicAlertRuleTemplate implementation for ScheduledAlertRuleTemplate. -func (sart ScheduledAlertRuleTemplate) AsAlertRuleTemplate() (*AlertRuleTemplate, bool) { - return nil, false -} - -// AsBasicAlertRuleTemplate is the BasicAlertRuleTemplate implementation for ScheduledAlertRuleTemplate. -func (sart ScheduledAlertRuleTemplate) AsBasicAlertRuleTemplate() (BasicAlertRuleTemplate, bool) { - return &sart, true -} - -// UnmarshalJSON is the custom unmarshaler for ScheduledAlertRuleTemplate struct. -func (sart *ScheduledAlertRuleTemplate) 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 scheduledAlertRuleTemplateProperties ScheduledAlertRuleTemplateProperties - err = json.Unmarshal(*v, &scheduledAlertRuleTemplateProperties) - if err != nil { - return err - } - sart.ScheduledAlertRuleTemplateProperties = &scheduledAlertRuleTemplateProperties - } - case "kind": - if v != nil { - var kind KindBasicAlertRuleTemplate - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sart.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sart.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sart.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sart.Type = &typeVar - } - } - } - - return nil -} - -// ScheduledAlertRuleTemplateProperties scheduled alert rule template properties -type ScheduledAlertRuleTemplateProperties struct { - // AlertRulesCreatedByTemplateCount - the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` - // CreatedDateUTC - READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *date.Time `json:"createdDateUTC,omitempty"` - // Description - The description of the alert rule template. - Description *string `json:"description,omitempty"` - // DisplayName - The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` - // RequiredDataConnectors - The required data connectors for this template - RequiredDataConnectors *[]AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` - // Status - The alert rule template status. Possible values include: 'Installed', 'Available', 'NotAvailable' - Status TemplateStatus `json:"status,omitempty"` - // Query - The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` - // QueryFrequency - The frequency (in ISO 8601 duration format) for this alert rule to run. - QueryFrequency *string `json:"queryFrequency,omitempty"` - // QueryPeriod - The period (in ISO 8601 duration format) that this alert rule looks at. - QueryPeriod *string `json:"queryPeriod,omitempty"` - // Severity - The severity for alerts created by this alert rule. Possible values include: 'High', 'Medium', 'Low', 'Informational' - Severity AlertSeverity `json:"severity,omitempty"` - // TriggerOperator - The operation against the threshold that triggers alert rule. Possible values include: 'GreaterThan', 'LessThan', 'Equal', 'NotEqual' - TriggerOperator TriggerOperator `json:"triggerOperator,omitempty"` - // TriggerThreshold - The threshold triggers this alert rule. - TriggerThreshold *int32 `json:"triggerThreshold,omitempty"` - // Tactics - The tactics of the alert rule template - Tactics *[]AttackTactic `json:"tactics,omitempty"` -} - -// MarshalJSON is the custom marshaler for ScheduledAlertRuleTemplateProperties. -func (sartp ScheduledAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sartp.AlertRulesCreatedByTemplateCount != nil { - objectMap["alertRulesCreatedByTemplateCount"] = sartp.AlertRulesCreatedByTemplateCount - } - if sartp.Description != nil { - objectMap["description"] = sartp.Description - } - if sartp.DisplayName != nil { - objectMap["displayName"] = sartp.DisplayName - } - if sartp.RequiredDataConnectors != nil { - objectMap["requiredDataConnectors"] = sartp.RequiredDataConnectors - } - if sartp.Status != "" { - objectMap["status"] = sartp.Status - } - if sartp.Query != nil { - objectMap["query"] = sartp.Query - } - if sartp.QueryFrequency != nil { - objectMap["queryFrequency"] = sartp.QueryFrequency - } - if sartp.QueryPeriod != nil { - objectMap["queryPeriod"] = sartp.QueryPeriod - } - if sartp.Severity != "" { - objectMap["severity"] = sartp.Severity - } - if sartp.TriggerOperator != "" { - objectMap["triggerOperator"] = sartp.TriggerOperator - } - if sartp.TriggerThreshold != nil { - objectMap["triggerThreshold"] = sartp.TriggerThreshold - } - if sartp.Tactics != nil { - objectMap["tactics"] = sartp.Tactics - } - return json.Marshal(objectMap) -} - -// BasicSettings the Settings. -type BasicSettings interface { - AsToggleSettings() (*ToggleSettings, bool) - AsUebaSettings() (*UebaSettings, bool) - AsSettings() (*Settings, bool) -} - -// Settings the Settings. -type Settings struct { - // Kind - Possible values include: 'KindSettings', 'KindToggleSettings', 'KindUebaSettings' - Kind KindBasicSettings `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -func unmarshalBasicSettings(body []byte) (BasicSettings, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["kind"] { - case string(KindToggleSettings): - var ts ToggleSettings - err := json.Unmarshal(body, &ts) - return ts, err - case string(KindUebaSettings): - var us UebaSettings - err := json.Unmarshal(body, &us) - return us, err - default: - var s Settings - err := json.Unmarshal(body, &s) - return s, err - } -} -func unmarshalBasicSettingsArray(body []byte) ([]BasicSettings, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - sArray := make([]BasicSettings, len(rawMessages)) - - for index, rawMessage := range rawMessages { - s, err := unmarshalBasicSettings(*rawMessage) - if err != nil { - return nil, err - } - sArray[index] = s - } - return sArray, nil -} - -// MarshalJSON is the custom marshaler for Settings. -func (s Settings) MarshalJSON() ([]byte, error) { - s.Kind = KindSettings - objectMap := make(map[string]interface{}) - if s.Kind != "" { - objectMap["kind"] = s.Kind - } - if s.Etag != nil { - objectMap["etag"] = s.Etag - } - return json.Marshal(objectMap) -} - -// AsToggleSettings is the BasicSettings implementation for Settings. -func (s Settings) AsToggleSettings() (*ToggleSettings, bool) { - return nil, false -} - -// AsUebaSettings is the BasicSettings implementation for Settings. -func (s Settings) AsUebaSettings() (*UebaSettings, bool) { - return nil, false -} - -// AsSettings is the BasicSettings implementation for Settings. -func (s Settings) AsSettings() (*Settings, bool) { - return &s, true -} - -// AsBasicSettings is the BasicSettings implementation for Settings. -func (s Settings) AsBasicSettings() (BasicSettings, bool) { - return &s, true -} - -// ThreatIntelligence threatIntelligence property bag. -type ThreatIntelligence struct { - // Confidence - READ-ONLY; Confidence (must be between 0 and 1) - Confidence *float64 `json:"confidence,omitempty"` - // ProviderName - READ-ONLY; Name of the provider from whom this Threat Intelligence information was received - ProviderName *string `json:"providerName,omitempty"` - // ReportLink - READ-ONLY; Report link - ReportLink *string `json:"reportLink,omitempty"` - // ThreatDescription - READ-ONLY; Threat description (free text) - ThreatDescription *string `json:"threatDescription,omitempty"` - // ThreatName - READ-ONLY; Threat name (e.g. "Jedobot malware") - ThreatName *string `json:"threatName,omitempty"` - // ThreatType - READ-ONLY; Threat type (e.g. "Botnet") - ThreatType *string `json:"threatType,omitempty"` -} - -// MarshalJSON is the custom marshaler for ThreatIntelligence. -func (ti ThreatIntelligence) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// TIDataConnector represents threat intelligence data connector. -type TIDataConnector struct { - // TIDataConnectorProperties - TI (Threat Intelligence) data connector properties. - *TIDataConnectorProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindDataConnector', 'KindAzureActiveDirectory', 'KindAzureAdvancedThreatProtection', 'KindAzureSecurityCenter', 'KindAmazonWebServicesCloudTrail', 'KindMicrosoftCloudAppSecurity', 'KindMicrosoftDefenderAdvancedThreatProtection', 'KindOffice365', 'KindThreatIntelligence' - Kind KindBasicDataConnector `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for TIDataConnector. -func (tdc TIDataConnector) MarshalJSON() ([]byte, error) { - tdc.Kind = KindThreatIntelligence - objectMap := make(map[string]interface{}) - if tdc.TIDataConnectorProperties != nil { - objectMap["properties"] = tdc.TIDataConnectorProperties - } - if tdc.Kind != "" { - objectMap["kind"] = tdc.Kind - } - if tdc.Etag != nil { - objectMap["etag"] = tdc.Etag - } - return json.Marshal(objectMap) -} - -// AsAADDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsAADDataConnector() (*AADDataConnector, bool) { - return nil, false -} - -// AsAATPDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsAATPDataConnector() (*AATPDataConnector, bool) { - return nil, false -} - -// AsASCDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsASCDataConnector() (*ASCDataConnector, bool) { - return nil, false -} - -// AsAwsCloudTrailDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsAwsCloudTrailDataConnector() (*AwsCloudTrailDataConnector, bool) { - return nil, false -} - -// AsMCASDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsMCASDataConnector() (*MCASDataConnector, bool) { - return nil, false -} - -// AsMDATPDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsMDATPDataConnector() (*MDATPDataConnector, bool) { - return nil, false -} - -// AsOfficeDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsOfficeDataConnector() (*OfficeDataConnector, bool) { - return nil, false -} - -// AsTIDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsTIDataConnector() (*TIDataConnector, bool) { - return &tdc, true -} - -// AsDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsDataConnector() (*DataConnector, bool) { - return nil, false -} - -// AsBasicDataConnector is the BasicDataConnector implementation for TIDataConnector. -func (tdc TIDataConnector) AsBasicDataConnector() (BasicDataConnector, bool) { - return &tdc, true -} - -// UnmarshalJSON is the custom unmarshaler for TIDataConnector struct. -func (tdc *TIDataConnector) 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 tIDataConnectorProperties TIDataConnectorProperties - err = json.Unmarshal(*v, &tIDataConnectorProperties) - if err != nil { - return err - } - tdc.TIDataConnectorProperties = &tIDataConnectorProperties - } - case "kind": - if v != nil { - var kind KindBasicDataConnector - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - tdc.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - tdc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - tdc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - tdc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - tdc.Etag = &etag - } - } - } - - return nil -} - -// TIDataConnectorDataTypes the available data types for TI (Threat Intelligence) data connector. -type TIDataConnectorDataTypes struct { - // Indicators - Data type for indicators connection. - Indicators *TIDataConnectorDataTypesIndicators `json:"indicators,omitempty"` -} - -// TIDataConnectorDataTypesIndicators data type for indicators connection. -type TIDataConnectorDataTypesIndicators struct { - // State - Describe whether this data type connection is enabled or not. Possible values include: 'Enabled', 'Disabled' - State DataTypeState `json:"state,omitempty"` -} - -// TIDataConnectorProperties TI (Threat Intelligence) data connector properties. -type TIDataConnectorProperties struct { - // TenantID - The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` - // DataTypes - The available data types for the connector. - DataTypes *TIDataConnectorDataTypes `json:"dataTypes,omitempty"` -} - -// ToggleSettings settings with single toggle. -type ToggleSettings struct { - // ToggleSettingsProperties - toggle properties - *ToggleSettingsProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindSettings', 'KindToggleSettings', 'KindUebaSettings' - Kind KindBasicSettings `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ToggleSettings. -func (ts ToggleSettings) MarshalJSON() ([]byte, error) { - ts.Kind = KindToggleSettings - objectMap := make(map[string]interface{}) - if ts.ToggleSettingsProperties != nil { - objectMap["properties"] = ts.ToggleSettingsProperties - } - if ts.Kind != "" { - objectMap["kind"] = ts.Kind - } - if ts.Etag != nil { - objectMap["etag"] = ts.Etag - } - return json.Marshal(objectMap) -} - -// AsToggleSettings is the BasicSettings implementation for ToggleSettings. -func (ts ToggleSettings) AsToggleSettings() (*ToggleSettings, bool) { - return &ts, true -} - -// AsUebaSettings is the BasicSettings implementation for ToggleSettings. -func (ts ToggleSettings) AsUebaSettings() (*UebaSettings, bool) { - return nil, false -} - -// AsSettings is the BasicSettings implementation for ToggleSettings. -func (ts ToggleSettings) AsSettings() (*Settings, bool) { - return nil, false -} - -// AsBasicSettings is the BasicSettings implementation for ToggleSettings. -func (ts ToggleSettings) AsBasicSettings() (BasicSettings, bool) { - return &ts, true -} - -// UnmarshalJSON is the custom unmarshaler for ToggleSettings struct. -func (ts *ToggleSettings) 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 toggleSettingsProperties ToggleSettingsProperties - err = json.Unmarshal(*v, &toggleSettingsProperties) - if err != nil { - return err - } - ts.ToggleSettingsProperties = &toggleSettingsProperties - } - case "kind": - if v != nil { - var kind KindBasicSettings - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ts.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ts.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ts.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ts.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ts.Etag = &etag - } - } - } - - return nil -} - -// ToggleSettingsProperties toggle property bag. -type ToggleSettingsProperties struct { - // IsEnabled - Determines whether the setting is enable or disabled. - IsEnabled *bool `json:"isEnabled,omitempty"` -} - -// UebaSettings represents settings for User and Entity Behavior Analytics enablement. -type UebaSettings struct { - // UebaSettingsProperties - User and Entity Behavior Analytics settings properties - *UebaSettingsProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindSettings', 'KindToggleSettings', 'KindUebaSettings' - Kind KindBasicSettings `json:"kind,omitempty"` - // ID - READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Azure resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Azure resource type - Type *string `json:"type,omitempty"` - // Etag - Etag of the azure resource - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for UebaSettings. -func (us UebaSettings) MarshalJSON() ([]byte, error) { - us.Kind = KindUebaSettings - objectMap := make(map[string]interface{}) - if us.UebaSettingsProperties != nil { - objectMap["properties"] = us.UebaSettingsProperties - } - if us.Kind != "" { - objectMap["kind"] = us.Kind - } - if us.Etag != nil { - objectMap["etag"] = us.Etag - } - return json.Marshal(objectMap) -} - -// AsToggleSettings is the BasicSettings implementation for UebaSettings. -func (us UebaSettings) AsToggleSettings() (*ToggleSettings, bool) { - return nil, false -} - -// AsUebaSettings is the BasicSettings implementation for UebaSettings. -func (us UebaSettings) AsUebaSettings() (*UebaSettings, bool) { - return &us, true -} - -// AsSettings is the BasicSettings implementation for UebaSettings. -func (us UebaSettings) AsSettings() (*Settings, bool) { - return nil, false -} - -// AsBasicSettings is the BasicSettings implementation for UebaSettings. -func (us UebaSettings) AsBasicSettings() (BasicSettings, bool) { - return &us, true -} - -// UnmarshalJSON is the custom unmarshaler for UebaSettings struct. -func (us *UebaSettings) 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 uebaSettingsProperties UebaSettingsProperties - err = json.Unmarshal(*v, &uebaSettingsProperties) - if err != nil { - return err - } - us.UebaSettingsProperties = &uebaSettingsProperties - } - case "kind": - if v != nil { - var kind KindBasicSettings - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - us.Kind = kind - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - us.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - us.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - us.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - us.Etag = &etag - } - } - } - - return nil -} - -// UebaSettingsProperties user and Entity Behavior Analytics settings property bag. -type UebaSettingsProperties struct { - // AtpLicenseStatus - READ-ONLY; Determines whether the tenant has ATP (Advanced Threat Protection) license. Possible values include: 'LicenseStatusEnabled', 'LicenseStatusDisabled' - AtpLicenseStatus LicenseStatus `json:"atpLicenseStatus,omitempty"` - // IsEnabled - Determines whether User and Entity Behavior Analytics is enabled for this workspace. - IsEnabled *bool `json:"isEnabled,omitempty"` - // StatusInMcas - READ-ONLY; Determines whether User and Entity Behavior Analytics is enabled from MCAS (Microsoft Cloud App Security). Possible values include: 'StatusInMcasEnabled', 'StatusInMcasDisabled' - StatusInMcas StatusInMcas `json:"statusInMcas,omitempty"` -} - -// MarshalJSON is the custom marshaler for UebaSettingsProperties. -func (usp UebaSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if usp.IsEnabled != nil { - objectMap["isEnabled"] = usp.IsEnabled - } - return json.Marshal(objectMap) -} - -// UserInfo user information that made some action -type UserInfo struct { - // Email - READ-ONLY; The email of the user. - Email *string `json:"email,omitempty"` - // Name - READ-ONLY; The name of the user. - Name *string `json:"name,omitempty"` - // ObjectID - The object id of the user. - ObjectID *uuid.UUID `json:"objectId,omitempty"` -} - -// MarshalJSON is the custom marshaler for UserInfo. -func (UI UserInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if UI.ObjectID != nil { - objectMap["objectId"] = UI.ObjectID - } - return json.Marshal(objectMap) -} diff --git a/services/securityinsight/mgmt/v1.0/securityinsight/securityinsightapi/interfaces.go b/services/securityinsight/mgmt/v1.0/securityinsight/securityinsightapi/interfaces.go deleted file mode 100644 index 95c574c9bcbb..000000000000 --- a/services/securityinsight/mgmt/v1.0/securityinsight/securityinsightapi/interfaces.go +++ /dev/null @@ -1,95 +0,0 @@ -package securityinsightapi - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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/securityinsight/mgmt/v1.0/securityinsight" - "github.com/Azure/go-autorest/autorest" -) - -// OperationsClientAPI contains the set of methods on the OperationsClient type. -type OperationsClientAPI interface { - List(ctx context.Context) (result securityinsight.OperationsListPage, err error) - ListComplete(ctx context.Context) (result securityinsight.OperationsListIterator, err error) -} - -var _ OperationsClientAPI = (*securityinsight.OperationsClient)(nil) - -// AlertRulesClientAPI contains the set of methods on the AlertRulesClient type. -type AlertRulesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, alertRule securityinsight.BasicAlertRule) (result securityinsight.AlertRuleModel, err error) - CreateOrUpdateAction(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string, action securityinsight.ActionRequest) (result securityinsight.ActionResponse, err error) - Delete(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result autorest.Response, err error) - DeleteAction(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result securityinsight.AlertRuleModel, err error) - GetAction(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string) (result securityinsight.ActionResponse, err error) - List(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.AlertRulesListPage, err error) - ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.AlertRulesListIterator, err error) -} - -var _ AlertRulesClientAPI = (*securityinsight.AlertRulesClient)(nil) - -// ActionsClientAPI contains the set of methods on the ActionsClient type. -type ActionsClientAPI interface { - ListByAlertRule(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result securityinsight.ActionsListPage, err error) - ListByAlertRuleComplete(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string) (result securityinsight.ActionsListIterator, err error) -} - -var _ ActionsClientAPI = (*securityinsight.ActionsClient)(nil) - -// AlertRuleTemplatesClientAPI contains the set of methods on the AlertRuleTemplatesClient type. -type AlertRuleTemplatesClientAPI interface { - Get(ctx context.Context, resourceGroupName string, workspaceName string, alertRuleTemplateID string) (result securityinsight.AlertRuleTemplateModel, err error) - List(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.AlertRuleTemplatesListPage, err error) - ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.AlertRuleTemplatesListIterator, err error) -} - -var _ AlertRuleTemplatesClientAPI = (*securityinsight.AlertRuleTemplatesClient)(nil) - -// BookmarksClientAPI contains the set of methods on the BookmarksClient type. -type BookmarksClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, bookmark securityinsight.Bookmark) (result securityinsight.Bookmark, err error) - Delete(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string) (result securityinsight.Bookmark, err error) - List(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.BookmarkListPage, err error) - ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.BookmarkListIterator, err error) -} - -var _ BookmarksClientAPI = (*securityinsight.BookmarksClient)(nil) - -// DataConnectorsClientAPI contains the set of methods on the DataConnectorsClient type. -type DataConnectorsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, dataConnector securityinsight.BasicDataConnector) (result securityinsight.DataConnectorModel, err error) - Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string) (result securityinsight.DataConnectorModel, err error) - List(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.DataConnectorListPage, err error) - ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result securityinsight.DataConnectorListIterator, err error) -} - -var _ DataConnectorsClientAPI = (*securityinsight.DataConnectorsClient)(nil) - -// IncidentsClientAPI contains the set of methods on the IncidentsClient type. -type IncidentsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incident securityinsight.Incident) (result securityinsight.Incident, err error) - Delete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string) (result securityinsight.Incident, err error) - List(ctx context.Context, resourceGroupName string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.IncidentListPage, err error) - ListComplete(ctx context.Context, resourceGroupName string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.IncidentListIterator, err error) -} - -var _ IncidentsClientAPI = (*securityinsight.IncidentsClient)(nil) - -// IncidentCommentsClientAPI contains the set of methods on the IncidentCommentsClient type. -type IncidentCommentsClientAPI interface { - CreateComment(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string, incidentComment securityinsight.IncidentComment) (result securityinsight.IncidentComment, err error) - Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string) (result securityinsight.IncidentComment, err error) - ListByIncident(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.IncidentCommentListPage, err error) - ListByIncidentComplete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.IncidentCommentListIterator, err error) -} - -var _ IncidentCommentsClientAPI = (*securityinsight.IncidentCommentsClient)(nil) diff --git a/version/version.go b/version/version.go index 757681af33f2..da4d5eb549fb 100644 --- a/version/version.go +++ b/version/version.go @@ -4,4 +4,4 @@ package version // Licensed under the MIT License. See License.txt in the project root for license information. // Number contains the semantic version of this SDK. -const Number = "v56.3.0" +const Number = "v57.0.0"